Version 4.2.5
 —  Database Management System Interfaces  —

NSQ - Environment-Specific Considerations

Natural for SQL/DS can be run in the TP-monitor environment CICS and in z/VSE batch mode.

As all dynamic access to SQL/DS is performed by NDBIOMO, all users of Natural for SQL/DS must have RUN privilege on the package NDBIOMO. If running in static mode, users must also have RUN privilege on all static SQL/DS packages.

This section covers the following topics:


Natural for SQL/DS under CICS

Under CICS, Natural uses the SQL/DS online support to access SQL/DS. Therefore ensure that this attachment is started. If not, the Natural session is abnormally terminated with CICS abend code AEY9, which leads to Natural error message NAT0954 if the Natural profile parameter DU is set to "OFF".

Since Natural for SQL/DS does not issue any explicit CONNECT statements, it takes advantage of the implicit CONNECT facility of the SQL/DS online support.

Under CICS, a Natural program which accesses an SQL/DS table can also be run in pseudo-conversational mode. Then, at the end of a CICS task, all SQL/DS cursors are closed, and there is no way to reposition an SQL/DS cursor when the task is resumed.

To circumvent the problem of CICS terminating a pseudo-conversational transaction during loop processing and thus causing SQL/DS to close all cursors and lose all selection results, Natural switches from pseudo-conversational mode to conversational mode for the duration of a Natural loop which accesses an SQL/DS table.

To enable multiple Natural sessions to run concurrently, all Natural areas are written to the threads just before a terminal I/O operation is executed. When the terminal input is received, storage is acquired again, and all Natural areas are read from the threads.

Top of page

Natural for SQL/DS in z/VSE Batch Mode

An explicit connection to the database must be performed. The sample program DEM2CONN can be used for this purpose. DEM2CONN calls the DB2SERV module with function code "U" which in turn calls the database connect services.

Top of page