The following section describes how disk input and output files and tape input and output files are assigned. The BS2000 commands used for this purpose are described in manuals [9] "BS2000 Commands".
Priority of assignments
The specification of file attributes for processing purposes using the ADD-FILE-LINK command has priority over specifications in ASSIGN-INPUT-FILE and ASSIGN-OUTPUT-FILE statements and catalog entries. Different rules may apply when storing files in the catalog (e.g. in the case of FOREIGN tapes, the specifications in the catalog entry may be taken over from HDR2). In the case of input files already cataloged, make sure that the specifications in the ADD-FILE-LINK command do not conflict with the catalog entries or the ASSIGN-INPUT-FILE specifications. If this is the case, it is always the ADD-FILE-LINK statements which are interpreted.
The specification of file attributes via ASSIGN-INPUT-FILE and ASSIGN-OUTPUT-FILE statements has priority over catalog entries. Here, too, in the case of input files already cataloged, it is necessary to make sure that the specifications in the ASSIGN-INPUT-FILE statements and the catalog entries do not conflict with each other, because this would otherwise lead to errors.
File attributes which have been assigned neither via the ADD-FILE-LINK command nor via ASSIGN-INPUT-FILE or ASSIGN-OUTPUT-FILE statements are provided with the catalog entries, in so far as there are any.
To summarize, the priority of the assignments can be represented by the following hierarchy:
ADD-FILE-LINK command
PERCON control statements
catalog entry
PERCON default values
Input file
The following BS2000 commands and PERCON statements are of importance with regard to the assignment of input files:
IMPORT-FILE command
This command must be specified if the file to be processed resides on a private volume and has not yet been cataloged.
ADD-FILE-LINK command
This command must be specified when standard processing operands (e.g. OPEN-MODE=INPUT) are to be modified. Conflicting specifications for the file attributes in the catalog entry result in a file open error. Only one file can be assigned by means of the standard link name PCIN.
ASSIGN-INPUT-FILE statement
This statement must be specified if the standard link name PCIN is not to be used. If there is more than one input file, each one must be assigned by a separate ASSIGN-INPUT-FILE statement and a different link name must be used for each. The files are processed one after the other in the order in which they were specified. The connection to a specified ADD-FILE-LINK command is established by the link name.
If the name of a cataloged file is specified both in the ADD-FILE-LINK command and in the ASSIGN-INPUT-FILE statement, the file name in the ADD-FILE-LINK command has priority. If the file names do not match, message PER0012 is issued.
If input is via SYSDTA or DISKETTE, only the entries in the ASSIGN-INPUT-FILE statement are required.
Output file
The following BS2000 commands and PERCON statements are of importance for assigning output files on disk or tape:
CREATE-FILE command
This command must be specified if the file does not exist.
ADD-FILE-LINK command
This command must be specified if the file attributes
of an existing file, which are used for processing by PERCON, are to deviate from the entries in the catalog;
of a new file, which have not been specified yet, are to deviate from the PERCON default values.
ASSIGN-OUTPUT-FILE statement
This statement must be specified if the standard link name PCOUT is not to be used. If there is more than one file, each one must be assigned via a separate ASSIGN-OUTPUT-FILE statement and a different link name must be used for each one. Data is written to the different files simultaneously. The connection to a specified ADD-FILE-LINK command is established via the link name.
If the name of a cataloged file is specified both in the ADD-FILE-LINK command and in the ASSIGN-OUTPUT-FILE statement, the file name in the ADD-FILE-LINK command has priority. If the file names do not math, message PER0012 is issued.
If output is via SYSLST or SYSOUT, only the specifications in the ASSIGN-OUTPUT-FILE statement are required.
Input tape
In the case of tape editing, one tape can be assigned; in the case of tape duplication, several tapes can be assigned. For this purpose the VSN must be specified in the ASSIGN-INPUT-TAPE statement. The maximum length of the input blocks is specified in the BUFFER-LENGTH operand. If any block exceeds this length, it is shortened to the length specified in the BUFFER-LENGTH operand.
Output tape
In the case of tape duplication, several output tapes can be assigned. For this purpose the volume serial numbers must be specified in the ASSIGN-OUTPUT-TAPE statement.