Inspect Manual

Using Inspect With COBOL and SCREEN COBOL
Inspect Manual429164-006
10-7
Examples
Inspect, however, allows you to use subscripts instead of indices, so it will accept
commands such as:
-COBOBJ-DISPLAY x-tab(1), x-tab(5:9)
-COBOBJ-MODIFY x-tab(r:r+9) ;COMMENT R is not USAGE INDEX
-COBOBJ-BREAK x-handling+3S IF x-tab(1) > 2145
Examples
This example assume these COBOL declarations:
01 master-file-rec.
03 mfr-employee-name.
05 lastname PICTURE X(20).
05 firstname PICTURE X(20).
03 mfr-employee-number PICTURE 99999.
88 hired-before-merger VALUE IS 1 THROUGH 35929.
88 hired-after-merger VALUE IS 35930 THROUGH 99999.
...
01 paytable.
03 payscale OCCURS 20 TIMES
PICTURE 999V99
USAGE IS COMPUTATIONAL.
...77 week-of-year PICTURE 99.
Here are some data locations:
Special Registers
If you compile a COBOL 74 or COBOL85 program with or without the WITH
DEBUGGING MODE clause in the SOURCE COMPUTER paragraph, these data
items are available:
Data Location Specifies
MFR-EMPLOYEE-NAME MFR-EMPLOYEE-NAME OF MASTER-FILE-REC
FIRSTNAME FIRSTNAME OF MFREMPLOYEENAME OF MASTERFILEREC
WEEK-OF-YEAR WEEK-OF-YEAR
PAYSCALE (3) PAYSCALE OF PAYTABLE (3)
PROGRAM-
STATUS
Indicates the outcome of the STARTBACKUP, OPEN, CLOSE,
and CHECKPOINT NonStop Facility operations. For more
information, see the discussion of fault-tolerant processes in the
COBOL85 for NonStop Systems Manual.
GUARDIAN-ERR Indicates the latest file system error number. For more
information about run-time diagnostic messages, see the
COBOL85 for NonStop Systems Manual.