Edit-Pic Clause; Table 6-2. Display Format Examples - HP DDL D40 Reference Manual

Data definition language
Table of Contents

Advertisement

Definition Attributes

Table 6-2. Display Format Examples

Display Format
"M<99/99/99>"
"M<Z,ZZZ.99>"
"M<Z,ZZZ.99>"
"M<$ZZ,ZZ9.99>"
"M<(999) 999-9999>"
"M<99,999>"
The following examples illustrate using constant names to specify display formats:
CONSTANT mdy-date-display
CONSTANT phone-display
DEF deliv-date
DEF custphone

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-PIC {"edit-picture-string" | constant}
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:
Data Definition Language (DDL) Reference Manual—426798-002
Value
012791
0.00
1.499
5246.95
4084266974
524695
VALUE "M<mm/dd/yy>".
VALUE "M<(999) 999-9999>".
PIC 9(6)
DISPLAY mdy-date-display.
PIC 9(10)
DISPLAY phone-display.
6 -5
EDIT-PIC Clause
Displayed Value
01/27/91
.00
1.50
$ 5,246.95
(408) 426-6974
******* (overflow)

Advertisement

Table of Contents
loading

Table of Contents