Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transaction - Program relation

Status
Not open for further replies.

jshankjr

Programmer
Mar 12, 2010
16
0
0
US
Does anyone know where CICS stores information about which programs are associated with which transactions?
 
Program Control Table (PCT)

Code what you mean,
and mean what you code!
But by all means post your code!

Razalas
 
Best way to access that from within a CICS COBOL Program? I need to get, given a Transaction ID from the commarea, the name of the associated program.

Jim
 
Hi Jim,
You can try EXEC CICS INQUIRE TRANSACTION which will give you back the program name.

You need to tell CICS what transaction to start at to begin with. There is a Cobol example here:
I haven't tried it myself, but this would appear to be what you are after.

Marc
 
You will need to set the SP option on the CICS translator to allow use of the SP (sysprogs) interface commands. You can use XOPTS to pass this if you are using a standard proc, or something like Endevor to compile with.

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
Marc, Steve,
That sounds like a viable option, now I've done some reading, the exit that we're looking at using gives us easy access to the transaction number (don't ask why that's hard, it's too painful). For like 90% of our programs, the transaction ID and the program name are identical, but there are some which inexplicably (I'm new here) aren't. So this call should ensure that I can get the proper program name from the CICS tables. I'll continue to investigate along these lines for now.

Thanks,
Jim
 
Hmmmm. . .We compile using CList scripts, I'm going to need to talk to someone else I think.
 
If you have the transaction ID, you don't need to do the start-next-end browse sequence, you can enquire directly. This will be faster and less code.

You can pass the XOPTS as a comment in the first line of the program source, which might save you having to change your compile CLIST.

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
Can one transaction be mapped to multiple programs in that table?

 
No. It's a 'if you get this transaction, then run this program' 1:1 mapping. Occasionally you find that multiple transactions can map on to the same program, (which then looks at EIBTRNID to work out what to do next), but never the other way around.

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top