BEGIN command

BEGIN and END delimit a sequence of one or more commands to form one longer command. The BEGIN and END keywords cannot be abbreviated.

Read syntax diagramSkip visual syntax diagramBEGIN;commandEND;
command
A valid z/OS® Debugger command.

Usage notes

  • The BEGIN command is most helpful when used in AT or PROCEDURE commands.
  • The BEGIN command is helpful when you use it as a programming language neutral command. For example, if you create a commands file that might be used by an application created with several different programming languages, the BEGIN command works for all supported programming languages.
  • For Enterprise PL/I, the BEGIN command is helpful when used in IF or ON commands.
  • The BEGIN command does not imply a new block or name scope. It is equivalent to a PL/I simple DO.
  • You cannot use the BEGIN command while you replay recorded statements by using the PLAYBACK commands.

Examples

  • Set a breakpoint at statement 320 listing the value of variable x and assigning the value of 2 to variable a.
    AT 320 BEGIN;
      LIST (x);
      a = 2;
    END;
  • When the PL/I condition FIXEDOVERFLOW is raised (that is, when the length of the result of a fixed-point arithmetic operation exceeds the maximum length allowed) list the value of variable x and assign the value of 2 to variable a. The current programming language setting is PL/I.
    ON FIXEDOVERFLOW BEGIN; LIST (x); a=2; END;