Creates and allocates a new non-VSAM data set.
&CONTROL SHRVARS=($DS)
EXEC $DSCALL OPT=ALLOC STAT=NEW
FORMAT=dataset_format
ORG=dataset_organization
SPACE={ TRK | CYL } , pri,sec [ ,dir ]
[ BLKSIZE=blocksize ]
[ DATACLS=class ]
[ DD=DD_name ]
[ DISP={ KEEP | DELETE } [, { KEEP | DELETE } ] ]
[ DSN=dataset_name ]
[ DSNTYPE={ HFS | LIBRARY | PDSE } ]
[ FREE={ UNAL | CLOSE } ]
[ LRECL=logical_record_length ]
[ MGMTCLS=class ]
[ MOUNT={ NO | YES } ]
[ RLSE={ NO | YES } ]
[ STORCLS=class ]
[ VOL=volser [ UNIT=unit ] ]
This call is used to create a new data set and allocate it to your product region. The data set remains allocated to your product region until it is explicitly deallocated, until a CLOSE is requested if allocated with FREE=CLOSE, or until your product region terminates. When the data set is deallocated or your product region terminates, the data set is deleted if the relevant disposition specified DELETE.
Operands:
Specifies that a data set is to be allocated.
Specifies that the status of the data set is NEW.
Specifies the data set format for the new 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 the new data set. Valid values are: PS, PO, PSU, and POU.
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 the new data set. The value must be an integer in the range 0 to 32,760.
Specifies the SMS data class.
Specifies the ddname for the allocation. If this operand is omitted, a ddname is generated by the operating system.
Specifies the Normal and Conditional Disposition of the data set. The disposition relates to the normal or conditional termination of your product region, not of the requesting NCL process. If KEEP is specified, the data set remains cataloged.
If DELETE is specified, the data set is uncataloged and deleted.
If a temporary data set is allocated (that is, the DSN operand is omitted) then DISP=DELETE, DELETE is forced. This ensures the data set is deleted when it is deallocated or when your product region terminates.
If the DSN operand is specified and the DISP operand is omitted, DISP defaults to KEEP. In this case the data set will be cataloged. If your product region terminates abnormally, the action taken is decided by the operating system.
Specifies the data set name to be created. If the DSN operand is omitted, a temporary data set is allocated. When a temporary data set is allocated, no disposition is allowed and DELETE, DELETE is forced.
Specifies whether you want to create a Hierarchical File System (HFS) file or a PDSE data set:
Specifies an HFS file
Specifies a PDSE data set
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 the new data set. The value must be an integer in the range 1 to 32,760.
Specifies the SMS management class.
Specifies whether a volume mount is allowed. If MOUNT=NO is specified, and an allocation request requires a volume which is off-line, the allocation request fails. If MOUNT=YES is specified and an allocation request requires a volume which is off-line, a MOUNT request for the volume is issued.
Specifies the secondary space release option.
Specifies the SMS storage class.
Specifies the volume serial number and unit name for the 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:
|
$DSRC |
$DSFDBK |
Meaning |
|---|---|---|
|
0 |
0 |
Data set was allocated; allocation details available in &$DS* variables as described below. |
|
0 |
non-zero |
Data set was allocated; however, allocation details are incomplete. |
|
4 |
non-zero |
Data set was not allocated. |
|
8 |
non-zero |
A Dataset Services Interface error has occurred and the function is incomplete. This is typically an application program specification error. The error is indicated in &SYSMSG with message number DSnnnn. |
Note: For more information about &SYSMSG, &$DSRC, and &$DSFDBK, see Return Codes and Feedback Codes.
Return Variables:
Status of data set; value is NEW
Full data set name with member name omitted, and true name if an alias was entered
Type of file or data set; value is HFS or LIBRARY
Member name if a member of a PDS
Data set organization; values are PS, PO, PSU, and POU
First volume
Unit name for the 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
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
DDname from the allocation, as supplied or as generated by the operating system
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
DYNALLOC error code
DYNALLOC information code
Example: STAT=NEW
EXEC $DSCALL OPT=ALLOC DSN=CUSTOMER.DATA STAT=NEW + ORG=PO FORMAT=FB BLKSIZE=800 + LRECL=80 SPACE='TRK,5,1,10'
Note: Most non-VSAM data sets is allocated. However, IS and DA data sets are not supported.
| Copyright © 2009 CA. All rights reserved. |
|