View previous topic :: View next topic
|
Author |
Message |
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3051 Location: NYC,USA
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3051 Location: NYC,USA
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3051 Location: NYC,USA
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3051 Location: NYC,USA
|
|
|
|
Just did not think of this either before.
Thanks everyone. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3051 Location: NYC,USA
|
|
|
|
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 |
|
|
Peter cobolskolan
Active User
Joined: 06 Feb 2012 Posts: 104 Location: Sweden
|
|
|
|
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 |
|
|
Peter cobolskolan
Active User
Joined: 06 Feb 2012 Posts: 104 Location: Sweden
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3051 Location: NYC,USA
|
|
|
|
Perfect Peter.
I was looking out something like this only.
Thanks a ton to all !! |
|
Back to top |
|
|
|