Following are the rules for specifying position (p) in field_name dictionary statements:
-
p can be a number from 1 through 32752 whenever p,l or p,l and f are used. However, if position (p) is used alone (for example, CITY,20), p can not be more than 31 significant digits. Note that any value of p greater than 32752 may cause a syntax error when it is processed as a position.
-
p can be in the form of m.n for specifying a bit position, where m is a number from 1 through 32752 and n is a number from 0 through 7. Note that m.0 is equivalent to m.
-
p can be an asterisk (*), which indicates that the next position should be assigned to p. Since l represents length, the next position is set to p + l each time the field_name for p,l,f or p,l is encountered. If the next position has not yet been determined, as when the asterisk is used in the first field_name, then p defaults to one.
When p is an asterisk (*) and there is no length specified, you can also specify + or – n, where n is a number from 1 through 32752.
Using the asterisk (*) for position (p) eliminates the need to calculate positions for consecutive fields and to change position values if you insert fields later.
-
p can be an equal sign (=) which indicates that the previous position should be assigned to p. If the previous position has not yet been determined, an error message will be generated.
When p is an equal sign (=) and there is no length specified, you can also specify + or – n, where n is a number from 1 through 32752.
Note that use of = for p can result in incorrect position values if fields are inserted at some later date.
The value of the next position and the previous position can also be modified by a POSITION operator statement. See Using POSITION in Operator Statements.
The dictionary table, which can be printed on request (see the SYMNOUT DD statement ), displays the actual positions assigned to p when the asterisk or equal sign is used for p. For example, consider the following dictionary statements:
Following is an example demonstrating the use of the *-n form. Here a field_name is defined for the record length to be used in the RECORD control statement.
You would then use rec_len in the RECORD control statement, as follows: