IEFBR14 error

JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

IEFBR14 error

Postby primeducky » Wed May 18, 2016 4:44 am

This was created for me and it works fine if the @ACS.PTRM.QUERY dataset already exists. However, if the dataset was previously deleted, the jcl abends as dataset not found. I've tried different parameters for DISP and can't figure out the correct code.

I've keep researching and researching this issue and cannot figure it out. Please help. Thank you

If the dataset exists, delete it and fill it with the data from the run.
If the dataset does not exist, create it and fill it with the data from the run.

Posts: 1
Joined: Wed May 18, 2016 4:38 am
Has thanked: 0 time
Been thanked: 0 time

Re: IEFBR14 error


Re: IEFBR14 error

Postby steve-myers » Wed May 18, 2016 6:12 am

What I do is this -
//A       EXEC PGM=IEFBR14
//             DSN=thedsn

I'm not going to explain in detail why this works. Examine the JCL Reference manual for your release if you're interested. Hint: Read the discussion of DISP=MOD very carefully.

IEFBR14 didn't "fail." In fact, it can't "fail," since all it does is set the return code to binary 0 and return. Your JCL failed. Fix the JCL and you're good to go.
Global moderator
Posts: 1812
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 176 times

Return to JCL


  • Related topics
    Last post