Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 12
JUSTIFIED Clause
HELP Clause Examples
The following example illustrates two ways of continuing help text for a field. The first
text string is continued with a comma; the second text string is continued without a
comma.
DEF address HELP "This is a four-field",
"address consisting of street,"
"city, state code, and ZIP code.".
02 street PIC X(30).
02 city PIC X(20).
02 state PIC X(2).
02 zip PIC X(5).
END
If the same help text is used frequently, you can define a constant containing the help
text and then use the constant name in the DEFINITION statement; for example:
CONSTANT mdy-date-display VALUE IS "M<99/99/99>".
CONSTANT mdy-date-help VALUE IS "date format: mm/dd/yy".
DEF mdy-date PIC 9(6) DISPLAY mdy-date-display
HELP "Enter date as", mdy-date-help.
You can combine a help text string with a constant in the same DEFINITION statement.
JUSTIFIED Clause
The JUSTIFIED clause lets you output the JUSTIFIED RIGHT clause in COBOL
source files.
When emitting language output for COBOL, DDL generates the JUSTIFIED RIGHT
clause verbatim; for language output in C, FORTRAN, Pascal, pTAL, TACL, and TAL,
DDL ignores this clause.
The DDL compiler accepts JUST as an abbreviation for JUSTIFIED
JUSTIFIED Clause Guidelines
The following points are guidelines for using the JUSTIFIED clause:
•
The JUSTIFIED clause can appear only in an alphabetic or alphanumeric
elementary item; it cannot appear in a group item.
•
An elementary item with a JUSTIFIED clause cannot be subordinate to a group
item with a VALUE clause.
•
The JUSTIFIED clause is inheritable.
•
The JUSTIFIED clause cannot be used in conjunction with SQL VARCHAR data.
JUST[IFIED] RIGHT