SQL Programming Manual for TAL
NonStop SQL Statements and Directives
HP NonStop SQL Programming Manual for TAL—527887-001
3-38
SQLMEM
The SQLMEM directive has this syntax:
USER
causes the TAL compiler to place the SQL data structures in the global area, which
is addressable with 16 bits. Specify USER only if the global area can hold all of the
SQL data structures.
EXT
causes the TAL compiler to place the SQL data structures in the automatic
extended segment. The extended segment is the default if you do not specify the
SQLMEM directive.
If your program uses the EXT option, SQL statements can access data only in the
default extended segment. If your program uses the EXT option and manages
extended segments with the USESEGMENT procedure, you must ensure that the
default extended segment is always visible when SQL statements are executed.
If you need to access data in another extended segment, you can copy the data
needed by the SQL statements to the global area of the user data stack or to the
default extended segment before executing the SQL statement. However, use this
technique carefully, because data is not always accessed when you might expect.
Table 3-3. NonStop SQL Data Structures
SQL Data Structure Generated For Each:
SQLIN SQL statement or directive except::
•
BEGIN DECLARE SECTION and END DECLARE
SECTION directives
•
CONTROL directives
•
INCLUDE directive
•
INVOKE directive
•
WHENEVER directive
•
DECLARE CURSOR statement for static cursors
•
DECLARE CURSOR statement for dynamic cursors
that do not use cursor or statement host variables
SQLIVARS SQL statement that has input host variables
SQLOVARS SQL statement that has output host variables
SQLMEM { USER }
{ EXT }
{ STACK }
{ MAPPED address length }