SQL/MP Programming Manual for COBOL

Memory Considerations
HP NonStop SQL/MP Programming Manual for COBOL529758-003
B-3
Avoiding Name Conflicts
If the compiler cannot determine the procedure name, PROCEDURE-ID is replaced by
this declaration, and the executor provides the name later.
10 BVARS-PTR PIC S9(9) COMP VALUE -999999.
10 FILLER PIC X(27).
SQLVARS Structure
If the SQL statement contains input or output host variables, the HP COBOL compiler
creates an SQLVARSnI structure for each input variable and an SQLVARSnO structure
for each output variable:
05 SQLVARSn{I|O}.
10 EYE-CATCHER PIC X(2) VALUE "D1".
10 NUM-ENTRIES PIC S9(4) COMP VALUE num-entries.
10 VARSn.
15 DATA-TYPE PIC S9(4) COMP VALUE datatype.
15 DATA-LEN NATIVE-2 VALUE length.
15 PRECISION PIC S9(4) COMP VALUE precision.
15 NULL-INFO PIC S9(4) COMP VALUE null-flag.
15 VAR-PTR PIC S9(9) COMP VALUE -999999.
15 IND-PTR PIC S9(9) COMP VALUE -999999.
15 CPRL-PTR PIC S9(9) COMP VALUE -999999.
15 RESERVED PIC S9(9) COMP VALUE -1.
For a host variable with a numeric, date-time, or interval data type, DATA-LEN is
replaced by this declaration:
15 DATA-SCALEN PIC S9(4) COMP VALUE length.
Depending on the data type of the host variable, the DATA-SCALEN data item has
these values:
For a host variable with a character, date-time or interval data type, PRECISION has
these values:
Data Type of Host Variable Value of DATA-SCALEN
Numeric Byte 1: scale
Byte 2: length
Date-time or interval Byte 1: Date-time qualifier
Byte 2: length
Data Type of Host Variable Value of PRECISION
Numeric Zero (0)
Date-time or interval Byte 1: leading field precision
Byte 2: fractional precision
Character Character set ID