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

JCL symbols trimmed: "CMD=' test '" = "CMD='test'" #1718

Open
zFernand0 opened this issue May 11, 2023 · 0 comments
Open

JCL symbols trimmed: "CMD=' test '" = "CMD='test'" #1718

zFernand0 opened this issue May 11, 2023 · 0 comments
Labels
bug Something isn't working priority-low Legit issue but cosmetic or nice-to-have severity-low Bug that makes the usage of the Zowe less convenient but doesn't impact key use cases

Comments

@zFernand0
Copy link
Member

zFernand0 commented May 11, 2023

Describe the bug

The --jcl-sysmbols options is (basically) .trim()-ing the provided symbols.

Expected and actual results

Assume the following job:

//USERIDT JOB (IZUACCT),USERID,CLASS=B,MSGCLASS=X
//TEST000 EXEC PGM=BPXBATCH,PARM='&CMD1'
//TEST001 EXEC PGM=BPXBATCH,PARM='&CMD1 &CMD2 &CMD3'
//TEST002 EXEC PGM=BPXBATCH,PARM='&CMD1&CMD2&CMD3'

Running the following CLI commands...

  • zowe jobs sub ds "USERID.DS(symbols)" --js "CMD1='sh /bin/sleep 1'"

    • test000 always works since the spaces are not at the beginning or the end
    • test000: IEFC653I SUBSTITUTION JCL - PGM=BPXBATCH,PARM='sh /bin/sleep 1'
  • zowe jobs sub ds "USERID.DS(symbols)" --js "CMD1=sh CMD2='/bin/sleep' CMD3=1"

    • test001 works since the CMDs are spaces out in the JCL step
    • test001: IEFC653I SUBSTITUTION JCL - PGM=BPXBATCH,PARM='sh /bin/sleep 1'
  • zowe jobs sub ds "USERID.DS(symbols)" --js "CMD1=sh CMD2=' /bin/sleep ' CMD3=1"

    • test002 doesn't work (and throws a JCL error) since the spaces (in CMD2) are trimmed out
    • test002: IEFC653I SUBSTITUTION JCL - PGM=BPXBATCH,PARM='sh/bin/sleep1'

Describe your environment

  • Zowe CLI version installed (run command zowe --version): 7.15.0
  • Installed plug-ins and their version numbers (run command zowe plugins list --short): N/A
  • Node.js and NPM versions installed (run node --version, npm --version): node 18.x & npm 9.x
  • Environment variables in use: N/A
  • Operating system and version: Any
  • Shell/terminal (bash, cmd, powershell, etc...): Bash
  • Daemon mode enabled or disabled: Disabled

Additional context

FYI, the method in question (getSubstitutionHeaders) has not been touched since April 2021, hence the priority-low label.

private static getSubstitutionHeaders(symbols: string): IHeaderContent[] {
const headers: IHeaderContent[] = [];
const blank = " ";
const equals = "=";
const maxSymLen = 8;
let symStartInx = 0;
moreSymLoop:
while(symStartInx < symbols.length) {
// skip all blanks at the start of a sym def

@zFernand0 zFernand0 added bug Something isn't working for-review To be reviewed in an Eng & Prod Mgmt meeting priority-low Legit issue but cosmetic or nice-to-have new The issue wasn't triaged yet labels May 11, 2023
@zFernand0 zFernand0 changed the title JCL symbols trimmed: --jcl-symbols "CMD=" test " = --jcl-symbols "CMD="test" JCL symbols trimmed: "CMD=' test '" = "CMD='test'" May 11, 2023
@JTonda JTonda added severity-low Bug that makes the usage of the Zowe less convenient but doesn't impact key use cases and removed for-review To be reviewed in an Eng & Prod Mgmt meeting new The issue wasn't triaged yet labels May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-low Legit issue but cosmetic or nice-to-have severity-low Bug that makes the usage of the Zowe less convenient but doesn't impact key use cases
Projects
Status: Low Priority
Development

No branches or pull requests

2 participants