#/ This snippet is used only by AllocateDataset.txt to prevent duplication.
#/ It contains all of the SAS code that creates a new MVS data set using the
#/ attributes defined in the MVSDSDataTable.xml file.
#/
disp=(new,catlg,delete) blksize=[BLKSIZE]
#IF [NOSTAGECHK] #THEN NOTHF
#IFNOTEQ [HOTFIX] TRUE #THEN NOTHF        #/only a hotfix needs less LIBRARY alloc space
#IFNOTEQ {MVS2BDSCODE} LD #THEN NOTHF     #/ Check payload for LIBRARY content
 space=(6000,(13000,13000,50),,,ROUND)    #/ less LIBRARY space for a hotfix needed
#THEN SKIPSPC
#NOTHF
space=[SPACEPARMS]
#SKIPSPC
#/ Note that for a SAS Data Library, the DSORG, RECFM, and LRECL
#/ are not allowed on the libname statement. So skip that when
#/ DATASETTYPE is set to SASDATALIB.
#IFEQ [DATASETTYPE] SASDATALIB #THEN CHECKTYPE
#IF [LRECL] #THEN RECFMNOTU    #/ lrecl of null means unformatted
dsorg=[DSORG] recfm=[RECFM]    #/ unformatted, DSORG and RECFM only.
#THEN CHECKTYPE
#RECFMNOTU
dsorg=[DSORG] recfm=[RECFM] lrecl=[LRECL]  #/ formatted, DSORG, RECFM, and LRECL
#CHECKTYPE
#IFNOTEQ [DATASETTYPE] SASDATALIB #THEN NOTSDL
dsntype=LARGE          #/ S1545207: Specify dataset is a SDL
#THEN CHECKSMS
#NOTSDL
#IFNOTEQ [DATASETTYPE] PDS #THEN NOTPDS
dsntype=PDS            #/ Specify dataset is a PDS
#THEN CHECKSMS
#NOTPDS
#IFNOTEQ [DATASETTYPE] PDSE #THEN CHECKSMS
dsntype=LIBRARY        #/ Specify dataset is a PDSE
#IFEQ [SMS-ALLOC-PDSE] false #THEN CHECKSMS #/ no PDSE-specific SMS
#IFNOT [SMS-PDSE-STORCLAS] #THEN NOSC
storclas=[SMS-PDSE-STORCLAS]         #/ STORCLAS keyword, if used
#NOSC
#IFNOT [SMS-PDSE-MGMTCLAS] #THEN NOMC
mgmtclas=[SMS-PDSE-MGMTCLAS]         #/ MGMTCLAS keyword, if used
#NOMC
#IFNOT [SMS-PDSE-DATACLAS] #THEN NODC
dataclas=[SMS-PDSE-DATACLAS]         #/ DATACLAS keyword, if used
#NODC
#THEN NOVOLSER
#CHECKSMS
#IFEQ [SMS-ALLOC] true #THEN SMSALLOC   #/ use SMS parameters
#IFNOT [VOLSER] #THEN NOVOLSER  #/ if no volser, then skip
#IF [TMPDS] #THEN TMPU #/ if this is a pre-allocated dataset deleted after the install then skip
unit=[DISKUNIT] volser='[BYDSVOLSER]';
#THEN NEND
#NOVOLSER
#IF [TMPDS] #THEN TMPU
unit=[DISKUNIT];     #/ set unit to permanent diskunit
#THEN NEND
#TMPU
unit=[TMPUNI];       #/ set unit to temporary diskunit
#THEN NEND
#SMSALLOC            #/ SMS parameter settings
#IFNOT [SMS-STORCLAS] #THEN NOSC
storclas=[SMS-STORCLAS]              #/ STORCLAS keyword, if used
#NOSC
#IFNOT [SMS-MGMTCLAS] #THEN NOMC
mgmtclas=[SMS-MGMTCLAS]              #/ MGMTCLAS keyword, if used
#NOMC
#IFNOT [SMS-DATACLAS] #THEN NODC
dataclas=[SMS-DATACLAS]              #/ DATACLAS keyword, if used
#NODC
unit=[DISKUNIT];              #/ always us permanent unit for SMS
#NEND
#IFNOTEQ [DATASETTYPE] SASDATALIB #THEN NOTSDL  #/ skip section if wasn't allocated as libname
PROC CONTENTS DATA=[OUTPDDNAME]._ALL_ NOPRINT;  #/ this section "touches" new datalib so all the
DATA [OUTPDDNAME].NODATA_NULLDATA;             #/ internal markers are set up for a later open in SAS
X=0;PUT X; RUN;                                #/ avoids "not initialized" error
#NOTSDL
