Search all data sets and PDS members that match the data set name for a search term.
Usage
zowe zos-files search data-sets <pattern> <searchString> [options]
Positional Arguments
-
pattern
(string)
- The pattern to match data sets against. Also known as 'DSLEVEL'. The following special sequences can be used in the pattern:
%: matches any single character
*: matches any number of characters within a data set name qualifier (e.g. "ibmuser.j*.old" matches "ibmuser.jcl.old" but not "ibmuser.jcl.very.old")
**: matches any number of characters within any number of data set name qualifiers (e.g. "ibmuser.**.old" matches both "ibmuser.jcl.old" and "ibmuser.jcl.very.old")
However, the pattern cannot begin with any of these sequences. You can specify multiple patterns separated by commas, for example "ibmuser.**.cntl,ibmuser.**.jcl"
-
searchString
(string)
- The parameter to search for.
Options
-
--case-sensitive
| --cs
(boolean)
-
--encoding
| --ec
(string)
- Search the file content with encoding mode, which means that data conversion is performed using the file encoding specified.
-
--mainframe-search
| --ms
(boolean)
-
Perform a preliminary search on the mainframe, reducing network traffic. However, this option does not work with data sets that contain binary data. This option should be omitted if any data sets may be in binary format. Failure to do so may result in an incomplete set of search results.
Default value: false
-
--max-concurrent-requests
| --mcr
(number)
-
--timeout
| --to
(number)
- The number of seconds to search before timing out.
-
--response-timeout
| --rto
(number)
- The maximum amount of time in seconds the z/OSMF Files TSO servlet should run before returning a response. Any request exceeding this amount of time will be terminated and return an error. Allowed values: 5 - 600
Zosmf Connection Options
-
--host
| -H
(string)
- The z/OSMF server host name.
-
--port
| -P
(number)
-
The z/OSMF server port.
Default value: 443
-
--user
| -u
(string)
- Mainframe (z/OSMF) user name, which can be the same as your TSO login.
-
--password
| --pass
| --pw
(string)
- Mainframe (z/OSMF) password, which can be the same as your TSO password.
-
--reject-unauthorized
| --ru
(boolean)
-
--base-path
| --bp
(string)
- The base path for your API mediation layer instance. Specify this option to prepend the base path to all z/OSMF resources when making REST requests. Do not specify this option if you are not using an API mediation layer.
-
--protocol
(string)
-
--cert-file
(local file path)
- The file path to a certificate file to use for authentication
-
--cert-key-file
(local file path)
- The file path to a certificate key file to use for authentication
Profile Options
Base Connection Options
Examples
-
Search all of IBMUSER's, data sets for 'ZOWE':
zowe zos-files search data-sets 'IBMUSER.*' 'ZOWE'
-
Search all of IBMUSER's, data sets for 'ZOWE' in uppercase only:
zowe zos-files search data-sets 'IBMUSER.*' 'ZOWE' --case-sensitive
-
Search all of IBMUSER's, data sets for 'ZOWE', and time out in 1 minute:
zowe zos-files search data-sets 'IBMUSER.*' 'ZOWE' --timeout 60
-
Search all of IBMUSER's, data sets for 'ZOWE', and perform 8 parallel tasks:
zowe zos-files search data-sets 'IBMUSER.*' 'ZOWE' --max-concurrent-requests 8