Requesting dynamic allocation

To request dynamic allocation, specify alloc at the beginning of the parameter string.

Note: Allocation verifies the validity of the path name. However, because there is no ENQ or locking of the path name, it is possible to modify a path name component, even in an asynchronous process. Modifying the path name might cause errors in OPEN or unexpected results with no errors reported.

BPXWDYN supports single data set allocation. Many of the common allocation keys can be used. For detailed information about those common allocation keys, see z/OS TSO/E Command Reference. Some additional keys are supported to access additional functions.

BPXWDYN supports the keys that are listed in Table 1.
Table 1. Common keys used for dynamic allocation
Keys that are used for dynamic allocation Action
BLKSIZE(block size) Specifies the block size.
BLOCK(length) Specifies block allocation with an average block or record size of length.
BUFNO(number) Sets the number of buffers. This number should be in the range 1-255. Numbers outside that range give unpredictable results.
COPIES(number of copies) Specifies the number of copies to print.
CYL Specifies the unit of space in cylinders.
DA(data set name[(member name)]) | DSN(data set name[(member name)]) Specifies the data set name to allocate. The name must be fully qualified and can include a member name. Quotation marks can be used for TSO compatibility.
DATACLAS(data class) With SMS, specifies the data class for the data set.
DEST({destination| destination[.user]}) Specifies the output destination or the output destination and node.
DIR(directory blocks) Specifies the number of directory blocks.
DSKEYLBL(name) Defines the label for the encryption key that the access methods use to encrypt or decrypt the data.
DSNTYPE(LIBRARY | LIBRARY,1 | LIBRARY,2 | PDS | HFS | EXTREQ |EXTPREF | BASIC | LARGE Specifies the data set type.
DSORG(PS | PO | DA) Specifies the data set organization.
DUMMY Allocates a dummy data set.
Start of changeFI(name) | DD(name| FILE(name))End of change Specifies the ddname to allocate.
FILEDATA(TEXT | BINARY) Tells the sequential access method services whether the data is to be treated as text or binary.
FORMS(forms name) Specifies the print form.
HOLD Specifies that the output data set is to be held until released by the user or operator.
KEEP | DELETE | CATALOG | UNCATALOG Specifies the data set disposition after it is freed.
LABEL(type) Specifies the type of tape label processing to be done, as follows:
AL
The volume has an American National Standard label.
AUL
The volume has both an American National Standard label and a user label.
BLP
Bypass label processing for the volume.
LTM
The system is to check for and bypass a leading tape mark on a DOS unlabeled tape.
NL
The volume has no label.
NSL
The volume has a non-standard label.
SL
The volume has an IBM® standard label.
SUL
The volume has both an IBM standard label and a user label.
LIKE(model data set name) Copies attributes for the allocation from the model data set.
LRECL(record length) Specifies the logical record length.
MAXVOL(num vols) Number of volumes for a multi-volume data set.
MAXGENS(number of generations) Specifies the maximum number of generations for members in a version 2 PDSE.
MGMTCLAS(management class) With SMS, specifies the management class for the data set.
OLD | SHR | MOD | NEW | SYSOUT[(class)] Specifies the data set status. SYSOUT specifies that the data set is to be a system output data set and optionally defines the output class.
OUTDES(output descriptor name) Specifies the output descriptor name.
PATH(pathname) Specifies the path name of a file to allocate.
PATHDISP(KEEP | DELETE[,KEEP|DELETE]) Specifies the file disposition for normal and abnormal termination of the job step.
PATHMODE(path mode list) Set mode bits for a new allocation. This list is a list of keywords separated with commas. The supported keywords are:
  • SIRGRP
  • SIROTH
  • SIRUSR
  • SIRWXG
  • SIRWXO
  • SIRWXU
  • SISGID
  • SISUID
  • SISVTX
  • SIWGRP
  • SIWOTH
  • SIWUSR
  • SIXGRP
  • SIXOTH
  • SIXUSR
PATHOPTS(path options list) Sets options for path name allocation. The options list is a list of keywords that are separated with commas. The supported keywords are:
  • OAPPEND
  • OCREAT
  • OEXCL
  • ONOCTTY
  • ONONBLOCK
  • ORDONLY
  • ORDWR
  • OSYNC
  • OTRUNC
  • OWRONLY
RECFM(format[,format...]) Specifies the record format. The valid values are A, B, D, F, M, S, T, U, and V. These values can be combined, Start of changewith or without commas.End of change
RECORG(LS) Creates a VSAM linear data set.
RETPD(number of days) Specifies the data set retention period, in days.
REUSE Causes the named DD to be freed before the function is performed.
SEQUENCE(sequence number) Specifies the relative position (number) of a data set on a tape volume.
SPACE(primary[,secondary]) Specifies primary and optionally secondary space allocations.
SPIN(UNALLOC) Spins off a SYSOUT data set at unallocation.
STORCLASS(storage class) With SMS, specifies the storage class for the data set.
SUBSYS(subsystem name[,subsys parm...]) Specifies that the data set is a subsystem data set, and also specifies the name of the subsystem and any parameters necessary for the subsystem to process the data set. Case and special characters are preserved for quoted parameters.
TRACKS Specifies the unit of space in tracks.
TRTCH(technique) Specifies the tape recording technique, as follows:
NONCOMP
Non-compaction mode
COMP
Compaction mode
C
Data conversion
E
Even parity
ET
Even parity and BCD/EBCDIC conversion
T
BCD/EBCDIC conversion
UNIT(unit name) Specifies unit name, device type, or unit address.
VOL(volser [,volser...]) Specifies the serial numbers for eligible direct access volumes where the data set is to reside.
WRITER(external writer name) Names the external writer.
The keys in Table 2 are unique to BPXWDYN.
Table 2. Additional keys used for dynamic allocation
Additional keys that are used for dynamic allocation Action
ACUCB Uses the nocapture option (sets S99ACUCB)
AVGREC(U|K|M) Specifies the allocation unit to be used when the data set is allocated.
u
Single record units.
k
Thousand record units.
m
Million record units.
CKEXIST Adds the DALRTORG TU in order to forces sv99 to read the data set control block (DSCB). This action is similar to that of TSO allocation. CKEXIST prevents an allocation request from succeeding when the DSN does not exist and a volume was specified.
CLOSE Frees the allocation when the file is closed.
DIAG (stem | fdnum | STDOUT) Specifies that diagnostic information is to be displayed. The information includes a compile time stamp, the input string, key parsing information for subsequent keys, and the list of generated text units. Specify STDOUT to send output information to the standard REXX output stream.
  • DUMP(<BEFORE|AFTER|NOSVC>,
  • <DD:ddname|DA:datasetname>
Specifies that a dump be taken by using IEATDUMP either before or after the SVC99 or skip the allocation. If a ddname is used, it must already have been allocated. If a data set name is used, a data set name or pattern name must be specified that conforms to the requirements of IEATDUMP.
Start of changeDXACUEnd of change Uses extended TIOT (sets S99DXACU).
EATTR (NO|OPT) Specifies whether extended attributes are allowed.
EXPDL(yyyyddd) Specifies the expiration date of the data set.
EXPDT(yyddd) Specifies the expiration date of the data set.
GDGNT Sets the S99GDGNT flag in the S99FLAG1 field. For information about this flag, see z/OS MVS Programming: Authorized Assembler Services Guide.
MOUNT Resets the S99NOMNT flag, allowing volumes to be mounted.
MSG (WTP | default.S99MSG.| stemname | fdnum) Directs allocation messages to your job log (WTP), a REXX stem, or a file identified by a file descriptor number. If this key is not specified, messages are returned in the S99MSG. stem, if possible. If BPXWDYN was not called from a REXX environment, the messages will be lost.
NORECALL Fails the allocation request if the data set is migrated.
PATHPERM(octal path mode) Sets mode bits for a new allocation. This key is effectively the same as PATHMODE but accepts a simple octal number for the mode bit settings.
RELEASE Space allocated to an output data set but not used is released when the data set is closed.
RTDDN(variable) Returns allocated ddname into the REXX variable variable.
RTDSN(variable) Return allocated data set name into the REXX variable variable.
RTVOL(variable) Returns allocated volume name into the REXX variable variable.
SHORTRC If the dynamic allocation fails, the dynamic allocation error code (S99ERROR) is returned in R15 and the information code is not returned. This is useful if the application can only process R15 as a halfword, such as with PL/I.
SYNTAX When this is used, BPXWDYN parses the request and does not issue the dynamic allocation or dynamic output request.
TU(hex-tu-value) Builds an allocation text unit (TU) from the specified string. For example, alloc tu(000100010002c1c2) is equivalent to alloc fi(ab). TU can be used multiple times in an allocation request.
UCOUNT(number) Specifies the number of devices to be allocated.