Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 28
PICTURE Clause
•
The only symbol you can specify in a national picture string is N or n (except for
the parentheses and a number to specify the length, or number of repetitions).
•
The maximum length you can specify for a national data item is half of the
maximum internal field length. For definitions, the maximum internal field length is
32,767 bytes. For records, the maximum length depends on the file type:
For example, PIC N(16383) specifies the maximum length allowed for a field
definition.
•
Only COBOL85 output for a national data item appears as defined in DDL. For
other host-language output, DDL generates the equivalent number of characters.
For example, PIC N(10) in DDL translates to the following:
PICTURE Clause Guidelines for C
Consider the following guidelines when generating C source code:
•
DDL translates alphanumeric and numeric PICTURE clauses, except numeric
clauses described with USAGE IS COMP, into C char types. DDL translates
numeric PICTURE clauses with USAGE IS COMP into C
short
,
long
,
double
,
and
long long
types.
•
Appendix C, DDL Data Translation
, contains a table showing the C data types
generated from DDL PICTURE clauses.
PICTURE Clause Guidelines for COBOL
Consider the following guidelines when generating COBOL source code:
•
DDL PICTURE clauses are translated into COBOL PICTURE clauses.
•
For a national picture string, DDL generates COBOL output as specified in the
PICTURE clause.
•
Appendix C, DDL Data Translation
, contains a table showing the COBOL data
types generated from DDL PICTURE clauses.
Entry-sequenced files
4,072 bytes
Key-sequenced files
4,062 bytes
Relative files
4,072 bytes
Unstructured files
4,096 bytes
Language
Output
C
char
name
[20]
FORTRAN
CHARACTER*20
Pascal
FSTRING (20)
TACL
STRUCT
name
: BEGIN CHAR BYTE (0:19); END;
pTAL or TAL
STRUCT
name
: BEGIN STRING BYTE [1:20]; END;