Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

CICS ENQ RESOURCE - Multiple Tasks - How sequencing done

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
mak_tcs

New User


Joined: 23 Nov 2005
Posts: 69
Location: Minneapolis, MN USA

PostPosted: Fri Jul 17, 2015 2:29 pm    Post subject: CICS ENQ RESOURCE - Multiple Tasks - How sequencing done
Reply with quote

Hi All,

I have multiple CICS tasks triggered from an external party and I need to processes them in sequence. Let's say TASK1 & TASK2 are triggered, I process them sequentially using Global ENQ as given below

EXEC CICS
ENQ RESOURCE (WS-ENQ-KEY)
LENGTH (WS-ENQ-KEY-LNTH)
NOHANDLE
TASK
END-EXEC

It may happen so that TASK2 reaches my server before TASK1 but I have to process TASK1 first before TASK2.

I am thinking of the below approach to fix this issue:
1. TASK2 got ENQ'd and TASK1 is waiting
2. In TASK2, check if TASK1 already executed.
3. If TASK1 not executed still, then issue DEQ and issue ENQ again (coded inside Task2)

My expectation is that when I DEQ, TASK2 is DEQ'd (but not over yet) and TASK1 will get ENQ'd and gets completed. TASK2 will get processed once TASK1 is over.

Please post your opition and revert if you have a better solution.

Thank you.
Back to top
View user's profile Send private message

Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 992
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Fri Jul 17, 2015 4:30 pm    Post subject:
Reply with quote

How do you know that a given TASK1 relates to a given TASK2 ?
What time could elapse between a given TASK2 arriving and its associated TASK1 arriving (where they arrive out of sequence) and how do propose to handle an excessive time interval? The same applies where TASK1 arrives and is processed but TASK2 never arrives or arrives too late.
Can there be multiple sets of TASK1 and TASK2 interleaved?

Garry
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1677
Location: NY,USA

PostPosted: Fri Jul 17, 2015 8:11 pm    Post subject:
Reply with quote

Hi,

Correct the source, why is task2 is coming up early then task1 ? should this not be listed as a part of your requirement? is it a bug?

Quote:
3)If TASK1 not executed still, then issue DEQ and issue ENQ again (coded inside Task2)


What is the interval between these two tasks? what if task1 doesn't comein given interval ? what happens to task2?

So it is a FIFO, ask an external party to correct this issue.

How big is the commarea? if you have a DB2 then save them else save it on a file or TSQ. Now using START you can trigger a process which will read this tasks and untill task1 and task2 or only task1 is found execute it otherwise find what is time interval you want to wait for task1 and if it does not come then rollback task2 and inform your third party about why task1 is missed?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts CICS Transaction Timeout Hooman24 CICS 2 Sun Apr 16, 2017 2:16 pm
No new posts Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us