|
View previous topic :: View next topic
|
| Author |
Message |
junu_j
New User
Joined: 25 Aug 2003 Posts: 2
|
|
|
|
| How can we get the number of running threads of a transaction through a COBOL program??? |
|
| Back to top |
|
 |
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
I know what I mean when I use the word "thread", but I do not know what you mean when you use the word "thread".
Please expand on your request.
And do not double post. |
|
| Back to top |
|
 |
junu_j
New User
Joined: 25 Aug 2003 Posts: 2
|
|
|
|
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. |
|
| Back to top |
|
 |
TG Murphy
Active User
Joined: 23 Mar 2007 Posts: 148 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. |
|
| Back to top |
|
 |
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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..... |
|
| Back to top |
|
 |
|
|