Page 1 of 1

How to get RC from an online program in JCL?

PostPosted: Thu Apr 28, 2011 1:31 am
by aji1234
I am running a job which initiates some transaction and triggers an online program thereby. I get some error code in the program and I can find that code in the CICS log in that region. (does rollback and updates the record again with 00 status). But my intent is that the job needs to get the Return Code of that Online program. I think that is not possible or may be is there any other ways to resolve this?

like checking for SQL code in another step . and If it has 00 status then send RC as 99..??

Please suggest.
Thanks,
Ajit

Re: How to get RC from an online program in JCL?

PostPosted: Thu Apr 28, 2011 9:28 pm
by Suny
Hi,

If you use CICS Abend calls for all you abend conditions, it transferres the control to Abend routine which produces the dump you see. It depend on how you handle your abend state. Instead of using CICS abend command you can return your program to whatever batch program has called it and pass on the return code of any function that produced this error. If you called this from a Batch Job, batch program can handle this return code and abend your program.

Disclaimer: I have never done or even tried such a thing.

Re: How to get RC from an online program in JCL?

PostPosted: Thu May 26, 2011 11:22 am
by aji1234
Hi Suny,

Thanks for your reply. But I could not implement that method.
Instead in the JCL
1->Batch program
2->Scheduler which initiates the transaction based on the input parameters also that online program writes a queue and file.
3->data read by a batch program from the file.
4->batch program - here the data which is checked for its status and depending on the status RC is sent and printed to spool.

Regs,
Ajit