Read 'ReturnCode' from a dataset



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Read 'ReturnCode' from a dataset

Postby ghosts » Thu Mar 28, 2013 8:53 am

Hi,

Description:
I have a job which executes an CICS online program (by a transaction call) and the program puts a code into a PS file.

My challenge:
I want to evaluate the code from previous step (CICS output PS file) and only then execute the next steps in JCL

I hope I put it in a understandable way.

Additional info:
//step01....
//.....
//...
//step05 Execute an online PGM and this puts a code in a PS 'file01'
//*
//step06 evaluate the 'file01' and then execute below steps
//step07.........
//step08.........
//
ghosts
 
Posts: 12
Joined: Fri Mar 22, 2013 5:11 pm
Has thanked: 2 times
Been thanked: 0 time

Re: Read 'ReturnCode' from a dataset

Postby BillyBoyo » Thu Mar 28, 2013 12:53 pm

Well, if I've understood what you want, and what you've done, and the first part is working, then have a new program which reads the PS file, looks at the value, then sets RETURN-CODE (a Cobol Special Register) to an appropriate value. When your program ends, the RETURN-CODE value will be the Condition Code value for the step, which you can test in a subsequent step.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Read 'ReturnCode' from a dataset

Postby dick scherrer » Thu Mar 28, 2013 7:04 pm

Hello,

There may (will?) be a problem when the online and the batch both try to get exclussive control of the PS file . . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Read 'ReturnCode' from a dataset

Postby Monitor » Thu Mar 28, 2013 7:55 pm

The PS-file in CICS is a TD Extra Destination, which can be closed by EXEC CICS SET TDQUEUE() CLOSED before the CICS transaction ends.
Monitor
 
Posts: 98
Joined: Wed Jan 18, 2012 8:59 pm
Has thanked: 0 time
Been thanked: 7 times

Re: Read 'ReturnCode' from a dataset

Postby dick scherrer » Thu Mar 28, 2013 9:39 pm

Hello,

If the batch job specifies OLD, will there not be a problem when CICS tries top open the file for update?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post