View previous topic :: View next topic
|
Author |
Message |
vyasricha
New User
Joined: 17 Mar 2008 Posts: 27 Location: banaglore
|
|
|
|
I need to set the return code of the step as 4 if I have a field name 'CCCC' in the file in any of the records in the columns 1 to 4.
If this is the input file
AAAABBBB
CCCCDDDD
DLJFDLJFDLJFDLFJDL
NFEOJNFFJDKUOENMNKGNKLJ
as CCCC exists from 1 to 4, return code of the step should be 4.
The input file is of variable length varying from 10 to 80.
Thanks |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
Basically, do a copy with an include for the 'CCCC' and output to a dummy file. Set the return code to 4 if the output is not zero. |
Actually, that Smart DFSORT Trick is for COUNT, not COPY. You don't need to output to a dummy file because COUNT doesn't use an output file.
You just need to have USING(CTL1) with the INCLUDE statement in //CTL1CNTL. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Frank Yaeger wrote: |
Actually, that Smart DFSORT Trick is for COUNT, not COPY. |
My bad, I'll be more careful next time...... |
|
Back to top |
|
|
vyasricha
New User
Joined: 17 Mar 2008 Posts: 27 Location: banaglore
|
|
|
|
I have applied the above solution but one more doubt
//STEP100 EXEC PGM=ICETOOL
//TOOLIN DD *
COUNT FROM(IN) NOTEMPTY USING(CNT1) RC4
//CNT1CNTL DD *
INCLUDE COND=(1,4,CH,EQ,C'CCCC')
//*
// IF STEP100.RC = 4 THEN
//STEP200 EXEC PGM=ICETOOL
//IN DD DSN=CG83.NAEC.WRK.EXT830.MACK.MAR15T,DISP=SHR
//TOOLIN DD *
SORT FROM(IN) TO(OUT) USING(CTL1)
...
....
//*
// ENDIF
If the character CCCC are present in the input file return code of s100 is 4, if that is 4 we will execute s200.
But the final return code of the JCL is also 4. but i want it to be zero in any case
How to make the JCL return code as zero. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
The final return code for the job is the highest return code for any step, that's the way it is just accept it. |
|
Back to top |
|
|
vyasricha
New User
Joined: 17 Mar 2008 Posts: 27 Location: banaglore
|
|
|
|
that is fine,
but how to make the return code as zero now |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
that is fine,
but how to make the return code as zero now |
It appears that you did not understand the previous reply. . .
When any step in a job sets a non-zero return code, the return code for that step or the entire job can never be reset to zero. Once set, it cannot be "un-set". |
|
Back to top |
|
|
vyasricha
New User
Joined: 17 Mar 2008 Posts: 27 Location: banaglore
|
|
|
|
OK.. Thanks,
I thought there might be some way to reset the return code of a step after that step got executed. So, that we can make the return code of the jcl to 0. |
|
Back to top |
|
|
|