Continuation lines
The format of the DFSORT continuation line is shown in Figure 1.
Figure 1. Continuation Line
Format
The continuation column and columns 73 through 80 of a continuation line have the same purpose as they do on the first line of a control statement. Column 1 must be blank.
A continuation line is treated as a logical extension of the preceding
line. Either an operand or a remark field can begin on one line (referred
to as "line 1" in the bullets that follow)
and continue on the next line (referred to as "line 2" in the bullets that follow). The following are the rules for continuation
illustrated with examples (these different types of continuation can
be intermixed):
- Implicit continuation in 2-71: If line 1 breaks at a comma-blank
or semicolon-blank or colon-blank, DFSORT continues on line 2 with
the first nonblank character it finds in columns 2-71. For example:
The previous statements will be treated as if they were specified as:* 1 2 3 4 5 6 7 *23456789012345678901234567890123456789012345678901234567890123456789012 INCLUDE COND=(5,4,CH,EQ, C'ABCD') SORT FIELDS=(9, 3, ZD, A) OUTREC FIELDS=(1,27,2X, FIRST FIELD AND TWO BLANKS 51,2,BI,M11, SECOND FIELD 60:9,3,ZD,PD) THIRD FIELD
INCLUDE COND=(5,4,CH,EQ,C'ABCD') SORT FIELDS=(9,3,ZD,A) OUTREC FIELDS=(1,27,2X,51,2,BI,M11,60:9,3,ZD,PD)
- Explicit continuation in 16: If line 1 breaks at column
71 with a nonblank in column 72, and columns 2-15 of line 2 are blank,
DFSORT continues on line 2 with whatever character it finds in column
16 (blank or nonblank). For example:
The previous statements will be treated as if they were specified as:* 1 2 3 4 5 6 7 *23456789012345678901234567890123456789012345678901234567890123456789012 INCLUDE COND=(5,4,CH,E* Q,C'ABCD') SORT FIELDS=(9,3,* ZD,A) OUTREC FIELDS=(1,80,C'BLANK WITHIN A* LITERAL')
INCLUDE COND=(5,4,CH,EQ,C'ABCD') SORT FIELDS=(9,3,ZD,A) OUTREC FIELDS=(1,80,C'BLANK WITHIN A LITERAL')
Attention: You should only start with a blank in column 16 of line 2 if you need a blank as the first character of the continued operand, as shown in the previous OUTREC statement. A blank in column 16 of line 2 will be included in the operand and will result in invalid syntax if incorrectly placed. For example:
The previous statements will be treated as if they were specified as:* 1 2 3 4 5 6 7 *23456789012345678901234567890123456789012345678901234567890123456789012 SORT FIELDS=(5,4,Z* D,A) SUM FIELDS=(5,4,Z* D)
With the 'D' in column 16 of line 2, we get 'ZD' in the SORT statement. But with the 'D' in column 17 of line 2, we get 'Z D' in the SUM statement instead of 'ZD', resulting in a syntax error.SORT FIELDS=(5,4,ZD,A) SUM FIELDS=(5,4,Z D)
- Explicit continuation in 2-15: If line 1 breaks at column
71 with a nonblank in column 72, and columns 2-15 of line 2 are nonblank,
DFSORT continues on line 2 with the first nonblank character it finds
in columns 2-15. For example:
The previous statements will be treated as if they were specified as:* 1 2 3 4 5 6 7 *23456789012345678901234567890123456789012345678901234567890123456789012 INCLUDE COND=(5,4,CH,EQ,C'AB* CD') SORT FIELDS=(9,3,* ZD,A) OUTREC FIELDS=(5,4,2X* ,9,3,ZD,M26,80:X)
INCLUDE COND=(5,4,CH,EQ,C'ABCD') SORT FIELDS=(9,3,ZD,A) OUTREC FIELDS=(5,4,2X,9,3,ZD,M26,80:X)
- Remark continuation in 2-71: If a statement ends on line
1 with a blank before column 72 and a nonblank in column 72, DFSORT
treats the first nonblank character it finds in columns 2-71 of line
2 as the start of a remark. For example:
* 1 2 3 4 5 6 7 *23456789012345678901234567890123456789012345678901234567890123456789012 SORT FIELDS=(9,3,ZD,A) THIS IS A * CONTINUED REMARK
Tip: A simpler way to do the same thing (without continuation) is to use a comment statement for line 2. For example:* 1 2 3 4 5 6 7 *23456789012345678901234567890123456789012345678901234567890123456789012 SORT FIELDS=(9,3,ZD,A) THIS IS A * CONTINUED REMARK