Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
JCL DISP parameter

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ashok_uddaraju

New User


Joined: 21 Feb 2007
Posts: 72
Location: bangalore

PostPosted: Tue May 17, 2011 3:21 pm    Post subject: JCL DISP parameter
Reply with quote

Hi,

I require your help on this.

I have a JCL step where a GDG is coded with DISP = (new,catlg,delete). In the same step I have a COBOL program which basically writes into this GDG afer reading from a table

Now if the job fails with -904 SQL error, would the GDG which has been created earlier with DISP = (new,catlg,delete) be deleted or not ?

Regards,
Ashok
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Tue May 17, 2011 3:26 pm    Post subject: Reply to: JCL DISP parameter
Reply with quote

No,

Disposition only applies to the step, not the entire job. If that step completed and the new GDG was cataloged, it will stay cataloged.
Back to top
View user's profile Send private message
ashok_uddaraju

New User


Joined: 21 Feb 2007
Posts: 72
Location: bangalore

PostPosted: Tue May 17, 2011 3:28 pm    Post subject: Reply to: JCL DISP parameter
Reply with quote

both the actions were being performed in the same step
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Tue May 17, 2011 3:40 pm    Post subject:
Reply with quote

let us correct terminology, and perhaps you can find the answer:

it is:
the DISP parameter for the JCL DD Statement.

you have a JOB step.

a JOB step defines some activity to the op-system.
in this case it is execution of a COBOL program,
which has an output dataset defined as a GDG
with disp parms of new,cat,del.

now, not JOBS, not STEPs, not even programs fail due to negative SQL return codes.
what action your program takes when it receives a -904 SQL code,
only your program can tell you.

what action does the program take, when it recieves a -904?

only an abend of the program will cause the DELETE action of the DISP parm to activate.

a non-zero return code of a program is not an abend.
if your program does not abend
(now could be a good time to read about abnormal termination of a program and learn what the op-system considers an ABEND to be.)
then you need a following step, which interrogates the return-code of your program, and take appropriate action - i.e. delete the output file of the COBOL program.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Tue May 17, 2011 3:42 pm    Post subject: Reply to: JCL DISP parameter
Reply with quote

If a job step abends, then any dataset created in that step with a (NEW,CATLG,DELETE) disposition should be scratched. That is the definition of the DELETE parameter in that case. I'm not aware of any reason that a GDG would not follow this rule.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Regarding time parameter shanthi gude JCL & VSAM 7 Mon Sep 04, 2017 2:31 pm
No new posts Paasing symbolic parameter to instrea... Robert Sample JCL & VSAM 2 Thu Jul 27, 2017 1:22 pm
No new posts JTS parameter Shashank Chaubey JCL & VSAM 2 Thu Jul 13, 2017 4:15 pm
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us