JUMPTO LABEL command
The JUMPTO LABEL
command moves the point at which
the program resumes running to the specified label but does
not resume running the program.
- statement_label
- A valid statement label within the currently executing program or, in PL/I, a label variable.
Usage notes
- For COBOL, if a
JUMPTO LABEL
command is issued and the specified label contains an EXIT statement, the results might be unpredictable such as an ABEND because the EXIT statement might not be specified with a return location. - You can use the JUMPTO command if the SET WARNING is set to OFF
and the runtime level allows JUMPTO without compiler enablement for the following programs:
- A COBOL program compiled without hooks being inserted by the compiler and with optimization, if you compiled with the NOEJPD suboptions of the TEST compiler option
- A program compiled with Enterprise COBOL for z/OS® Version 5 or later and optimized by Automatic Binary Optimizer for z/OS
- A program compiled with Open XL C/C++ for z/OS
- When the target of the GOTO or JUMPTO command is a paragraph name or a section name (label).
- When the target of the GOTO or JUMPTO command is the first statement in the paragraph or section.
- Use the syntax of statement_label enclosed in apostrophes (') only for LangX COBOL programs. It is not supported in any other programming language.
- In PL/I, out-of-block
JUMPTO
s are allowed. However, qualification might be needed. - The
LABEL
keyword is optional when either the target statement_label is nonnumeric or if it is qualified (whether the actual label was nonnumeric or not). A COBOL statement_label can have either of the following forms:name
This form can be used in COBOL for reference to a section name or for a COBOL paragraph name that is not within a section or is in only one section of the block.
name1 OF name2
orname1 IN name2
This form must be used for any reference to a COBOL paragraph (
name1
) that is within a section (name2
), if the same name also exists in other sections in the same block. You can specify eitherOF
orIN
, but z/OS Debugger always usesOF
for output.
Either form can be prefixed with the usual block, compile unit, and load module qualifiers.
- For C, to be able to use the
JUMPTO LABEL
command, you must compile your program in one of the following ways:- With either the
PATH
orALL
suboption and theSYM
suboption of theTEST
compiler option. - With either the
PATH
orALL
suboption and theSYM
suboption of theDEBUG
compiler option.
JUMPTO LABEL
command. - With either the
- For C++, to be able to use the
JUMPTO LABEL
command, you must compile your program in one of the following ways:- With the
TEST
compiler option. - With either the
PATH
orALL
suboption and theSYM
suboption of theDEBUG
compiler option.
JUMPTO LABEL
command. - With the
- For COBOL programs, you can use
JUMPTO LABEL
command if you compile your program with the following suboptions and compilers:- The
HOOK
suboption of theTEST
compiler option with Enterprise COBOL for z/OS, Version 4 - The
PATH
orALL
suboption and theSYM
suboption of theTEST
compiler option with the following compilers:- Enterprise COBOL for z/OS and OS/390®, Version 3
- COBOL for OS/390 & VM, Version 2
- For Enterprise COBOL for z/OS Version 5, programs are always compiled without hooks inserted by the compiler. If you are using the TEST compiler option in combination with any level of the OPT compiler option, it is recommended to use the EJPD suboption of the TEST compiler option.
name
, wherename
is a section name, or the name of a paragraph not within a section or in only one section of the block.name1 OF name2
orname1 IN name2
, wherename1
is duplicated by one or more other paragraphs in one or more other sections in the block. You can use eitherOF
orIN
, but z/OS Debugger always displaysOF
in the log.
- The
- For PL/I, you can use
JUMPTO LABEL
only if you compiled your program with either thePATH
orALL
suboption and theSYM
suboption of theTEST
compiler option. There are no restrictions on using labels withJUMPTO LABEL
and label variables are supported. JUMPTO LABEL
is not available while debugging Enterprise PL/I programs.- You
cannot use the
JUMPTO LABEL
command while you are replaying recorded steps by using thePLAYBACK
commands. - You cannot use the
JUMPTO LABEL
command while you debug an optimized COBOL program.
Examples
- Jump to the label constant
laba
in blocksuba
in programprog1
.JUMPTO prog1:>suba:>laba;
- Jump to the label constant
para OF sect1
. The current programming language setting is COBOL.JUMPTO LABEL para OF sect1;
Refer to the following topics for more information related to the material discussed in this topic.
- Related tasks
- IBM® z/OS Debugger User's Guide
- Related references
- statement_label