The DEBUG-ITEM special register provides information for a debugging declarative procedure about the conditions that cause debugging section execution.
DEBUG-ITEM has the following implicit description:
01 DEBUG-ITEM.
02 DEBUG-LINE PICTURE IS X(6).
02 FILLER PICTURE IS X VALUE SPACE.
02 DEBUG-NAME PICTURE IS X(30).
02 FILLER PICTURE IS X VALUE SPACE.
02 DEBUG-SUB-1 PICTURE IS S9999 SIGN IS LEADING SEPARATE CHARACTER.
02 FILLER PICTURE IS X VALUE SPACE.
02 DEBUG-SUB-2 PICTURE IS S9999 SIGN IS LEADING SEPARATE CHARACTER.
02 FILLER PICTURE IS X VALUE SPACE.
02 DEBUG-SUB-3 PICTURE IS S9999 SIGN IS LEADING SEPARATE CHARACTER.
02 FILLER PICTURE IS X VALUE SPACE.
02 DEBUG-CONTENTS PICTURE IS X(n).
Before each debugging section is executed, DEBUG-ITEM is filled with spaces. The contents of the DEBUG-ITEM subfields are updated according to the rules for the MOVE statement, with one exception: DEBUG-CONTENTS is updated as if the move were an alphanumeric-to-alphanumeric elementary move without conversion of data from one form of internal representation to another.
After updating, the contents of the DEBUG-ITEM subfields are:
| Cause of debugging section execution | Statement referred to in DEBUG-LINE | Contents of DEBUG-NAME | Contents of DEBUG-CONTENTS |
|---|---|---|---|
| procedure-name-1 ALTER reference | ALTER statement | procedure-name-1 | procedure-name-n in TO PROCEED TO phrase |
| GO TO procedure-name-n | GO TO statement | procedure-name-n | Spaces |
| procedure-name-n in SORT or MERGE input/output procedure | SORT or MERGE statement | procedure-name-n | “SORT INPUT”
“SORT OUTPUT” “MERGE OUTPUT” (as applicable) |
| PERFORM statement transfer of control | This PERFORM statement | procedure-name-n | “PERFORM LOOP” |
| procedure-name-n in a USE procedure | Statement causing USE procedure execution | procedure-name-n | “USE PROCEDURE” |
| Implicit transfer from previous sequential procedure | Previous statement executed in previous sequential procedure1 | procedure-name-n | “FALL THROUGH” |
| First execution of first nondeclarative procedure | Line number of first nondeclarative procedure-name | First nondeclarative procedure | “START PROGRAM” |
|
|||