Page 1 of 1
S0C7 at the first step but the job returns CC=12
Posted: Sun Aug 04, 2024 1:25 pm
by utkarsh
Hi,
I have a cobol db2 program abending in S0C7 at the first step but the job returns CC=12 and continue to run the next step instead of stopping at first step.
Anyone faced this issue?
Re: S0C7 at the first step but the job returns CC=12
Posted: Mon Aug 05, 2024 4:47 pm
by zum13
Hello.
Most of the COBOL/DB2 programs that I have seen running make use of the DSN interface under TSO, i.e. they are invoked like this:
Code: Select all
//STEP1 EXEC PGM=IKJEFT01,REGION=0M
//STEPLIB DD DISP=SHR,DSN=DSNC10.SDSNLOAD
// DD DISP=SHR,DSN=DSNC10.SDSNLOD2
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DSN1)
RUN PROGRAM(MYPROG) PLAN(MYPROG) LIBRARY('MYID.LOADLIB')
END
When an abend occurs, TSO intercepts it. When TSO ends, it gives a return code 12.
To stop your subsequent steps from running, you need to use either COND= or wrap them in IF/ENDIF statements.
Re: S0C7 at the first step but the job returns CC=12
Posted: Tue Aug 06, 2024 4:08 pm
by myoggradio
Man beachte auch
viewtopic.php?t=1859
Es gibt drei Möglichkeiten TSO aufzurufen. Sie unterscheiden sich in der Fehlerbehandlung.
Re: S0C7 at the first step but the job returns CC=12
Posted: Tue Aug 20, 2024 11:22 am
by utkarsh
zum13Hello.
Most of the COBOL/DB2 programs that I have seen running make use of the DSN interface under TSO, i.e. they are invoked like this:
Code: Select all
//STEP1 EXEC PGM=IKJEFT01,REGION=0M
//STEPLIB DD DISP=SHR,DSN=DSNC10.SDSNLOAD
// DD DISP=SHR,DSN=DSNC10.SDSNLOD2
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DSN1)
RUN PROGRAM(MYPROG) PLAN(MYPROG) LIBRARY('MYID.LOADLIB')
END
When an abend occurs, TSO intercepts it. When TSO ends, it gives a return code 12.
To stop your subsequent steps from running, you need to use either COND= or wrap them in IF/ENDIF statements.
Thanks zum13.
Does that mean that all the steps of a JCL would still execute even if the any step gets an abend?
I thought, it would stop as soon as one get the abend?
Re: S0C7 at the first step but the job returns CC=12
Posted: Tue Aug 20, 2024 11:26 am
by utkarsh
Thanks myoggradio. I checked the link and still understanding that.
Re: S0C7 at the first step but the job returns CC=12
Posted: Tue Aug 20, 2024 1:22 pm
by myoggradio
Also lange Rede kurzer Sinn. Benutze IKJEFT1B statt IKJEFT01, dann werden auch Abbrüche von TSO durchgereicht. :-)
Re: S0C7 at the first step but the job returns CC=12
Posted: Wed Aug 21, 2024 2:44 am
by zum13
utkarsh wrote: Tue Aug 20, 2024 11:22 am
Does that mean that all the steps of a JCL would still execute even if the any step gets an abend?
When using IKJEFT01, it's only the abend which occurs within that TSO step which gets caught and turned into a CC 12. Any other program running outside of IKJEFT01 would have their abends handled in the normal way, i.e. the job stops running at that step.
Re: S0C7 at the first step but the job returns CC=12
Posted: Wed Aug 28, 2024 3:15 pm
by utkarsh
zum13
utkarshDoes that mean that all the steps of a JCL would still execute even if the any step gets an abend?
When using IKJEFT01, it's only the abend which occurs within that TSO step which gets caught and turned into a CC 12. Any other program running outside of IKJEFT01 would have their abends handled in the normal way, i.e. the job stops running at that step.
Thanks. This is a great information.
Re: S0C7 at the first step but the job returns CC=12
Posted: Mon Sep 30, 2024 10:07 am
by BobP
So, what should be used as a 'rule', "IKJEFT01" or 'IKJEFT1B '?
And is 'IKJEFT1B' also 'TSO in batch'?
Re: S0C7 at the first step but the job returns CC=12
Posted: Mon Sep 30, 2024 7:08 pm
by zum13
As a rule, it's not a good idea to allow a job step which has failed to go unnoticed and allow subsequent steps to run, particulary in a production job. Running the subsequent steps could potentially cause a more serious problem which is why condition code checks are essential. CC 4 is generally considered a warning and anything higher an error. With the appropriate checks in place, the scheduling software should be able to pick up and highlight any job failures to the operations staff. Whether the job itself stops as the result of an abend in a TSO batch step then becomes irrelevant and which one of IKJEFT01 or IKJEFT1B you use a matter of installation preference. In other words, check which is standard for your site.
Re: S0C7 at the first step but the job returns CC=12
Posted: Thu Oct 03, 2024 10:27 am
by BobP
zoom13As a rule, it's not a good idea to allow a job step which has failed to go unnoticed and allow subsequent steps to run, particulary in a production job. Running the subsequent steps could potentially cause a more serious problem which is why condition code checks are essential. CC 4 is generally considered a warning and anything higher an error. With the appropriate checks in place, the scheduling software should be able to pick up and highlight any job failures to the operations staff. Whether the job itself stops as the result of an abend in a TSO batch step then becomes irrelevant and which one of IKJEFT01 or IKJEFT1B you use a matter of installation preference. In other words, check which is standard for your site.
Thanks, I have the same understanding. We have been using IKJEFT01 mostly.