Previous Topic: ADDRESS OPSDYNAM Commands

Next Topic: Common Keywords for ALLOCATE

OPSDYNAM ALLOCATE—Allocate Data Set

The ALLOCATE command allocates an existing or new data set, a list of existing data sets, a dummy data set, a subsystem data set, or a SYSOUT data set to a z/OS ddname with selected attributes.

This command has the following format:

ADDRESS OPSDYNAM "ALLOCATE keywords"
  [FILE|DDNAME(ddname1,ddname2,… ddname65)]
  [DATASET|DSNAME(dsname1|*,dsname2,… dsname16)|DUMMY]
FILE|DDNAME(ddname1, ddname2,…ddname65)

(Optional) Defines a valid z/OS ddname or list of ddnames for the FREE and CONCAT commands. If a ddname is not supplied for the ALLOCATE command, the system generates a ddname of the form SYSnnnnn, which is returned in the REXX variable OPSDD. A maximum of 65 ddnames may be specified.

DATASET|DSNAME (dsname1|*, dsname2, …dsname16)

(Optional) Specifies a single z/OS data set name or a list of data set names for the ALLOCATE and FREE commands. When a list of data set names is specified for ALLOCATE, the data sets are concatenated to a single ddname. A maximum of 16 data set names may be specified. If the data set name is not enclosed in quotes, the TSO data set prefix is added to the name. A PDS member name or relative GDG number may be appended to the data set name delimited by matched parentheses. If a data set name is not supplied for the ALLOCATE command, z/OS generates a temporary data set name. If DSN (*) is specified for the ALLOCATE command, the TSO terminal device is allocated. This is equivalent to specifying the TERM(TS) keyword.

DUMMY

(Optional) Allocates a null data set. This keyword is mutually exclusive with the DSNAME keyword.

MEMBER

(Optional) Provides a PDS member name or relative GDG number (0, +1,…). When this keyword is specified with a data set list, it applies only to the first data set name in the list.

ALLOC DSN('OPSMVS.CCLXLOAD(OPSDYNAM)')…

is equivalent to:

ALLOC DSN('OPSMVS.CCLXLOAD') MEMBER (OPSDYNAM) …
TERM(TS)

(Optional) Allocates the TSO terminal as an input or output data set. Allocation keywords other than DCB-related attributes are ignored.

SUBSYS

(Optional) Allocates a subsystem data set such as a CA OPS/MVS generic interface data set. The first parameter must be the 4‑character subsystem name. One to six subsystem parameters may optionally be specified. The maximum length of a parameter is 67 characters.

REUSE

(Optional) Replaces any old allocation with a new allocation for a ddname. This is equivalent to issuing a FREE command for the old file, and then allocating the new file.

CONVERTIBLE(YES|NO)

Specifies whether an allocation can be modified and reused by a subsequent allocation.

YES

Assigns the convertible attribute to the new allocation.

NO

(Default) Does not convert the allocation by a subsequent allocation.

PERMANENT(YES|NO)

(Optional) Specifies whether the allocation can be deallocated to meet the control limit.

YES

(Default) The allocation will not be deallocated by the system to stay in the control limit of the number of dynamically allocated data sets specified by the DYNAMNBR parameter on the JCL EXEC statement. YES is the default for the ALLOCATE command.

NO

The system can deallocate this data set when it is not in use to meet the control limit.

ALLOWCONVERT

(Optional) Allows dynamic allocation to search for a current convertible allocation that is not in use and alter it to meet the new allocation criteria. This capability helps dynamic allocation to stay in the control limit.

GDGLOCATE

(Optional) Allows the GDG catalog entry to be reread prior to resolution of the relative generation number. When GDGLOCATE is not specified, and when a GDG is allocated with a relative generation number such as +1, subsequent allocations of the same generation number refer to the same data set. When GDGLOCATE is specified, if the +1 generation is now reallocated, a new data set is created since the prior +1 generation is now generation 0 in the catalog.

NEW|MOD|OLD|SHR

(Optional) Specifies the current status of the allocation and corresponds with the first operand of JCL DD statement DISP=keyword.

SYSOUT(class)

(Optional) Allocates a JES spool data set of the specified output class. SYSOUT is mutually exclusive with current status keywords.

SYSOUT(class,pgm,name)

The abbreviated form of SYSOUT(class) WRITER(pgm) FORM(name).

UNCATLG|CATLG|DELETE|KEEP

(Optional) Specifies the normal disposition of the data set when it is deallocated and corresponds to the second operand of the JCL DD statement DISP=keyword.

COND(UNCATLG| CATLG|DELETE|KEEP)

(Optional) Specifies the conditional disposition of the data set when an abnormal termination of the job step or address space occurs. This corresponds to the third operand of the JCL DD statement DISP=keyword.

FREE(CLOSE)

(Optional) Causes the data set to be deallocated when the program closes it. This eliminates the need to issue a FREE command to deallocate the data set.

SPACE(prime, secondary)

(Optional) Defines the primary and secondary space allocation amounts for DASD data sets. The units of allocation are specified by a separate keyword.

DIR(dirblocks)

(Optional) Determines the number of directory blocks for PDS data sets.

SPACE(prime, secondary, dir)

(Optional) Specifies an expanded form of SPACE that includes the number of directory blocks for PDS data sets.

TRACKS

(Optional) Defines units of allocation space.

CYLINDERS

(Optional) Specifies the units of allocation space.

BLOCK(size)

(Optional) Defines the units of allocation space. If the BLKSIZE keyword is not specified, then the block operand size is also the BLKSIZE value. This allocation type is device-independent.

AVBLOCK(size)

(Optional) Defines the units of allocation space. The BLKSIZE operand is not set by this keyword. When specified in an SMS environment, AVBLOCK can be used to allocate space by the number of logical records with an SMS determined block size. AVGREC should also be specified with this keyword.

AVGREC(U|K|M)

(Optional) Specifies the multiplier for space units when BLOCK, BLKSIZE, or AVBLOCK is used for device-independent space allocation.

RELEASE

(Optional) Releases the unused space of a new data set when a program closes it.

ROUND

(Optional) Specifies that space allocation on a DASD device should be rounded up to the next cylinder boundary for improved performance.

UNIT(unitname)

(Optional) Defines the generic or esoteric device name on which the data set is to be allocated.

UCOUNT(unitcount)

(Optional) For multi-volume data sets, defines the maximum number of devices to be allocated to the data set.

PARALLEL

(Optional) Indicates that one device should be allocated for each volume of a multi-volume data set. This keyword is mutually exclusive with the UCOUNT keyword.

VOLUME(vol1,…,vol6)

(Optional) Defines a list of one to six volume serial number names on which a new data set is to be placed or an old data set exists.

REFVOL(dsname)

(Optional) Allocates a new data set on the same volume as an existing catalogued data set. This keyword is mutually exclusive with the VOLUME keyword.

VSEQ(volume sequence number)

(Optional) Defines the maximum number of volumes that may be used by a data set.

POSITION(0-9999)

(Optional) Specifies the relative file number of the data set on multi-file tape volume. The maximum number is 9999.

PRIVATE

(Optional) Indicates that any mountable volumes that are not permanently resident or reserved should be marked with the private storage attribute.

DEFER

(Optional) Indicates that any mountable volumes used by a data set should not be physically mounted until they are referenced.

LABEL(NL|SL|NSL|SUL| BLP|LTM|AL|AUL)

(Optional) Specifies the type of label processing to be performed when the data set is opened.

PASSWORD

(Optional) Indicates that you must supply a password to acquire input and output access to the data set.

NOPWREAD

(Optional) Indicates that you must supply a password to acquire output access to the data set. Input access is permitted without a password.

DSPASSWORD(password)

(Optional) Defines the password required to access the data set. If not specified, the system operator must supply the password. SMS‑managed data sets do not use password protection.

INPUT

(Optional) Indicates that the data set may be opened for input only. This keyword is equivalent to the JCL DD statement IN parameter of the LABEL operand.

OUTPUT

(Optional) Indicates that the data set may be opened for output only. This keyword is equivalent to the JCL DD statement OUT parameter of the LABEL operand and is mutually exclusive with the INPUT keyword.

RETPD(0-9999)

(Optional) Defines the number of days from the current date that must pass before the data set can be deleted or overwritten.

EXPDT(ccyyddd|yyddd)

(Optional) Defines the Julian date on which the data set may be deleted or overwritten. The long form that includes the century is recommended. This keyword is mutually exclusive with RETPD.

DEN(556|800|1600|6250)

(Optional) Indicates the recording density for magnetic tape data sets.

REFDSN(dsname)

(Optional) Defines the name of a catalogued DASD data set from which DCB attributes should be copied.

REFDD(ddname)

(Optional) Defines the ddname of a currently allocated data set from which DCB attributes should be copied. This keyword is mutually exclusive with REFDSN.

USING(attr)

(Optional) Defines the name of an attribute data set created by the TSO ATTRIB command for copying of DCB parameters. This is equivalent to using the REFDD keyword that points to a null data set allocation with DCB attributes.

DSORG(VSAM|PO|POU| DA|DAU|PS|PSU|IS|ISU)

(Optional) Specifies the data set organization.

RECFM(FB|VB|VBS|U|DA|FBA|VBA|FBM|VBM…)

(Optional) Specifies the record format of the data set. Unlike TSO ALLOCATE, there are no spaces between the record format designation characters.

BLKSIZE(0-32760)

(Optional) Defines the block size for the data set. The maximum block size is 32760. When allocation space units are not specified, it is also the average block size (AVBLOCK) value.

LRECL(0-32760)

(Optional) Defines the logical record length of the data set. The maximum length is 32760.

STORCLAS(storage class)

(Optional) Specifies the SMS storage class name.

MGMTCLAS(management class)

(Optional) Specifies the SMS management class name.

DATACLAS(data class)

(Optional) Defines the SMS data class for allocation.

LIKE(dsname)

(Optional) Defines a model data set name whose space and DCB attributes are to be copied as defaults when corresponding keywords are not explicitly specified.

DSNTYPE(LIBRARY|PDS)

(Optional) Specifies the type of partitioned data set to be allocated. LIBRARY indicates a PDSE.

KEYOFF(0-32760)

(Optional) Defines the offset of the key field in the record for a VSAM KSDS allocation. This function requires SMS.

KEYLEN(0-255)

(Optional) Defines the length of the KEY field for a VSAM KSDS or other direct access data set.

RECORG(KS|ES|RR|LS)

(Optional) Specifies the data set organization for a VSAM data set. Possible organizations:

RLS(NRI|CR)

(Optional) Allows record level sharing for sysplex VSAM files using the coupling facility with SMS.

SPIN(UNALLOC|NO)

(Optional) Specifies when the SYSOUT data set should be made available for printing.

HOLD

(Optional) Places the SYSOUT data set on the JES hold queue when deallocated.

DEST(node|userid)

(Optional) Specifies the name of a JES node or TSO user ID to which an output data set is to be routed.

WRITER(pgm)

(Optional) Defines the name of an external writer program that prints a SYSOUT data set instead of the JES subsystem. If you are submitting JCL to an internal reader, the value of pgm may be specified as INTRDR.

FORMS(name)

(Optional) Defines the name of the form that is mounted on the printer when printing a SYSOUT data set.

UCS(charset)

(Optional) Defines the universal character set (font) to be used when printing a SYSOUT data set.

FCB(image)

(Optional) Defines the forms control buffer to be used when printing a SYSOUT data set.

FOLD

(Optional) Specifies whether lower case characters are to be translated to upper case for printing a SYSOUT data set.

COPIES(0-255)

(Optional) Defines the number of copies of a SYSOUT data set to print. This number is subject to the installation limit. The maximum number of copies permitted is 255.

OUTLIM(0-16777215)

(Optional) Defines the number of output lines for a SYSOUT data set. The maximum number of lines permitted is 16777215.

UNALLOCATE

(Optional) Indicates that the data set is to be deallocated even if it is permanently allocated. This is the default for the OPSDYNAM FREE command.

REMOVE

(Optional) Indicates that only the in-use attribute is to be removed from the data set being freed, even if the data set is permanently allocated. This keyword is mutually exclusive with UNALLOCATE.

PATH(pathname)

(Optional) Specifies the 1- to 255-character fully qualified name of an HFS or zFS in compatibility mode file. Pathname must begin with a / and include all sub-directory names down to the file name.

PATHDISP(normal, abnormal)

(Optional)

normal

The normal disposition of the HFS or zFS in compatibility mode file when deallocated. Valid values are KEEP or DELETE.

abnormal

The conditional disposition of the HFS or zFS in compatibility mode file when deallocated due to an abnormal termination of the job step or address space. Valid values are KEEP or DELETE.

Default: PATHDISP(KEEP,KEEP)

FILEDATA(TEXT|BINARY)

(Optional)

BINARY

The HFS or zFS in compatibility mode file records are not delimited by the new line character X'15'. This is the default.

TEXT

The HFS or zFS in compatibility mode file records are delimited by the new line character.

PATHMODE(acess1,access2,…access14)

(Optional) accessnn = 1 to 14 file access specifications to set the read/write/execute access attributes of a new HFS or zFS in compatibility mode file. The valid values are:

SIRUSR    SIWUSR    SIXUSR    SIRWXU
SIRGRP    SIWGRP    SIXGRP    SIRWXG
SIROTH    SIWOTH    SIXOTH    SIRWXO
SISUID    SISGID

The meanings of these values are documented in the section on the TSO ALLOCATE command.

PATHOPS(option1,option2,…option8)

(Optional) optionn = 1 to 8 file access and status options that determine how the HFS or zFS in compatibility mode file is opened and processed.

One file option from the access group and up to seven file options from the status group may be specified from the following list:

Access Group:

Status Group:

The meanings of these options are documented in the section describing the TSO ALLOCATE command.

EATTR(OPT|NO)

(Optional) Specifies whether the data set can support extended attributes. By definition, a data set with extended attributes can reside in EAS (extended address space) on an EAV (extended address volume). These attributes can be specified for non-VSAM data sets as well as for VSAM data sets.

OPT

Extended attributes are optional, and will be created if the data set is created on an EAV. In addition, the data set can be created in the EAS of the EAV.

NO

No Extended Attributes allowed.

SMSHONOR

(Optional) Specifies that the system must honor the device name or the esoteric specified on the unit name for an SMS tape library request.

Example: OPSDYNAM Allocate

The following allocates a new text file:

Address OPSDYNAM “Allocate ddname(CRHFS)
Path('/u/users/opsmvs/rexxpgm1')”,
“Pathopts(ORDWR,OCREAT)”,
“Pathmode(SIRWXU,SIRWXG,SIXOTH) Filedata(TEXT)”