The specification of whether the current entry should apply to commands, to data, or to both is possible within the procedure and when calling background procedures. The LOGGING-ALLOWED and LOGGING operands have the same format for all commands.
If the entry is to apply both to commands and data, the operand must be specified as LOGGING[-ALLOWED] = *YES (or *NO).
If the entry is to apply to commands only, the operand value must be specified as PARAMETERS(CMD = *YES) or (CMD = *NO).
In the same way, if the entry is to apply to the logging of data only, the operand value must be PARAMETERS(DATA = *YES) or (DATA = *NO).
The table below shows the interplay between the settings in the SET-PROCEDURE-OPTIONS, MODIFY-PROCEDURE-OPTIONS and CALL-PROCEDURE/INCLUDE-PROCEDURE commands.
It is possible to query whether commands or data are being logged by means of the predefined function LOGGING-MODE( ) with the operand STREAM = *CMD/*DATA.
SET-PROC-OPT Operand | CALL-PROCEDURE / INCLUDE-PROCEDURE | |||||
*YES | *NO | *PARAM | *PARAM | *PARAM | *PARAM | |
*YES | C/D | -/- | C/* | -/* | */D | */- |
*NO | -/- | -/- | -/- | -/- | -/- | -/- |
*PAR(CMD= *Y) | C/D | -/- | C/* | -/* | */D | */- |
*PAR(CMD = *N) | -/D | -/- | -/* | -/* | */D | -/- |
*PAR(DATA = *Y) | C/D | -/- | C/* | -/* | */D | */- |
*PAR(DATA = *N) | C/- | -/- | C/* | -/- | */- | */- |
C/D | Commands and data are logged |
-/- | Neither commands nor data are logged |
C/- | Only commands are logged |
-/D | Only data is logged |
*
| Whether commands/data are logged depends on the setting in the MODIFY-PROCEDURE-TEST-OPTIONS command. |
Notes
If S procedures are logged, the log always refers to the line number and procedure level, so that it is easy to locate any errors which occur.
When loops are logged, the command which initiates the loop is logged only once. The command that terminates the loop is logged for each pass through the loop.
If a command call is preceded by an S tag (tag:), the command and the tag are logged separately.
Comment commands are not logged. (A comment command is a command line that consists only of a comment.)