ok. I have a Transaction ABCD and i wanted to know the number of instances of that transaction being running in the cics region through a cobol program.
I wanted this number to initiate another transaction.If the number of instances of ABCD running at a time is more i wont initiate the second transaction.
Joined: 23 Mar 2007 Posts: 149 Location: Ottawa Canada
I haven't done this myself so what follows is a best guess:
You would need to use the INQUIRE TASK command. This is an SPI command so you may or may not have access to it. Where I work, we are forbidden from using SPI commands - even though they (CICS Systems programmers) have not restricted our access to it yet.
I believe you can use the INQUIRE command to get a list of tasks that are currently executing and then you can use the INQUIRE command to iterate through each task in this list. The INQUIRE command will return the tran id to you - so you can iterate through the list and count the number of tasks executing your tran id.
Your next step would be to consult the manual to see how to use INQUIRE TASK to do this.
Unless your transaction is conversational, it will be hard to tell since during terminal wait for a non-conversational task, nothing shows....
In that case you might have to scan the aquired terminals looking for next tranid.....