Creating physical sequential files

Note that the following examples assume that an rfs fileset is mapped to the r: drive and the data set prefix in devtab is SMITH. It is also assumed that these files are translated between ASCII and EBCDIC characters by an administrator specification of:

When creating a physical sequential (PS) file, specify the dsorg(ps) attribute (if it is not the default already) with a file creation command, such as the notepad command.

C:\>notepad "r:\new.txt,dsorg(ps)"

When you save the file using notepad, you have just created a new PS file named SMITH.NEW.TXT.

You must specify the .txt suffix on the file name. If you do not, notepad will automatically append it and will try to create "new,dsorg(ps).txt", which will not be successful. You must also type a carriage return after the last line (or the only line) of the file. Notepad does not do this automatically.

An example for Linux Samba follows:

linux001:/mntrfs # vi "new.txt,dsorg(ps)"

When reading or changing data in a Physical Sequential file with fixed-length records in text mode, the blankstrip processing attribute in the attributes file controls how trailing blanks are handled. If blankstrip is specified in the attributes file, trailing blanks are removed from the end of each record when it is read, and blanks are padded to the end of each record when it is written. blankstrip is the default. If noblankstrip is specified in the attributes file, trailing blanks are not removed from the end of each record when it is read, and blanks are not padded to the end of each record when it is written. In this case, each record written must be the correct size or an I/O error is reported.

When copying a file to an RFS file system, if you are overriding the data set creation attributes, you must specify the target file name in the copy command. Table 1 shows examples of the how to do so correctly.

Table 1. Examples of commands to copy a file to an RFS file system
Form Command example
Correct
C:\>copy file1 "r:\newfile1,space(2,5),cyls"
Incorrect
C:\>copy file1 "r:\,space(2,5),cyls"
Correct
linux001:/mntrfs # cp file1 "newfile1,space(2,5),cyls"
Incorrect
linux001:/mntrfs # cp file1 ",space(2,5),cyls"
cp: cannot create regular file `,space(2,5),cyls': Invalid argument