SQL/MP Programming Manual for COBOL85

Memory Considerations
HP NonStop SQL/MP Programming Manual for COBOL85429326-004
B-2
Avoiding Name Conflicts
of the same program could show different memory sizes. This difference reflects the
dynamic memory management provided by SQL/MP.
The COBOL85 compilers initialize all the pointers in the SQLINALL structure in the
SQL-INIT section, which the compilers writs at the end of the source program. To
initialize the pointers, the compiles insert a call to the SQLADDR procedure.
Avoiding Name Conflicts
In a COBOL program, avoid using names that conflict with the names in the internal
SQL data structures. The section names generated by the COBOL85 compilers in your
program are SQLDO-n (where n is an integer) and SQL-INIT. These examples show
the names used in internal SQL structures.
SQLINALL Structure
The SQLINALL structure is shown in the next example. The COBOL85 compiler
generates an SQLINn substructure for each SQL statement that causes a call to the
SQL executor.
01 SQLINALL-T9192-TANDEM.
05 STMT-PROCEDURE-ID PIC X(32) VALUE "proc-name".
05 SQLINIT-FLAG PIC S9(4) COMP VALUE -1.
05 SQLINn
10 EYE-CATCHER PIC X(2) VALUE "IN".
10 VERSION PIC S9(4) COMP VALUE 0.
10 SLT-INDEX PIC S9(4) COMP VALUE index.
10 PROCEDURE-ID PIC X(32) VALUE "proc-name".
10 USER-LINE-NUMBER PIC S9(9) COMP VALUE line.
10 STMT-PROCEDURE-ID-PTR PIC S9(9) COMP VALUE -999999.
10 SRCFILE-PTR PIC S9(9) COMP VALUE -999999.
10 OPCODE PIC S9(4) COMP VALUE opcode.
10 FLAGS PIC S9(4) COMP VALUE 0.
10 P-CKSUM PIC S9(4) COMP VALUE 0.
10 IOVAR-CKSUM PIC S9(9) COMP VALUE 0.
10 IVARS-PTR PIC S9(9) COMP VALUE -999999.
10 OVARS-PTR PIC S9(9) COMP VALUE -999999.
10 SQLSA-PTR PIC S9(9) COMP VALUE -999999.
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).