Concurrent Session Identifier
When a session begins, CA IDMS assigns an identifier to the session and maintains the session identifier internally. All SQL statements implicitly reference the session identifier during execution.
If there are multiple concurrent sessions, each session has its own session ID. To manage multiple sessions, an application must manipulate the session identifier directly.
Data Declaration Requirements
To manipulate the session identifier, the program must first:
When the program begins an SQL session, CA IDMS returns the session identifier to the SQLSESS host variable that the program has defined. The program must save the SQLSESS value of each concurrent session.
How CA IDMS Uses the SQLSESS Variable
If the program declares an SQLSESS host variable, all calls to CA IDMS pass the SQLSESS host variable as a parameter to indicate the session to which the SQL statements should be directed.
CA IDMS does not alter the session ID value in this parameter unless the statement being executed terminates the session (that is, on a COMMIT, RELEASE, or ROLLBACK RELEASE). If the session is terminated, CA IDMS initializes the SQLSESS host variable.
What the Program Must Do
Before executing an SQL statement, the application must ensure that the correct session ID value has been moved to the SQLSESS host variable.
Copyright © 2013 CA.
All rights reserved.
|
|