On Mon, 22 Jun 2009 12:17:19 -0500, Paul Gilmartin wrote: >On Mon, 22 Jun 2009 11:11:42 -0500, Frank Schubert wrote: >> >>No one seems to have hit upon the exact cause of your problem. It has >>nothing to do with what you have in your JCL, except for the DISP on the >>IEFBR14 step. What you have done wrong, although wrong is a subjective >>term in this case, is tried to create a PDS dataset using DISP=MOD, when a >>PS dataset with the same name already existed. When specifying DISP=MOD >>the system will create the dataset if it does not exist, and use it if it does >>exist. So, when you ran your JOB, the IEFBR14 step did nothing, because the >>dataset already existed. That is how DISP=MOD has worked for a long time. >> >If the DSNAME were SMS-controlled, would the ALLOC step have failed for >inability to catalog the data set, providing a clearer indication of >the error?
No, because of the DISP=MOD, as Frank described. When MOD is coded, the system tries to find the specified DSNAME first. If it is found, it is used. If it is not found, a new data set is created. However, if the data set did not exist and the new data set could not be cataloged for some other reason, such as a RACF violation, the data set would not be created. >If the COPY step specified: > > //SYSUT2 DD VOL=REF=*.ALLOC.PRTLIB,... > >... would it have used the data set from ALLOC (uncatalogued; >likely not what the OP wanted)? No, as above. >Isn't there an option to cause catalog errors to ABEND or at least >cause bad RC from the step? (But this frustrates the OP's apparent >intent to make the JCL reusable.) There is. Or was. IIRC it was a simple USERMOD. It is not needed for SMS-managed data sets. >>On Wed, 17 Jun 2009 08:09:51 -0400, Baraniecki, Ray wrote: >>> >>>//ALLOC EXEC PGM=IEFBR14 >>>//PRTLIB DD DSN=TSTP.TSTPRB.COMPILE.OUTPUT, >>>// DISP=(MOD,CATLG,KEEP), >>>// UNIT=SYSDA,SPACE=(CYL,(1,1,70)), >>>// DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=0 >>>//* >>>//COPY EXEC PGM=IEBGENER >>>//SYSPRINT DD SYSOUT=* >>>//SYSUT1 DD DISP=SHR,DSN=TSTPRB.NDM.K50.TESTDATA >>>//SYSUT2 DD DISP=OLD,DSN=TSTP.TSTPRB.COMPILE.OUTPUT(TESTDATA), >>>// DSORG=PS >>>//SYSIN DD DUMMY,BLKSIZE=80 >>>// -- Tom Marchant ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

