Inspect Manual
High-Level Inspect Commands
Inspect Manual—429164-006
6-74
Using the PIC Clause
Usage Considerations
Size Limits on DISPLAY PIC Formatting
Displays using the PIC clause cannot exceed one screen (24 lines) or 3168 bytes
of data. If these limits have been exceeded, the data is displayed and Inspect
issues this warning message:
Differences between PIC and PICTURE
Note that there are significant differences between the INSPECT PIC clause and
the COBOL PICTURE clause. The PICTURE clause is part of a data item's
definition, while the PIC clause is simply a template for formatting a data item.
Also, the PIC clause is case-sensitive, excludes constructs such as parenthesized
repetition counts, and does not perform floating replacement.
Using PIC with AS
When you use the PIC clause with the AS clause, the AS clause determines how
much data to display and the PIC clause determines how to format the data.
Using PIC with FOR
When you use the PIC clause with the FOR clause, the FOR clause determines
how much data to display and the PIC clause determines how to format the data.
Using PIC with TYPE
You cannot use the PIC clause with the TYPE clause.
Examples
This source code was used to generate the examples for the PIC clause.
** Inspect warning 87 ** Maximum lines exceeded for format output
?INSPECT, SYMBOLS
IDENTIFICATION DIVISION.
PROGRAM-ID. example.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 var1 PIC 99 COMP VALUE 2.
01 var2 PIC X(8).
01 arr1 GLOBAL.
02 sub1-arr PIC XXXXX VALUE "12345".
02 sub2-arr PIC X VALUE "5".
02 sub3-arr PIC XXX VALUE "123".
02 sub4-arr PIC XX VALUE "2".
PROCEDURE DIVISION.
exampletoshow.
MOVE "12.34" TO var2.
DISPLAY "Hello World".
STOP RUN.