Data Definition Language (DDL) Reference Manual (G06.24+)

Definition Attributes
Data Definition Language (DDL) Reference Manual426798-002
6-5
EDIT-PIC Clause
The following examples illustrate using constant names to specify display formats:
CONSTANT mdy-date-display VALUE "M<mm/dd/yy>".
CONSTANT phone-display VALUE "M<(999) 999-9999>".
DEF deliv-date PIC 9(6) DISPLAY mdy-date-display.
DEF custphone PIC 9(10) DISPLAY phone-display.
EDIT-PIC Clause
The EDIT-PIC clause specifies a format in which a field’s data is to be displayed.
Requesters generated by the Pathmaker tool use the information in the EDIT-PIC
clause to format the data for screen display.
The EDIT-PIC clause does not replace the PICTURE clause. EDIT-PIC specifies a
picture of a temporary item to which the value is moved for display.
DDL ignores the EDIT-PIC clause when generating host-language source code
edit-picture
is a character string that conforms to the field’s data type and follows the guidelines
listed after this syntax and the rules for a COBOL alphanumeric or numeric edited
picture. For details about the COBOLrules, see the description of the PICTURE
clause in the COBOL85 for NonStop Systems Manual.
constant-name
is the name of a constant in the open DDL dictionary. The constant value must be
a valid edit-picture value.
EDIT-PIC Clause Guidelines
The following points are guidelines for using the EDIT-PIC clause:
Table 6-2. Display Format Examples
Display Format Value Displayed Value
“M<99/99/99>” 012791 01/27/91
“M<Z,ZZZ.99>” 0.00 .00
“M<Z,ZZZ.99>” 1.499 1.50
“M<$ZZ,ZZ9.99>” 5246.95 $ 5,246.95
“M<(999) 999-9999> 4084266974 (408) 426-6974
“M<99,999>” 524695 ******* (overflow)
EDIT-PIC {"edit-picture-string" | constant}