List the members of a z/OS data set
You can use this operation to list the members of a z/OS partitioned data set.
HTTP method and URI path
GET /zosmf/restfiles/ds/<dataset-name>/member?start=<member>&pattern=<mem-pat>
where:
- /zosmf/restfiles specifies the z/OS data set and file REST interface
- /ds indicates a data set request
- /<dataset-name> identifies the data set for which members are to be listed. This parameter is required and must consist of a fully qualified data set name. The length of the data set name that you specify on the request cannot exceed 44 characters. You cannot use wildcard characters for this parameter.
- /member indicates that member names are to be returned.
Standard headers
None.
Custom headers
Include the following custom
HTTP headers with this request:
- X-IBM-Max-Items
- This header value specifies the maximum number of items to return. To request that all items be returned, set this header to 0. If you omit this header, or specify an incorrect value, up to 1000 items are returned by default.
- X-IBM-Attributes
- This header is optional.
- member
- A request that only member names be returned. If you omit this header, it is set to "member".
- base
- Setting the X-IBM-Attribute to
base
returns all of the basic attributes for the data set member being queried. These attributes are commonly found in the ISPF List Data set panel. Thebase
key is mutually exclusive with member. - ,total
- The suffix
,total
, can be added to request that the "totalRows" property is returned if more data set members than the maximum requested are available.
- X-IBM-Migrated-Recall
-
This header is optional; use it to specify how a migrated data set is handled. By default, a migrated data set is recalled synchronously. The following values may be specified too:
- wait
- This is the default value. If the data set is migrated, wait for it to be recalled before processing the request.
- nowait
- If the data set is migrated, request it to be recalled, but do not wait.
- error
- If the data set is migrated, do not attempt to recall the data set.
Query parameters
- start
- An optional search parameter that specifies the first member name to return in the response document. The length of the data set name that you specify cannot exceed 8 characters, and cannot contain wildcards. If the member name is not found for the given search, then the next member matching the search is returned.
- pattern
- An optional search parameter restricts the returned member names to only the names that match the given pattern. The syntax of this argument is the same as "pattern" parameter of the ISPF LMMLIST service.
Required authorizations
Usage considerations
Expected response
On
completion, the service returns an HTTP response, which includes a
status code indicating whether your request completed. Status code 200
indicates
success. A status code of 4nn
or 5nn
indicates
that an error has occurred. For more details, see Error handling.
For a successful request, the HTTP response includes an array of data set members, each as one of the following types of JSON list document:
For errors, the HTTP response includes error information as a JSON error report document. See Error report document.
Example request
In the following example, the GET method is used to list all of the members of a data set.
GET /zosmf/restfiles/ds/SYS1.PROCLIB/member HTTP/1.1
Example response
A sample response is shown in List
all of the members of a data set.
Example request
In the following example, the GET method is used to list all of the members of a data set with
specified base attributes.
GET /zosmf/restfiles/ds/SYS1.PROCLIB/member HTTP/1.1
Request Headers:
X-IBM-Attributes: 'base'
Example response
A sample response is shown in List all of the members of a data set with specified base attributes.