Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JCL: DISP question

Status
Not open for further replies.

weberm

Programmer
Dec 23, 2002
240
US
I'm not sure if this is the right place, so please bear with me. I have a JCL which deletes a file and then runs a COBOL program which recreates the file that was deleted in the first step. If the file is missing in the first place, however, the JCL will abend with some sort of "file missing" error. Is there a way to override this, ie., see there is no file to delete and continue on to the COBOL program? I'm guessing I need to tinker with my DISP settings but am stumped.
 
Alternatively you could tinker with the COND parm for the following steps.......
 
Why not simply do an OPEN OUTPUT in Cobol ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Etom is correct in suggesting the use of MOD, but you must also provide DCB info and a SPACE param. The DCB can be any valid len/blksz and the SPACE can be 0 trks.

The reason: if the file doesn't exist it's trated as a NEW file, allocated, then deleted at step term.

Regards, Jack.

"A problem well stated is a problem half solved" -- Charles F. Kettering
 
DISP=(MOD,DELETE,DELETE)
Let me see what this does...

Alternatively you could tinker with the COND parm for the following steps...
This was my first choice, but if the file isn't there it doesn't even get that far. When I try to submit it it immediately bombs with the "missing file" error message.
 
Weberm,

Why don't you show us the JCL you're using? It would make everyone's life easier.

Regards, Jack.

"A problem well stated is a problem half solved" -- Charles F. Kettering
 
Doesn't mainframe jcl now have true conditionals (if then else) now?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top