SET Service

The SET call changes the names of the Db2 subsystem and application plan without removing an existing thread and creating a new one.
The SET call provides a means to change the names of the Db2 subsystem and application plan without incurring the overhead of removing an existing thread and creating a new one. The referenced thread must be in IDLE state when the SET service is requested. If the application thread is either connected or open, the SET statement fails.
>>--SET---+----------------------+----+-------------------------+-----> | | | | +--THREAD(:hv_handle)--+ +--SYSTEM(-+-:hv_dsn-+-)--+ | | +---dsn---+ >---------+----------------------+----------------------------------->< | | +--PLAN(+---plan---+)--+ | | +-:hv_plan-+
After SET completes successfully, you can issue new CONNECT and OPEN requests.
The following is an example of a CAF SET request:
'CAF SET THREAD(:thread) SYSTEM(DSN) PLAN(:plan)'
Where
  • THREAD
    Identifies a REXX variable which contains the thread handle returned by a successful
    ACTIVATE
    or
    CREATE THREAD
    call.
  • SYSTEM
    Identifies the name of the Db2 subsystem to which this thread should connect.
  • PLAN
    Identifies a REXX variable which contains the name of the Db2 application plan to be associated with this thread.