Entering multiline commands in a commands file
The rules for line continuation when input comes from a commands
file are language-specific:
- When the current programming language setting is C and C++, identifiers, keywords, and literals can be
continued from one line to the next if the backslash continuation character is used at the end of each continued line. A single quotation mark (') or double quotation mark (") is used
to mark the beginning and the end of the literal string. Optionally, you can enclose the content in
parentheses. Below are some examples of line continuation for C.For LIST commands, use the double quotation mark (") for the literals:
LIST "this is a very very very vvvvvvvvvvvvvvvvvvvvvvvvvvvvv\ vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\ very long string";
For assignment statements, use the single quotation mark (') for the literals:LIST ("this is a very very very vvvvvvvvvvvvvvvvvvvvvvvvvvvvv\ vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\ very long string");
(* pvarcs) = '\00100000000000000000000000000000000000000\ 00001';
-
When the current programming language setting is COBOL, columns 1 is ignored by z/OS® Debugger and command text must start after column 1 and end in or before column 72. Input can be continued from one line to the next if the SBCS hyphen (-) is used in column 7 of the next line. On all continuation lines, columns 1-6 are ignored and the text must begin in column 8 or later and end in or before column 72. A single quotation mark (') or double quotation mark (") is used to mark the beginning and the end of the literal string.
Below are some examples of line continuation for COBOL:
If you're using a COBOL type statement such as MOVE or IF, all literals use the single quotation mark ('):- IF statement:
IF NAT1 = NX'003100320033003400350036003700380039005800310032003300340035 - 0036003700380039005800310032003300340035003600370038003900580031 - 0058003100320033003400350036003700380039007C00310032003300340035 - 0045' COMPUTE SV-SUCCESS = SV-SUCCESS + 1;
IF ALPH-NUM1-BODY = x'00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000' COMPUTE SV-SUCCESS = SV-SUCCESS + 1;
- MOVE statement:
MOVE '123456789X123456789X123456789X123456789X123456789|123456789X1234 - 56789X123456789X123456789X123456789|123456789X123456789X12345678 - 123456789X123456789X123456789|123456789X123456789X' TO ALPH-NUM1;
- MOVE statement with a HEX string:
MOVE X'F0F1F2F3F4F5F6F7F8F9F0F1F2F3F4F5F6F7F8F9F0F1F2F3F4F5F6F7F8F9F0 - F1F2F3F4F5F6F7F8F9F0F1F2F3F4F5F6F7F8F9F0F1F2F3F4F5F6F7F8F9F0F1F2 - F7F8F9F0F1F2F3F4F5F6F7F8F9F0F1F2F3F4F5F6F7F8F9F0F1F2F3F4F5F6F7F8 - F1F2F3F4F5F6F7F8F9F0F1F2F3F4F5F6F7F8F9F0F1F2F3F4' TO ALPH-NUM1;
For LIST statements, use either the single quotation mark (') or double quotation mark ("):-
LIST ("this is a very very very vvvvvvvvvvvvvvvvvvvvvvv -very long string");
LIST NX'00310032003300340035003600370038003900300031003200330034003500 - 3600370038003900300031003200330034003500360037003800390030003100 - 3400350036003700380039003000310032003300340035003600370038003900 - 30003100320033003400350036003700380039007C0031003200330034003500 - 36' ;
Continuation is not allowed within a DBCS name or literal string when the current programming language setting is COBOL.
- IF statement: