Creates a new data set.
&CONTROL SHRVARS=($DS)
EXEC $DSCALL OPT=CREATE
DSN=dataset_name
FORMAT=format
ORG=dataset_organization
RLSE={ NO | YES }
SPACE= { TRK | CYL } , pri, sec [ ,dir ]
[ BLKSIZE=blocksize ]
[ DATACLS=class ]
[ FREE= { UNAL | CLOSE } ]
[ LRECL= logical_record_length ]
[ MGMTCLS=class ]
[ MOUNT= { NO | YES } ]
[ STORCLS=class ]
[ VOL=volser [ UNIT=unit ] ]
This call is used to create a new data set on DASD. This call is similar to the $DSCALL OPT=ALLOC call except the data set must not be a temporary or SYSOUT data set. The data set is cataloged and does not remain allocated to your product region on completion of the operation.
Operands:
Specifies that a data set is to be created.
Specifies the data set name to create.
Specifies the format of the created data set. Valid values are: F, FB, FS, FBS, FA, FBA, FSA, FBSA, FM, FBM, FSM, FBSM, V, VB, VS, VBS, VBSA, VM VBM, VSM, VBSM, U, UA, UM.
Specifies the data set organization for a new data set. Valid values are: PS, PO, PSU, and POU.
Specifies whether to have a secondary space release option.
Specifies the space allocation in tracks or cylinders. The SPACE type and primary allocation quantity are required. The directory allocation quantity is required if the data set is a PDS.
Specifies the block size for a new data set. The value must be an integer in the range 1 to 32,760.
Specifies the SMS data class option.
Specifies whether the data set is to be deallocated by explicit request only (FREE=UNAL) or is to be deallocated when the file is closed (FREE=CLOSE).
Specifies the logical record length for a new data set. The value must be an integer in the range 1 to 32,760.
Specifies the SMS management class option.
Specifies whether a volume mount is allowed. If MOUNT=NO is specified, and an allocation request requires a volume which is offline, the allocation request fails. If MOUNT=YES is specified and an allocation request requires a volume which is offline, a MOUNT request for the volume is issued.
Specifies the SMS storage class option.
Specifies the volume serial number and unit name for a new allocation. If the VOL operand is omitted, the operating system determines if the allocation is allowed, and may choose to allocate the data set or any volume which the requesting user is authorized for.
Return Codes:
Note: For more information about &SYSMSG, &$DSRC, and &$DSFDBK, see Return Codes and Feedback Codes.
Return Variables:
Full data set name with member name omitted, and true name if an alias was entered
Data set organization; values are PS, PO, PSU, POU, CX, CQ, MQ, GS, X, TQ, and TR
First volume
Record format; values are F,FB, FS, FBS, FA, FBA, FSA, FBSA, FM, FBM, FSM, FBSM, V, VB, VS, VBS, VBSA, VM, VBM, VSM, VBSM, U, UA, UM
Logical record length
Actual usable record length. If the record format is variable length, then the value is record length minus 4. In all other cases, the value is the same as record length.
Block size
SMS storage class if SMS is active for this data set
SMS management class if SMS is active for this data set
SMS data class if SMS is active for this data set
Dynamic allocation error code
Dynamic allocation information code
Example: OPT=CREATE
EXEC $DSCALL OPT=CREATE DSN=DEV.SAMPLE.PDS.WORK02 + SPACE='TRK,10,5,1' ORG=PO FORMAT=FB + LRECL=80, BLKSIZE=4000, STAT=NEW