IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

LINK , START, ATI control returns


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kiraj

New User


Joined: 27 Sep 2012
Posts: 9
Location: India, Bangalore

PostPosted: Fri Aug 09, 2013 9:29 pm
Reply with quote

Hi,

I have the below scenario:

Program A LINKS program B; B initiates transaction XYZ through START command; XYZ initiates another transaction PQR through TDQ;

Now i need the control back in program B after the START command.

In above function, i make use of CHANNEL and CONTAINER. The CHANNEL is created in program A and referred in program B and XYZ transaction. I need to create the output CONTAINER in PQR transaction which needs to be passed to program B and back to program A.

How i can get the control back in program B?


Regards,
Kiran
Back to top
View user's profile Send private message
Mariraj

New User


Joined: 09 Jul 2007
Posts: 59
Location: Chennai

PostPosted: Sat Aug 10, 2013 12:18 am
Reply with quote

If you issue START from PROG B, a new task is started and you cannot return control to the initiating task(i.e PROG B) after the completion of the new task. If you want to pass data from PQR transaction to PROG A, then you can consider doing the following.
1. In PROG B after starting XYZ, return the control to PROG A.
2. End PROG A.
3. In PQR transaction, start the transaction corresponding to PROG A and pass the necessary channel information.
Back to top
View user's profile Send private message
kiraj

New User


Joined: 27 Sep 2012
Posts: 9
Location: India, Bangalore

PostPosted: Sat Aug 10, 2013 11:36 am
Reply with quote

There is conflict in your statement.

1. How do i return the control to PROG A when already new task is initiated by PROG B via START command.?

My scenario is to receive the inbound request and send the outbound request in same path.

I need the output created by PQR to be sent to program B and return the control to program A ( PROG B which was called via LINK).


Regards,
Kiran
Back to top
View user's profile Send private message
Peter cobolskolan

Active User


Joined: 06 Feb 2012
Posts: 104
Location: Sweden

PostPosted: Sat Aug 10, 2013 11:48 am
Reply with quote

What you are looking for cant be done with the original design. The Start and the Writeq TD creates asyncronous tasks which run independently of the ProgA/B. You have to change your design completely.
There is no simple answere how to redesign as we dont know the reason why the Start and the TD trigger are there initially.
Back to top
View user's profile Send private message
kiraj

New User


Joined: 27 Sep 2012
Posts: 9
Location: India, Bangalore

PostPosted: Sat Aug 10, 2013 12:15 pm
Reply with quote

Yes i agree that there is asynchronous tasks with START and TD transaction.

Existing system goes like below:
1. We have separate inbound and outbound path created.
2. Here also we have separate TDQ driven transactions for inbound and outbound.

New design:
1. We need to replace the existing (one of the component) with cics web service.
2. The flow is designed in such a way that inbound and outbound should commence and exit in same path. (that is what i described the scenario in my first post).

Even i am finding difficulties to incorporate the changes for the new system which is approved by system admin.


Please let me know how can i go ahead with this scenario.
Back to top
View user's profile Send private message
Peter cobolskolan

Active User


Joined: 06 Feb 2012
Posts: 104
Location: Sweden

PostPosted: Sat Aug 10, 2013 5:16 pm
Reply with quote

Without going into too much detail, to my opinion, you have to syncronize the different tasks, especially the ProgB-task and the PQR-task.
There are different possibilities using WAIT/POST/CANCEL-commands. One easy solution would be to create an reguest-id and have this id sent to the PRQ-task. In the ProgB you issue a CICS DELAY INTERVAL(relativelylongtime) REQID(thecreatedrequestid).
This makes the ProgB-task wait until time has expired, which it hopefully not will, or until the requestid has ben CANCEL-led by the PRQ-task, which should be done before the program RETURN-s. Information from the PRQ-tast to ProgB could be places on a TS-queue.
Back to top
View user's profile Send private message
kiraj

New User


Joined: 27 Sep 2012
Posts: 9
Location: India, Bangalore

PostPosted: Mon Aug 19, 2013 9:57 am
Reply with quote

Thanks Peter,

I also had the same concept to make use of POST, START, WAIT in Program B and issue the CANCEL request in PQR program. I am making use of CWA to retain the REQID. But PQR task is not recognizing the REQID created in program B. I get EIBRESP = 13 and EIBRESP2 = 1, which is NOT FOUND condition.

I will try with DELAY INTERVAL and update you.

Please let me know what could be the reason for NOT FOUND condition when i use POST, START and WAIT.
Back to top
View user's profile Send private message
Peter cobolskolan

Active User


Joined: 06 Feb 2012
Posts: 104
Location: Sweden

PostPosted: Mon Aug 19, 2013 10:38 am
Reply with quote

I hope you did run CEDX for PQR, just to verify that the REQID was handled correct!?
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Mon Aug 19, 2013 2:37 pm
Reply with quote

kiraj wrote:
Thanks Peter,

I also had the same concept to make use of POST, START, WAIT in Program B and issue the CANCEL request in PQR program. I am making use of CWA to retain the REQID. But PQR task is not recognizing the REQID created in program B. I get EIBRESP = 13 and EIBRESP2 = 1, which is NOT FOUND condition.

I will try with DELAY INTERVAL and update you.

Please let me know what could be the reason for NOT FOUND condition when i use POST, START and WAIT.


I would think it unsafe to use the CWA to store the REQID. If there are multiple instances of the tasks in the system, the REQID will be overwritten and you probably end up POSTing or CANCELling the wrong REQID.

Garry.
Back to top
View user's profile Send private message
colin777

New User


Joined: 06 Jun 2013
Posts: 19
Location: Singapore

PostPosted: Tue Aug 20, 2013 3:18 pm
Reply with quote

The use of the CWA for any reason leads to affinities. Meaning that in a CICSPlex environment where there are 2 or more CICS Application Owning Regions (AOR), the transaction should be able to run in any of the AORs.
The storing of any data in the CWA means it is only available in that AOR, what happens if the transaction runs next in a different AOR?

So what to do? There are alternatives in holding a central piece of data that any region can access.
1) A Queue Owning Region (QOR). So the data is held in a Temporary Stoage Queue that all regions have access to
2) A VSAM ESDS that is owned by a File Owning Region (FOR)
3) A Shared Data Table

Possibly option 3 is preferable and will give you what you want, as long as you know the REQID well before your application needs it.

HTH

Colin777
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts How can i link the RHDCSNON programa ... IDMS/ADSO 2
No new posts Start CICS transaction every day at 2AM CICS 4
No new posts Help Control-R IBM Tools 2
No new posts Try to understand IMS control block IMS DB/DC 0
Search our Forums:

Back to Top