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: 988
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: 1609
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
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts CICS NEW SIT PARAMETERS CICS BEHAVIOR... Kyle Carroll CICS 0 Fri Nov 04, 2016 11:55 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts CICS VSAM RLS READ akodakka CICS 3 Tue Oct 04, 2016 3:09 pm


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