Previous Topic: OPSDYNAM DECONCAT—Deconcatenate DDNamesNext Topic: OPSDYNAM INFO—Display Data Set Information


OPSDYNAM FREE—Free DD and Data Set Names

The FREE command frees a list of ddnames, data set names, or both. It provides the option to remove only the in-use attribute, or to deallocate a permanently allocated data set. The default is to deallocate a permanently allocated data set.

This command has the following format:

ADDRESS OPSDYNAM "FREE keywords"
  [FILE|DDNAME(ddname1,ddanme2,…ddname65)]
  [DATASET|DSNAME(dsname1,dsname2,… dsname16)]
  [UNALLOCATE|REMOVE]
  [DELAY]
  [CMDRESP(type)]
  [MSG(ON|OFF)]
  [PATH(pathname)]
FILE|DDNAME (ddname1, ddname2… ddname65)

(Optional) Defines a valid z/OS ddname or list of ddnames to be freed. A maximum of 65 ddnames may be specified.

DATASET|DSNAME (dsname1, dsname2, …dsname16)

(Optional) Defines a single z/OS data set name or a list of data set names to be freed. A maximum of 16 data set names may be specified. If the data set name is not enclosed in quotes, then 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.

UNALLOCATE

(Optional) Indicates that the data set is to be deallocated even if it is permanently allocated. This is the default for the 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 the UNALLOCATE keyword.

PATH(pathname)

(Optional) Defines the 1-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.

The following common keywords may be specified:

DELAY, CMDRESP, and MSG

(Optional) You may specify the DELAY, CMDRESP, and MSG keywords described in Keywords Common to All ADDRESS OPSDYNAM Commands in this chapter.

Example: OPSDYNAM FREE

The following frees and unallocates files:

/* Free and unallocate the files */
  "Free DD(oldrule,newrule)"
  If rc > 0 Then Signal DYNERROR
Return rc

DYNERROR:
  Say Sourceline(sigl-1)
  Say "OPSDYNAM error RC="rc "Error code="opsercd,
      "Info code="opsifcd
  Do While Queued() > 0
  Pull errsmg
  Say errmsg
End
Return rc