Line continuation

Line continuation in a SYSIN file is specified by the (+) or (-) continuation character, which indicates the next line should be read as if it were a part of the previous line. Line continuation is not required but can be used to break up long lines to simplify editing or to ease consumption by other tooling that may have line length restrictions.

The (+) or (-) continuation character must be the last non-blank and non-comment character on a line. When using the continuation characters, the following rules apply:
  • The (-) character can only be used to continue a line following complete options, directives, or specifiers. Line continuation begins at column 1 on the next line. The (-) character must be preceded by one or more blanks.
  • The (+) character can be used to continue a line following complete options, directives, or specifiers, or in the middle of options, directives, or specifiers. Line continuation begins with the first non-blank character on the next line. When continuing complete options, directives, or specifiers, the (+) character must be preceded by one or more blanks.
  • Blanks that precede the line continuation character will be included in the concatenated line.
  • The comment character (#) takes precedence over the line continuation character. If a line continuation character is part of a comment, it will be ignored as part of that comment and not continue the comment.

An error message might be issued if the continuation character is in an unexpected position.

These examples show the JCL using the BOPT optimizer directive. The examples are not full examples. They are intended to reflect what the user should specify in the SYSIN file. For basic JCL configuration, see JCL sample.

Example 1
//SYSIN  DD *
ARCH=11 -
ALLOW=UNRESEXE
BOPT IN=HLQ.LOAD.APPXYZ1.ORIG(*) -
OUT=HLQ.LOAD.APPXYZ1.ABO
This example is interpreted by ABO as the following:
//SYSIN  DD *
ARCH=11 ALLOW=UNRESEXE
BOPT IN=HLQ.LOAD.APPXYZ1.ORIG(*) OUT=HLQ.LOAD.APPXYZ1.ABO
Note that blanks preceding the continuation character are included in the concatenated string in all cases.
Example 2
//SYSIN DD *
                                        AR+
                                        CH=12 +
                                                      ALLOW=UNRESEXE
BOPT IN=HLQ.LOAD.APPXYZ1.OR+
IG(*) -
OUT=HLQ.LOAD.APPXYZ1.ABO
This example shows how the (+) character allows continuing wherever desired on the next line (at the first non-blank) instead of only at column 1, and how the (+) character can be used to continue an option, directive, or specifier that is not complete. This example is interpreted by ABO as the following:
//SYSIN  DD *
ARCH=12 ALLOW=UNRESEXE
BOPT IN=HLQ.LOAD.APPXYZ1.ORIG(*) OUT=HLQ.LOAD.APPXYZ1.ABO
Example 3
//SYSOPTF  DD *
       # some comment +                                                    (1)
                          ARCH=12    +   #other comment -                  (2)
                                   ALLOW=UNRESEXE                          (3)
BOPT IN=HLQ.LOAD.APPXYZ1.ORIG(*) OUT=HLQ.LOAD.APPXYZ1.ABO                  (4)
This example is processed by ABO as the following:
//SYSOPTF  DD *
ARCH=12 ALLOW=UNRESEXE 
BOPT IN=HLQ.LOAD.APPXYZ1.ORIG(*) OUT=HLQ.LOAD.APPXYZ1.ABO
The (+) character on line 1 and the (-) character on line 2 are ignored because they are part of comments. The (+) character on line 2 is treated as line continuation character because it is the last non-comment and non-blank character on the line.