## zowe › zos-jobs › download › output

Download all job output to a local directory. Each spool DD will be downloaded to its own file in the directory.

#### Usage

zowe zos-jobs download output <jobid> [options]

#### Positional Arguments

- `jobid` (string)

  - The z/OS JOBID of the job containing the spool files you want to view. No pre-validation of the JOBID is performed.

#### Options

- `--directory` | `-d` | `--dir` (string)

  - The local directory you would like to download the output for the job to.

- `--extension` | `-e` (string)

  - A file extension to save the job output with. Defaults to '.txt'.

- `--omit-jobid-directory` | `--ojd` (boolean)

  - If specified, job output will be saved directly to the specified directory rather than creating a subdirectory named after the ID of the job.

- `--binary` | `-b` (boolean)

  - If specified, job output will be downloaded in binary format instead of performing text conversion. Conflicts with record.

- `--record` | `-r` (boolean)

  - If specified, job output will be downloaded in record format instead of performing text conversion. Conflicts with binary.

- `--encoding` | `--ec` (string)

  - Download the spool file content with encoding mode, which means that data conversion is performed using the file encoding specified.

- `--wait-for-active` | `--wfa` (boolean)

  - Wait for the job to enter ACTIVE status before completing the command.

- `--wait-for-output` | `--wfo` (boolean)

  - Wait for the job to enter OUTPUT status before completing the command.

- `--record-range` | `--rr` (string)

  - Zero indexed range of records to download from a spool file. (example: 0-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

- Download all the output of the job with job ID JOB00234 to an automatically generated directory.:

  - `zowe zos-jobs download output JOB00234`

- Download the records in the range of 0 to 100 from a job spool.:

  - `zowe zos-jobs download output --record-range '0-100'`