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
 

 

Getting the data through CICS Retrieve

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

New User


Joined: 14 Nov 2007
Posts: 70
Location: mumbai

PostPosted: Thu Mar 11, 2010 6:49 pm    Post subject: Getting the data through CICS Retrieve
Reply with quote

1) I'm passing 32 data fields via SYSIN DD* to a cobol program. Precisely 32 MQ names.
2) I'm accepting the data and performing some processing for each data field. Getting data from each MQ and writing to a New MQ. So all the 32 MQ's data is written to another 32 New MQ's.

Now what I want is..

1) Once all the processing is done like 32 Mq's data has been written to other 32 new MQ's. Task should go to sleep for 10 mins, and then again restart.. get those 32 MQ names which we had accepted and do the same data movement acitvity.

So my problem and questions is how to save those 32 MQ name and retrieve it. Also how to invoke the same program after 10 mins.

Biru
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Thu Mar 11, 2010 6:58 pm    Post subject:
Reply with quote

Check the CICS Language Reference and Programming Guide manuals (link at the top of the page) for interval controlled START to start up again in 10 minutes. You can use a TS queue, among other ways, to save your data and retrieve it.
Back to top
View user's profile Send private message
beruoist

New User


Joined: 14 Nov 2007
Posts: 70
Location: mumbai

PostPosted: Thu Mar 11, 2010 7:30 pm    Post subject:
Reply with quote

Robert Sample wrote:
Check the CICS Language Reference and Programming Guide manuals (link at the top of the page) for interval controlled START to start up again in 10 minutes. You can use a TS queue, among other ways, to save your data and retrieve it.


Thanks Robert for moving it in appropriate section.

Can we store those 32 MQ names to an Array..suppose ws-array

And then set the interval time as below

EXEC CICS START TRANSID(XXX1)
INTERVAL(1000)
FROM (WS-ARRAY)
LENGTH (SOME-LENGTH)
TERMID (AB11)
REQIDD (?????-NOT SURE ABT THIS,IS THIS MANDATORY)
END-EXEC.

Then retrieve the data like this

EXEC CICS RETRIEVE
INTO (WS-ARRAY)
LENGTH(SOME-LENGTH)
END-EXEC.

Please advice.

Thanks
Beru
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Thu Mar 11, 2010 7:45 pm    Post subject:
Reply with quote

Request ID is not a required field for START -- CICS will generate one if you don't specify a unique value.

Normally, interval started tasks do not run attached to a terminal -- what happens if the terminal is not available when CICS attempts to start the task?

Although it's been a while since I've done this, I believe you've got the syntax correct (but until you test to make sure you're getting the data correctly, I would be cautious).

I would also start using RESP to capture the response codes -- this makes debugging so much easier!
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1232
Location: Israel

PostPosted: Thu Mar 11, 2010 8:17 pm    Post subject: Re: GETTING THE DATA USING CICS RETRIEVE
Reply with quote

beruoist wrote:
1) I'm passing 32 data fields via SYSIN DD* to a cobol program.
under CICS ?

Your program will need to know from where to get the names: from the input file (first execution) or from the RETRIEVE (restarted tasks).
This can be easily achieved by using ASSIGN STARTCODE or even by using 2 transaction names for the same program.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Mar 11, 2010 9:33 pm    Post subject: Reply to: Getting the data through CICS Retrieve
Reply with quote

You could write a PLTPI program, which gets invoked at 3rd-stage of startup, where you can hard-code your 32-entries in WS and issue a START of the target Transid (non-terminal attached), passing the 32-entries group-level in the FROM keyword, specifying (as a failsafe) a one-minute interval or perhaps, 30 seconds. Note that any data specified in the FROM keyword is automatically written to the CICS/TS Temporary Storage Dataset "DFHTEMP". This should not pose a problem.

Two other alternatives (instead of the WS approach) would be to define these entries to a User Data-Table or to an External Assembler CSECT. Using these two methods (for the most part) would all but eliminate program changes as changes would only be necessary to the Data-Table or CSECT.

When CICS is given control, the Transid will automatically be invoked and the program associated with the Transid would issue a RETRIEVE of this data into a WS area. Then, do what you need to do and restart the Transid with a 10-Minute interval, passing the previously RETRIEVED data in the FROM keyword of this new deferred task.

Marso's suggestion to verify the STARTCODE (via the ASSIGN API) is a good idea as well as to check if EIBTRMID is other than LOW-VALUES.

The STARTCODE value in this case should only equal 'SD'. If other than this value, terminate the task. Same holds true for task termination when EIBTRMID not = LOW-VALUES.

You may also want to obtain the CICS Default Userid from the INQUIRE SYSTEM API and use this value in all START commands of this Transid, via the USERID keyword. In doing this, the TERMID keyword cannot be used.

Stay clear (as in very far away) from using SYSIN DD * in CICS. You'll be glad you did.... icon_wink.gif

Bill
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 copying data without knowing location arunsoods DFSORT/ICETOOL 5 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 16 Thu Jul 13, 2017 2:11 pm
No new posts How to Clear all TSQs during CICS sta... Hooman24 CICS 10 Mon Jun 26, 2017 9:46 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am


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