z/OS Using REXX and z/OS UNIX System Services
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Requesting dynamic allocation

z/OS Using REXX and z/OS UNIX System Services
SA23-2283-00

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 pathname 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 following keys:

Table 1. Common keys used for dynamic allocation
Keys used for dynamic allocation Action
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. Quotes can be used for TSO compatibility.
DUMMY Allocates a dummy data set.
FI(name) | DD(name) 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.
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.
VOL(volser [,volser...]) Specifies the serial numbers for eligible direct access volumes where the data set is to reside.
DATACLAS(data class) With SMS, specifies the data class for the data set.
MGMTCLAS(management class) With SMS, specifies the management class for the data set.
STORCLAS(storage class) With SMS, specifies the storage class for the data set.
SPACE(primary[,secondary]) Specifies primary and optionally secondary space allocations.
BLOCK(length) Specifies block allocation with an average block or record size of length.
TRACKS Specifies the unit of space in tracks.
CYL Specifies the unit of space in cylinders.
BLKSIZE(block size) Specifies the block size.
DIR(directory blocks) Specifies the number of directory blocks.
DEST({destination| destination[.user]}) Specifies the output destination or the output destination and node.
REUSE Causes the named DD to be freed before the function is performed.
HOLD Specifies that the output data set is to be held until released by the user or operator.
UNIT(unit name) Specifies unit name, device type, or unit address.
MAXVOL(num vols) Number of volumes for a multi-volume data set.
KEEP | DELETE | CATALOG | UNCATALOG Specifies the data set disposition after it is freed.
BUFNO(number) Sets the number of buffers. This number should be in the range 1–255. Numbers outside that range give unpredictable results.
LRECL(record length) Specifies the logical record length.
RECFM(format[,format...]) Specifies the record format. The valid values are A, B, D, F, M, S, T, U, and V. Several of these can be used in combination.
DSORG(PS | PO | DA) Specifies the data set organization.
COPIES(number of copies) Specifies the number of copies to print.
FORMS(forms name) Specifies the print form.
LIKE(model data set name) Copies attributes for the allocation from the model data set.
OUTDES(output descriptor name) Specifies the output descriptor name.
SPIN(UNALLOC) Spins off a sysout data set at unallocation.
DSNTYPE(LIBRARY | PDS | HFS|EXTREQ|EXTPREF|BASIC|LARGE Specifies the data set type.
WRITER(external writer name) Names the external writer.
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:
  • SIRUSR
  • SIWUSR
  • SIXUSR
  • SIRWXU
  • SIRGRP
  • SIWGRP
  • SIXGRP
  • SIRWXG
  • SIROTH
  • SIWOTH
  • SIXOTH
  • SIRWXO
  • SISUID
  • SISGID
  • SISVTX
PATHOPTS(path options list) Sets options for path name allocation. The options list is a list of keywords separated with commas. The supported keywords are:
  • ORDWR
  • OEXCL
  • OSYNC
  • OTRUNC
  • OCREAT
  • OWRONLY
  • ORDONLY
  • OAPPEND
  • ONOCTTY
  • ONONBLOCK
RECORG(LS) Creates a VSAM linear data set.
SEQUENCE(sequence number) Specifies the relative position (number) of a data set on a tape volume.
LABEL(type) Specifies the type of tape label processing to be done, as follows:
NL
The volume has no label.
SL
The volume has an IBM® standard label.
NSL
The volume has a non-standard label.
SUL
The volume has both an IBM 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.
AL
The volume has an American National Standard label.
AUL
The volume has both an American National Standard label and a user label.
RETPD(number of days) Specifies the data set retention period, in days.
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 translation
T
BCD/EBCDIC translation
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.

The following additional keys are unique to BPXWDYN.

Table 2. Additional keys used for dynamic allocation
Additional keys 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 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.
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.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014