PROCEDURE command
The PROCEDURE command allows the definition of
a group of commands that can be accessed by using the CALL procedure
command. The CALL command is the only way to perform
the commands within the PROCEDURE. PROCEDURE definitions
remain in effect for the entire debug session.
The PROCEDURE keyword can be abbreviated only
as PROC. PROCEDURE definitions can
be subcommands of other PROCEDURE definitions. The
name of a nested procedure has the scope of only the containing procedure.
Session variables cannot be declared within a PROCEDURE definition.
In addition, a procedure must be defined before it is called on
a CALL statement.
- name
- A valid z/OS® Debugger procedure name. It must be a valid identifier in the current programming language. The maximum length is 31 characters.
- command
- A valid z/OS Debugger command
other than a declaration or
PANELcommand.
Usage notes
- Because the z/OS Debugger procedure names are always uppercase, the procedure names are converted to uppercase even for programming languages that have mixed-case symbols.
- If a
GOorSTEPcommand is issued within a procedure or a nested procedure, any statements following theGOorSTEPin that procedure and the containing procedure are ignored. If control returns to z/OS Debugger, it returns to the statement following theCALLof the containingPROCEDURE. - It is recommended that procedure names be chosen so that they are valid for all possible programming language settings throughout the entire z/OS Debugger debug session.
Examples
- When procedure
proc1is called, the values of variablesx,y, andzare displayed.proc1: PROCEDURE; LIST (x, y, z); END; - Define a procedure named
setat34that sets a breakpoint at statement 34. Proceduresetat34contains a nested procedurelisterthat lists current statement breakpoints. Procedurelistercan be called only from withinsetat34.setat34: PROCEDURE; AT 34; lister: PROCEDURE; LIST AT STATEMENT; END; CALL lister; END;
