search cancel

Do CA ADS dialog transfer command sessions extend a session?

book

Article ID: 134533

calendar_today

Updated On:

Products

IDMS IDMS - Database IDMS - ADS

Issue/Introduction

CA ADS dialogs can extend a session using LINK, TRANSFER, or INVOKE. When these are used, does the SQL session that was started in the upper-level 'calling' dialog get extended to the lower-level 'called' dialog? 

Environment

Release : all supported releases

Component : CA ADS & CA SQLOPT

Resolution

 When an upper-level dialog uses the TRANSFER verb to pass control to another dialog, under the covers a FINISH TASK command is issued. That will terminate the session taht was started in the calling dialog, unless a SUSPE$ND SESSION command was issued before the TRANSFER. 

 

The LINK and INVOKE functions do not cause the FINISH TASK command to be issued (marked with the OWAFFIN flag in the ADSOCCTL module). 

 

However, the RETURN function does issue the finish task command. RETURN is used to return to the calling dialog that issued a LINK or INVOKE, so we recommend that you SUSPEND an active SQL session before issuing a LINK or INVOKE command if you want to p[reserve the state of that session so it is available on return from the calling dialog. 

 

This means that with LINK and INVOKE you can extend the SQL session down if you want to, but you can't leave it open when you return to the calling program. So if you want to extend it down, be aware that it won't be returning to you when the subroutine returns control to the calling dialog. 

 

 Having said all that, the Transaction is actually the unit of recovery, and they can be shared across sessions. So if you need to extend a transaction down into a subroutine and have that same transaction be resumed on return to the calling program, I believe you can do that if you have Transaction Sharing on.

Additional Information

Details about managing SQL sessions can be found here: 

https://docops.ca.com/display/IDMS/SQL+Sessions