## zowe › zos-jobs › search › job

Search the spool output of a job.

#### Usage

zowe zos-jobs search job <jobname> [options]

#### Positional Arguments

- `jobname` (string)

  - The job name to search. Wildcards are accepted for the job name. You can use, for example "USERJOB*" to search all jobs that start with USERJOB.

#### Options

- `--search-string` | `--string` (string)

  - The string to search for in the spool output.

- `--search-regex` | `--regex` (string)

  - The regular expression to search for in the spool output.

- `--case-insensitive` | `--ci` (boolean)

  - The search is case insensitive or not.

    Default value: true

- `--search-limit` | `--sl` (number)

  - The maximum number of matching lines to return for an individual spool file.

    Default value: 100

- `--file-limit` | `--fl` (number)

  - The maximum number of spool files to search.

    Default value: 100

#### 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)

  - Reject self-signed certificates.

    Default value: true

- `--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)

  - The protocol used (HTTP or HTTPS)

    Default value: https
    Allowed values: http, https

- `--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

- `--zosmf-profile` | `--zosmf-p` (string)

  - The name of a (zosmf) profile to load for this command execution.

- `--base-profile` | `--base-p` (string)

  - The name of a (base) profile to load for this command execution.

#### Base Connection Options

- `--token-type` | `--tt` (string)

  - The type of token to get and use for the API. Omit this option to use the default token type, which is provided by 'zowe auth login'.

- `--token-value` | `--tv` (string)

  - The value of the token to pass to the API.

#### Examples

- Search all jobs named USERJOB for the string "RC=0000":

  - `zowe zos-jobs search job "USERJOB" --search-string "RC=0000"`

- Search all jobs that start with USER for the string "ENDED":

  - `zowe zos-jobs search job "USER*" --search-string "ENDED"`

- Search all jobs named USERJOB for the string "COND CODE", with the options case sensitive and a search limit of 5:

  - `zowe zos-jobs search job "USERJOB" --search-string "COND CODE" --case-insensitive false --search-limit 5`