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

Getting the data through CICS Retrieve


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
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
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: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Mar 11, 2010 6:58 pm
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
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: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Mar 11, 2010 7:45 pm
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: 1353
Location: Israel

PostPosted: Thu Mar 11, 2010 8:17 pm
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Mar 11, 2010 9:33 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts Using API Gateway from CICS program CICS 0
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
Search our Forums:

Back to Top