S0C7 at the first step but the job returns CC=12
S0C7 at the first step but the job returns CC=12
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?
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
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:
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.
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
To stop your subsequent steps from running, you need to use either COND= or wrap them in IF/ENDIF statements.
- myoggradio
- Registered Member
- Posts: 15
- Joined: Tue Jul 30, 2024 8:15 pm
Re: S0C7 at the first step but the job returns CC=12
Man beachte auch viewtopic.php?t=1859
Es gibt drei Möglichkeiten TSO aufzurufen. Sie unterscheiden sich in der Fehlerbehandlung.
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
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:
When an abend occurs, TSO intercepts it. When TSO ends, it gives a return code 12.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
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?
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
myoggradio wrote: ↑Tue Aug 06, 2024 4:08 pm Please also note viewtopic.php?t=1859
There are three ways to call TSO. They differ in the error handling.
Thanks myoggradio. I checked the link and still understanding that.
- myoggradio
- Registered Member
- Posts: 15
- Joined: Tue Jul 30, 2024 8:15 pm
Re: S0C7 at the first step but the job returns CC=12
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
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
zum13When 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.utkarshDoes that mean that all the steps of a JCL would still execute even if the any step gets an abend?
Thanks. This is a great information.
Re: S0C7 at the first step but the job returns CC=12
So, what should be used as a 'rule', "IKJEFT01" or 'IKJEFT1B '?
And is 'IKJEFT1B' also 'TSO in batch'?
And is 'IKJEFT1B' also 'TSO in batch'?
Thanks,
Re: S0C7 at the first step but the job returns CC=12
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
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.
Thanks,
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute