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
 

 

Scheduling a CICS transaction like a BATCH jobs

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

Senior Member


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

PostPosted: Mon Apr 09, 2012 7:50 pm    Post subject: Scheduling a CICS transaction like a BATCH jobs
Reply with quote

Hello,

Are there any ways of scheduling CICS transactions in the system like batch jobs??

Like in a batch jobs we can have dependency on each other likely can we achieve the same for CICS transactions??
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7912
Location: Bellevue, IA

PostPosted: Mon Apr 09, 2012 8:16 pm    Post subject:
Reply with quote

The basic concept of CICS is a transactional system -- someone enters data into a terminal, which is used to update a file / database, or generate a report, or otherwise accomplish some LIMITED task. Batch jobs are used to handle larger groups of data, such as .. a batch. The batch may have been entered via CICS and stored in a file, but the batch processing approach is radically different from a transaction approach.

While a CICS transaction can start another transaction, any dependencies in the system are built in via use of enqueue / dequeue or other such mechanisms and must be developed individually for each application.

Perhaps if you describe what you want to do, and not how you want to do it, we will have better suggestions.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


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

PostPosted: Mon Apr 09, 2012 8:58 pm    Post subject:
Reply with quote

Thanks you Robert.
You are correct, but my requirement is I have 5 transactions which needs to be scheduled one after another.
I have KAI0,KAI1,KAI2,KAI3,KAI4 now my question is I want to schedule KAI0 first( without writing a program) then once KAI0 is finished the subsequent transaction should start..
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7912
Location: Bellevue, IA

PostPosted: Mon Apr 09, 2012 9:07 pm    Post subject:
Reply with quote

Add code to KA10:
Code:
EXEC CICS START TRANSACTION('KA11')
...
just before KA10 ends, and do the same for the others.

In general, scheduling mechanisms for CICS transactions don't really exist on mainframes (at least not in the batch job sense) since any given CICS transaction can be started from any given CICS terminal -- and the same transaction could be executing from 2 ... 20 ... 1200 terminals AT THE SAME TIME. There may be some way to do what you want at your site, but it would be something specific to your site and would require you to talk to someone at your site to find out for sure. Otherwise, you have to code the programs to start the next transaction when the current one is complete. If you don't want to make code changes, then your best bet is to give up on the whole idea or use batch jobs that can be scheduled.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


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

PostPosted: Mon Apr 09, 2012 9:26 pm    Post subject:
Reply with quote

Thanks for your suggestion.
But How would I be able to check the completion code for KAI0( my very first transation) or using START how to set dependency on subsequent transaction.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7912
Location: Bellevue, IA

PostPosted: Mon Apr 09, 2012 9:58 pm    Post subject:
Reply with quote

Transactions do not have completion codes. Usually, either they complete normally or they abend. The various transactions can pass data by using temporary storage queues, or writing / reading records in a VSAM file.

I think your concept of a CICS transaction is fundamentally flawed. Transactions are NOT coded to depend upon other transactions completing normally, or if they are then the completing transaction starts the next one; when the second finsihes it starts the third one (and so forth). It sounds like you are thinking of having a single series of transactions to execute in sequence -- but remember your transaction can be started by EVERY TERMINAL IN THE CICS REGION, so potentially there could be thousands of executions of your transactions, even at the same time. Your code must allow for this and handle it.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Apr 09, 2012 10:15 pm    Post subject:
Reply with quote

Hello,

Why does someone believe this "requirement" should involve scheduling CICS transactions?

This sounds like the classic case of scheduling multiple batch processes to run in a series.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


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

PostPosted: Tue Apr 10, 2012 2:02 am    Post subject:
Reply with quote

Just did not think of this either before.

Thanks everyone.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


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

PostPosted: Tue Apr 10, 2012 2:15 am    Post subject:
Reply with quote

Also just to updates on this..below is the info I got more on this but I am not aware of any external scheduler:
"From an external scheduler, issue the console command MODIFY
cics_jobname,txid. Note that this way the specified transaction will
run under the userID of the scheduler, so that userID must have READ
permission to the RACF profile that protects the transaction. If the
program itself then issues its own START TRANSID(txid) INTERVAL(hhmmss)
before terminating, the external scheduler need do nothing more unless
CICS gets restarted. If not, the scheduler will need to re-issue the
MODIFY command at the desired intervals.

You could also do this with CICSPlex System Manager (CPSM), but I can't
offer any advice for that method (yet)."
Back to top
View user's profile Send private message
Peter cobolskolan

Active User


Joined: 06 Feb 2012
Posts: 104
Location: Sweden

PostPosted: Tue Apr 10, 2012 11:34 am    Post subject: Reply to: Scheduling a CICS transaction like a BATCH jobs
Reply with quote

If you just create a small COBOL Batch program that uses the External CICS Interface (EXCI) to Exec CICS Link to the different programs associated with the transactioncodes, you have a simple solution. You also ensure the programs run in sequence, and not in parallell, which would/could be the case if you just kick off some Exec CICS Start commands.
Your Batch scheduling tool could start the batch program at desired intervals.
Back to top
View user's profile Send private message
Peter cobolskolan

Active User


Joined: 06 Feb 2012
Posts: 104
Location: Sweden

PostPosted: Tue Apr 10, 2012 2:28 pm    Post subject: Reply to: Scheduling a CICS transaction like a BATCH jobs
Reply with quote

If you want to keep the solutions to "only CICS", you can write a program that fires off the Exec CICS Start Transid() (s) you need. Before this program terminates, is should issue a Exec CICS Start Transid(EIBTRNID) Interval(timeinterval) just to schedule the restart of the itself at an interval you specify. To have the program started automatically at CICS startup, create a Program List Table (DFHPLTxx) whith an entry for your program. Add a CICS startup SIT-parameter, PLTPI=xx, and the program gets started every time you start CICS, and repeats firering off the transactions after an interval you have set in the Start.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


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

PostPosted: Tue Apr 10, 2012 9:14 pm    Post subject:
Reply with quote

Perfect Peter.
I was looking out something like this only.

Thanks a ton to all !!
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 CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am
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
This topic is locked: you cannot edit posts or make replies. MIPS reduction for Batch job Virendra Shambharkar All Other Mainframe Topics 8 Mon Nov 07, 2016 4:02 pm
No new posts CICS NEW SIT PARAMETERS CICS BEHAVIOR... Kyle Carroll CICS 0 Fri Nov 04, 2016 11:55 pm


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