JUMPTO command

The JUMPTO command moves the point at which the program resumes running to the specified statement but does not resume running the program.

Read syntax diagramSkip visual syntax diagram JUMPTOJUMP TO statement_id;

Usage notes

  • 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
    The use of JUMPTO in this case might cause unpredictable behaviors, including abends, when the JUMPTO command is executed or followed. You can get the best behavior of JUMPTO in programs that are compiled with OPT and TEST(NOEJPD) options in either of the following situations:
    • 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.
    You can get the best behavior especially if these statements are targets of COBOL statements PERFORM or GOTO in the COBOL program. See SET WARNING command (C, C++, COBOL, and PL/I).
  • You cannot use the JUMPTO command while you debug a disassembled program.
  • If you specify the JUMPTO command in a command list (for example, as the subject of an IF command or WHEN clause), all subsequent commands in the list are ignored.
  • If the program is compiled with minimum optimization, the JUMPTO command is not restricted to specific statements.
  • You cannot use the JUMPTO command while you replay recorded statements by using the PLAYBACK command.
  • For C, C++, and PL/I programs, statements can be removed by the compiler during optimization. Specify a reference or statement for the JUMPTO command that can be reached while the program is running. You can use the LIST STATEMENT NUMBERS command to determine the statements that can be reached.
  • For PL/I programs, you can use JUMPTO in a command list on a call to PLITEST or CEETEST.
  • For PL/I programs, you cannot specify a statement that is out of the currently active block. However, you might have to qualify the statement.
  • For COBOL programs, the JUMPTO command follows the COBOL language rules that apply to the GOTO statement. You can use the JUMPTO command in the following situations:
    • A COBOL program compiled with hooks inserted by the compiler. If you are using Enterprise COBOL for z/OS, Version 4, compile your program with the HOOK suboption of the TEST compiler option. If you are using any of the following compilers, compile your program with either PATH or ALL suboption and the SYM suboption of the TEST compiler option:
      • Enterprise COBOL for z/OS and OS/390®, Version 3
      • COBOL for OS/390 & VM, Version 2
    • A COBOL program compiled without hooks inserted by the compiler and without optimization. If you are using Enterprise COBOL for z/OS, Version 4, compile your program with the NOHOOK suboption of the TEST compiler option. If you are using any of the following compilers, compile your program with the NONE suboption of the TEST compiler option:
      • Enterprise COBOL for z/OS and OS/390, Version 3 Release 2 or later
      • Enterprise COBOL for z/OS and OS/390, Version 3 Release 1, with APAR PQ63235 installed
      • COBOL for OS/390 & VM, Version 2 Release 2
      • COBOL for OS/390 & VM, Version 2 Release 1, with APAR PQ63234 installed
    • A COBOL program compiled without hooks inserted by the compiler and with optimization. You must compile your program with Enterprise COBOL for z/OS, Version 4, and specify the EJPD and NOHOOK suboption of the TEST compiler option. Specifying the EJPD suboption might cause some loss of optimization.
    • 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 compile option, it is recommended to use the EJPD suboption of the TEST compile option.
  • You can use the JUMPTO command in remote debug mode by entering it in the Debug Console or the Action field, which is in the Optional Parameters section of the Add a Breakpoint task.
  • This command cannot be used if you are stopped at an AT APPEARANCE breakpoint, an AT LOAD breakpoint, or an AT DELETE breakpoint.

Example

You want to jump to statement 24 and then stop there. Enter the following command:

JUMPTO 24;

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_id