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: 11
- 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: 11
- 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.
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