HP DDL D40 Reference Manual page 122

Data definition language
Table of Contents

Advertisement

Definition Attributes
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:
Entry-sequenced files
Key-sequenced files
Relative files
Unstructured files
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:
Language
C
FORTRAN
Pascal
TACL
pTAL or TAL
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
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
types generated from DDL PICTURE clauses.
Data Definition Language (DDL) Reference Manual—426798-002
4,072 bytes
4,062 bytes
4,072 bytes
4,096 bytes
Output
char name[20]
CHARACTER*20
FSTRING (20)
STRUCT name: BEGIN CHAR BYTE (0:19); END;
STRUCT name: BEGIN STRING BYTE [1:20]; END;
Translation, contains a table showing the C data types
Translation, contains a table showing the COBOL data
6- 28
PICTURE Clause

Advertisement

Table of Contents
loading

Table of Contents