Previous Topic: Rules for Coding Embedded SQLNext Topic: Coding Embedded SQL in COBOL


Additional Assembler Requirements

When you embed SQL statements in an Assembler program, the program must provide an area of SQLDSIZ and establish addressability by using the DSECT SQLDSECT. Both SQLDSIZ and SQLDSECT are generated by the Preprocessor.

SQLDSECT

is a DSECT of the storage areas which are required for SQL use.

SQLDSIZ

is a fullword where the value is the length required for storage used by SQL. SQLDSIZ is variable in size according to the type and number of SQL statements, the number of host variables, and whether the SQLCA is generated separately. The area must be initialized to binary zeros prior to the first call for SQL.

In Assembler, registers 0, 1, 14, and 15 are used in generated code. Do not rely on their contents being consistent where code has been generated.