Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add encoding to job spool operations #1822

Merged
merged 11 commits into from
May 15, 2024
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,5 @@ target/
packages/imperative/web-help/dist/css/bundle*
packages/imperative/web-help/dist/js/

jest-stare/
jest-stare/
jest.user.config.js
9 changes: 9 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ const projectConfig = {
]
}

let userConfig = () => {
try {
return require("./jest.user.config");
} catch (err) {
return {};
}
};

module.exports = {
...sharedConfig,
...projectConfig,
Expand Down Expand Up @@ -153,4 +161,5 @@ module.exports = {
// You may need to specify maxWorkers if you run out of RAM
// GHA should use 75% due to high ram, low core count, end user systems ~67%
"maxWorkers": process.env.GITHUB_ACTIONS != null ? "75%" : "67%",
...userConfig()
}
4 changes: 4 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the Zowe CLI package will be documented in this file.

## Recent Changes

- Enhancement: Added the ability to download job spool files using other codepages with `--encoding` on the `zowe jobs download output`, `zowe jobs view spool-file-by-id` and `zowe jobs view all-spool-content` commands. [#1822](https://github.com/zowe/zowe-cli/pull/1822)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add a benefit to the user to this note? What does this change accomplish?


## `7.24.2`

- BugFix: Fixed `zowe daemon enable` installing an invalid daemon binary on macOS. [#2126](https://github.com/zowe/zowe-cli/pull/2126)
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ exports[`zos-jobs view all-spool-content command should display the help 1`] = `
The z/OS JOBID of the job containing the spool files you want to view. No
pre-validation of the JOBID is performed.

OPTIONS
-------

--encoding | --ec (string)

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

ZOSMF CONNECTION OPTIONS
------------------------

Expand Down Expand Up @@ -128,9 +136,9 @@ exports[`zos-jobs view all-spool-content command should display the help 1`] = `
\\"success\\": true,
\\"exitCode\\": 0,
\\"message\\": \\"The help was constructed for command: all-spool-content.\\",
\\"stdout\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n all-spool-content | asc\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n View the contents of each spool file from a z/OS job on spool/JES queues. The\\\\n command does not pre-validate the JOBID. The command presents errors verbatim\\\\n from the z/OSMF Jobs REST endpoints.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs view all-spool-content <jobid> [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n jobid\\\\t\\\\t (string)\\\\n\\\\n The z/OS JOBID of the job containing the spool files you want to view. No\\\\n pre-validation of the JOBID is performed.\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - View all spool files for the job with job ID JOB00234:\\\\n\\\\n $ zowe zos-jobs view all-spool-content JOB00234\\\\n\\\\n\\",
\\"stdout\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n all-spool-content | asc\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n View the contents of each spool file from a z/OS job on spool/JES queues. The\\\\n command does not pre-validate the JOBID. The command presents errors verbatim\\\\n from the z/OSMF Jobs REST endpoints.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs view all-spool-content <jobid> [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n jobid\\\\t\\\\t (string)\\\\n\\\\n The z/OS JOBID of the job containing the spool files you want to view. No\\\\n pre-validation of the JOBID is performed.\\\\n\\\\n OPTIONS\\\\n -------\\\\n\\\\n --encoding | --ec (string)\\\\n\\\\n Download the spool file content with encoding mode, which means that data\\\\n conversion is performed using the file encoding specified.\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - View all spool files for the job with job ID JOB00234:\\\\n\\\\n $ zowe zos-jobs view all-spool-content JOB00234\\\\n\\\\n\\",
\\"stderr\\": \\"\\",
\\"data\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n all-spool-content | asc\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n View the contents of each spool file from a z/OS job on spool/JES queues. The\\\\n command does not pre-validate the JOBID. The command presents errors verbatim\\\\n from the z/OSMF Jobs REST endpoints.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs view all-spool-content <jobid> [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n jobid\\\\t\\\\t (string)\\\\n\\\\n The z/OS JOBID of the job containing the spool files you want to view. No\\\\n pre-validation of the JOBID is performed.\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - View all spool files for the job with job ID JOB00234:\\\\n\\\\n $ zowe zos-jobs view all-spool-content JOB00234\\\\n\\\\n\\"
\\"data\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n all-spool-content | asc\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n View the contents of each spool file from a z/OS job on spool/JES queues. The\\\\n command does not pre-validate the JOBID. The command presents errors verbatim\\\\n from the z/OSMF Jobs REST endpoints.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs view all-spool-content <jobid> [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n jobid\\\\t\\\\t (string)\\\\n\\\\n The z/OS JOBID of the job containing the spool files you want to view. No\\\\n pre-validation of the JOBID is performed.\\\\n\\\\n OPTIONS\\\\n -------\\\\n\\\\n --encoding | --ec (string)\\\\n\\\\n Download the spool file content with encoding mode, which means that data\\\\n conversion is performed using the file encoding specified.\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - View all spool files for the job with job ID JOB00234:\\\\n\\\\n $ zowe zos-jobs view all-spool-content JOB00234\\\\n\\\\n\\"
}"
`;

Expand Down