Page 1 of 1

IEFBR14 With disp=shr

PostPosted: Thu Jul 01, 2010 10:46 am
by richagoyal
Hi,

Can anybody expalain me what IEFBR14 will do with disp=shr

SH6DALL1 EXEC PGM=IEFBR14
SYSOUT DD SYSOUT=0,DEST=LOCAL
SYSPRINT DD SYSOUT=0,DEST=LOCAL
DD001 DD DSN=CS.DH6D.OPX1.AUDIT,DISP=SHR

i sumbitted this job and compared the DD001 file with the original file , but they are same .

Re: IEFBR14 With disp=shr

PostPosted: Thu Jul 01, 2010 3:14 pm
by Robert Sample
IEFBR14 is a do-nothing program. If you need to allocate a file in JCL, but don't want to run a program that could have side effects, IEFBR14 can be used. With DISP=SHR on a file, the file is allocated in the step and then the next step (if any) executes.

Re: IEFBR14 With disp=shr

PostPosted: Fri Jul 02, 2010 12:25 am
by dick scherrer
Hello,

i sumbitted this job and compared the DD001 file with the original file , but they are same .
Why did you submit this job? What did you expect to happen? The jcl mentions only one file - what did you anticipate being different?

Re: IEFBR14 With disp=shr

PostPosted: Fri Jul 02, 2010 11:22 am
by richagoyal
Thanks for your reply !

IEFBR14 will allocate the file when DISP=(NEW,CATLG,DELETE)
it will delete when DISP=(MOD,DEL)
but i dont know what IEFBR14 do when DISP=SHR?

I submit the job to test what is IEFBR14 is doing when DISP=SHR ! as i assumed it will delete the allocated file but if it exist then what is the difference between the original and current file !

Re: IEFBR14 With disp=shr

PostPosted: Fri Jul 02, 2010 11:41 am
by expat
IEFBR14 will do what the DISP= parameters say to do with it for DASD datasets, and in most part for tape datasets.

You told IEFBR14 to share the dataset and it did. Had you told the job step to delete the datatset it would have.

Re: IEFBR14 With disp=shr

PostPosted: Fri Jul 02, 2010 7:35 pm
by Anuj Dhawan
IEFBR14 is a "dummy program" - from your question perpesctive, IEFBR14 is doing nothing; DISP parameter is playing all the roles. And as SHR Indicates that the data set existed prior to this job step and that another job can share it while this job step uses it - so SHR won't delete it. DISP=(SHR,DELETE,DELETE) would delete though.

Re: IEFBR14 With disp=shr

PostPosted: Sat Jul 03, 2010 12:27 am
by dick scherrer
Hello,

i sumbitted this job and compared the DD001 file with the original file , but they are same .
I still have no idea what might have become different. . . :?

as i assumed it will delete the allocated file but if it exist then what is the difference between the original and current file !
How might there be an "original" and a "current" file? It is only one step with only one dd statement for a dataset?

It sounds like there is some very basic information about file processing that is completely misunderstood. . .