$DSCALL OPT=ALLOC STAT=NEW

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:

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:

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.

More information:

$DSCALL OPT=ALLOC


Copyright © 2009 CA. All rights reserved.