Inspect Manual

Using Inspect With COBOL and SCREEN COBOL
Inspect Manual429164-006
10-9
COBOL Data Types and Inspect
COBOL Data Types and Inspect
The following subsections discuss how Inspect handles and presents various COBOL
data types.
Record Types
This example assume these COBOL record declarations:
01 office-record.
05 room-number PIC X9(4) VALUE "A4294".
05 address PIC X(35) VALUE "555 12th Street".
05 square-footage PIC 999V99 VALUE 113.40
USAGE IS COMPUTATIONAL.
05 phone-number PIC 9(10) VALUE 9113732411.01
lumber-table.
03 thickness OCCURS 2 TIMES.
05 width OCCURS 6 TIMES.
07 price PICTURE 99V99.
This example displays the entire record, including the names of the record fields:
-COBOLOBJ-DISPLAY office-record
OFFICE-RECORD =
ROOM-NUMBER = "A4294"
ADDRESS = "555 12th Street
SQUARE-FOOTAGE = 113.40
PHONE-NUMBER = 9113732411.
This example displays the record as a contiguous block of characters. The ?0 ?0
represent octal values that cannot be displayed as characters:
-COBOLOBJ-DISPLAY office-record WHOLE
OFFICE-RECORD = "A4294555 12th Street " ?0 ?0 ",L9113732411"
This example displays the record without field names:
-COBOLOBJ-DISPLAY office-record PLAIN
A4294
555 12th Street
113.4
9113732411.
This example displays the record as a contiguous block of characters, suppressing the
record name:
-COBOLOBJ-DISPLAY office-record WHOLE PLAIN
A4294555 12th Street ?0 ?0,L9113732411
This example shows the internal attributes of some record fields:
-COBOBJ-INFO IDENTIFIER price
PRICE: VARIABLE
storage^info:
TYPE=NUM UNSIGN, ELEMENT LEN=8 BITS, UNIT SIZE=4 ELEMENTS,
SCALE=2