Previous Topic: Values Returned

Next Topic: Values Returned

OPSPDS Function

The OPSPDS function performs a variety of operations on partitioned data sets (PDS) and returns a numeric string value that is used to determine the success of the operation. In some cases it creates REXX stem variables containing additional information.

Note: You can only use the OPSPDS function in OPS/REXX programs. It cannot be used in AOF rules.

This function has the following format:

var = OPSPDS(RequestCode,DataSetName|DDName,MemName|StemName)

The function arguments describe the type of operation that OPSPDS performs. Possible arguments are:

RequestCode

Specifies the operation to be performed on a PDS. The possible values are:

Note: The request code should be specified as an upper case text string. Mixed case text strings may or may not be supported in the future. There are additional OPSPDS request codes designated for internal CA use only. Do not use any request code other than those documented here.

DataSetName

Defines the valid partitioned data set name (PDS or PDSE). A data set name can be from 1 to 44 characters in length and must meet the IBM naming restrictions for PDS and/or PDSE data set names. For example: SYS1.LINKLIB

DDName

Specifies a DDName for the EXISTS and READDIR request codes. You may use the DDName as an alternative to specifying a partitioned data set name. The DELETE request code will only work with a partitioned data set name.

Note: In the case of READDIR, only members in the partitioned data set at the top of a DDName concatenation are returned.

MemName

Specifies the member name for the EXISTS and DELETE request codes. The OPSPDS function supports 1- to 8-character member names that do not contain periods (.) and do not start with leading numeric digits. While it is possible through programmatic means to create member names that do not meet these restrictions, this is what OPSPDS supports.

StemName

Specifies a stem name for the READDIR function. The stem can be from 1 to 32 characters including an optional trailing period and must conform to the standard REXX rules for stem names. If a period is not provided, one is appended to the end of the stem name value. The stem cannot be a global variable stem of any kind.

Example: Using OPSPDS

These examples show how to verify, delete, and list members.