SQL/MP Programming Manual for COBOL

Host Variables
HP NonStop SQL/MP Programming Manual for COBOL529758-003
2-9
Using COBOL Data Description Clauses
Using COBOL Data Description Clauses
The next table summarizes the COBOL data description clauses and their
interpretation by SQL/MP when they are used in host variable declarations. SQL/MP
does not support the COBOL special names option DECIMAL POINT IS COMMA.
Using Date-Time and INTERVAL Data Types
The SQL date-time and INTERVAL data types that you can use in host variable
declarations are:
COBOL Description SQL/MP Host Variable Interpretation
BLANK The clause is ignored.
data-name Any data name is allowed, including an SQL reserved word.
Specific hyphenation rules apply.
FILLER The clause is ignored.
JUSTIFIED The clause is not allowed. However, it can appear in an entry
already being ignored, such as REDEFINES.
level number Any number is allowed. Entries with the level number 66 or 88
are ignored.
OCCURS The clause is not allowed. However, it can appear in an entry
already being ignored, such as REDEFINES.
PICTURE The clause must be consistent with the PICTURE clause rules
for host variables.
REDEFINES The clause is ignored.
SIGN No restrictions apply, and the appropriate conversion for SQL
data types is made.
SYNC The clause is ignored.
USAGE The USAGE options correspond to these SQL data types:
COMPUTATIONAL (COMP) or BINARY to SQL type
NUMERIC or to an integer type (SMALLINT, INTEGER, or
LARGEINT).
DISPLAY to character (for PIC X) or decimal (for PIC 9).
The INDEX and PACKED-DECIMAL options are not
allowed.
VALUE The clause is ignored.
Data Type Description
DATETIME Represents a date and time from year to microsecond (logical subsets,
such as MONTH TO DAY, are allowed)
DATE Represents a date and is equivalent to DATETIME YEAR TO DAY