If USING is not specified, the user-defined word or literal that is specified for the assignment name is processed as described below.
Format: assignment-name >>-+-----------+--+------------------+--------------------------> '-comment- -' '-file-system-ID- -' >--+-system-file-name--+---------------+-+--------------------->< | '-| alt-index |-' | '-external-file-name------------------' alt-index .----------------------------------. V | |--(alt-index-file-name-1---+------------------------------+-+-)--| '-,--+-----------------------+-' '-alt-index-file-name-2-'
If the user-defined word does not contain any hyphens, the entire string is treated as the external file-name. If the literal does not contain any hyphens, the entire string is treated as file name information. File name information can be a single system file-name, or a single system file-name followed by a list of alternate index file-names, or a concatenation of system file-names that are separated by colons. For each of these alternatives, each system file-name can be qualified by a path name. Otherwise, the user-defined word or literal is partitioned into up to three components separated by hyphens:
If the string does not meet all of these criteria, it is treated as part of the comment.
If assignment-name-1 is specified as a user-defined word, external-file-name is interpreted at run time as the name of an environment variable set to a nonempty value or, if there is no such environment variable, directly as the system file-name.
If assignment-name-1 is specified as a literal, the rightmost component is always interpreted as file name information directly.
Examples:
| User-defined word | Comment | File-system ID | External file-name |
|---|---|---|---|
| Read-Only-VSAM-Orders | Read-Only | SdU | ORDERS |
| This-is-my-file | This-is-my | (Default) | FILE |
| Comment-STL--file | Comment-STL- | (Default) | FILE |
| Watch-for-this-file | Watch-for | THI (invalid) | FILE |
| Literal | Comment | File-system ID | System file-name |
|---|---|---|---|
| Read-Only-Vsam-Orders | Read-Only | SdU | Orders |
| Eh?-What's this? | Eh? | (Default) | What's this? |
| This-is-a-DB2-CICS.FILE | This-is-a | DB2 | FILE (under schema CICS) |
| I-Like-STL!- | I-Like | STL | (Null) |
| vsa-/.:/cics/sfs/svr/W123 | (None) | SFS | W123 (on SFS server svr) |
/.:/cics/sfs/sfsServer/base-file-name;index-file-name
Alternate index file-names, if specified, must be specified in the same order as the alternate record keys are specified in the source program. You can omit alternate index file-names, but any other alternate index file-names must correspond to the position in the file definition. The following example shows how to specify the first and third alternate index file-names:
base-file-name(first-index-file-name,,third-index-file-name)
In this example, the compiler assigns a default file-name for the second alternate index file.
Alternate index file-names are ignored for file systems other than SdU or SFS.