Data Definition Language (DDL) Reference Manual
Definition Attributes
Data Definition Language (DDL) Reference Manual—529431-004
6-5
EDIT-PIC
EDIT-PIC
The EDIT-PIC clause specifies the format in which Pathmaker-generated requesters
display a field’s data on a screen.
edit-picture
is either a string (enclosed in quotation marks) or the name of a constant in the
open dictionary. The value of edit-picture must conform to the field’s data
type.
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.
If a field’s data type and the edit picture are defined as two different data elements in
the working-storage section of a COBOL program, moving the data from one picture to
the other must be possible. The edit picture for an alphanumeric field must be
alphanumeric, and the edit picture for a numeric field must be numeric.
The length of the data in an edit picture must conform to the length of the field’s data
type. To determine the data length in an edit picture, count only the digits or characters
of data, not decorations. For example, the data length of $99.99 is 4.
For alphanumeric fields, these rules about data length apply:
•
The length of the data in the edit picture must be less than or equal to the length of
the field.
•
The length of the data in the edit picture must be greater than 0.
For numeric fields, these rules apply:
•
The length of the data to the left of the decimal point in the edit picture must be
less than or equal to the length of the field to the left of the decimal point.
•
The length of the data to the right of the decimal point in the edit picture must be
less than or equal to the length of the field to the right of the decimal point.
•
The length of the data in the edit picture must be greater than 0.
The maximum length of data in an EDIT-PIC clause is 32,767 bytes.
If an EDIT-PIC clause overrides an inherited edit picture, the edit picture specified in
the clause must conform to the type of the referenced definition.
If an EDIT-PIC clause contains an invalid edit picture, the DDL compiler generates an
error message and does not add the definition to the dictionary.
You cannot use an EDIT-PIC clause for data types not supported by COBOL.
Note. The DDL compiler ignores this clause when generating host-language source code.
EDIT-PIC edit-picture-string