In a recent note, Chris Mason said: > Date: Thu, 6 Jul 2006 22:55:44 +0200 > > I used to use DISP=(MOD,DELETE) with PGM=IEFBR14 in typically the first job > step in order to dispose of a previous instance of a data set which may or > may not exist. I then allocated the data set in the following step with > DISP=OLD. I used to do this for data sets which may or may not be used in > that job step and so the allocation was a small primary, say, 1 track, and a > large secondary, say 50 tracks with RLSE added for tidiness. > > There is an apparent problem with this technique in that it might convert a > started task procedure with one step into one with multiple steps. This > brings us to SYST. > I deliberately [over]simplified my example. When I wish either to create a new data set, or re-use the existing one, I often use the following to avoid adding a job step:
//STEP EXEC PGM=IEBGENER //ALLOC DD DISP=(MOD,CATLG),UNIT=&DASD,DSN=...,SPACE=... //SYSUT2 DD DISP=OLD,DSN=*.ALLOC,VOL=REF=*.ALLOC,UNIT=&DASD Specifying VOL (with a referback) and UNIT permits accessing DSN before it is catalogued. Would similar work for deleting and creating in a single job step: //STEP EXEC PGM=IEBGENER //ALLOC DD DISP=(MOD,DELETE),UNIT=&DASD,DSN=...,SPACE=... //SYSUT2 DD DISP=OLD,DSN=*.ALLOC,UNIT=&DASD ...? I believe the ALLOC data set is uncatalogued before SYSUT2 is catalogued (order of DD statements?). Of course this requires an elegible storage volume in addition to the one used by the ALLOC DD. If responses are vague or contradictory I'll try a test. -- gil -- StorageTek INFORMATION made POWERFUL ---------------------------------------------------------------------- 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