13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

530 How and When Connections Are Made 4 Chapter 16programs to connect to DB2 and to use DB2 <strong>for</strong> SQL statements and commands.<strong>SAS</strong>/<strong>ACCESS</strong> Interface to DB2 under z/OS uses the attachment facilities to establishand control its connections to the local DB2 subsystem. DB2 allows only one connection<strong>for</strong> each task control block (TCB), or task. <strong>SAS</strong> and <strong>SAS</strong> executables run under oneTCB, or task.The DB2 LIBNAME statement enables <strong>SAS</strong> users to connect to DB2 more than once.Because the CAF and RRSAF allow only one connection per TCB, <strong>SAS</strong>/<strong>ACCESS</strong>Interface to DB2 under z/OS attaches a subtask <strong>for</strong> each subsequent connection that isinitiated. It uses the ATTACH, DETACH, POST, and WAIT assembler macros to createand communicate with the subtasks. It does not limit the number of connections/subtasks that a single <strong>SAS</strong> user can initiate. This image illustrates how the DB2engine works.Display 16.1Design of the DB2 EngineHow and When Connections Are Made<strong>SAS</strong>/<strong>ACCESS</strong> Interface to DB2 under z/OS always makes an explicit connection tothe local DB2 subsystem (SSID). When a connection executes successfully, a thread toDB2 is established. For each thread’s or task’s connection, DB2 establishesauthorization identifiers (AUTHIDs).<strong>SAS</strong>/<strong>ACCESS</strong> Interface to DB2 under z/OS determines when to make a connection toDB2 based on the type of open mode (read, update, or output mode) that a <strong>SAS</strong>application requests <strong>for</strong> the DB2 tables. Here is the default behavior:3 <strong>SAS</strong>/<strong>ACCESS</strong> Interface to DB2 under z/OS shares the connection <strong>for</strong> all openingsin read mode <strong>for</strong> each DB2 LIBNAME statement3 <strong>SAS</strong>/<strong>ACCESS</strong> Interface to DB2 under z/OS acquires a separate connection to DB2<strong>for</strong> every opening in update or output mode.You can change this default behavior by using the CONNECTION= option.Several <strong>SAS</strong> applications require <strong>SAS</strong>/<strong>ACCESS</strong> Interface to DB2 under z/OS to querythe DB2 system catalogs. When this type of query is required, <strong>SAS</strong>/<strong>ACCESS</strong> Interfaceto DB2 under z/OS acquires a separate connection to DB2 in order to avoid contentionwith other applications that are accessing the DB2 system catalogs. See “AccessingDB2 System Catalogs” on page 532 <strong>for</strong> more in<strong>for</strong>mation.The DEFER= LIBNAME option also controls when a connection is established. TheUTILCONN_TRANSIENT= also allows control of the utility connection—namely,whether it must stay open.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!