zowe-cli
zowe-cli copied to clipboard
Feature: forward retcode to the output
Program:
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
PROCEDURE DIVISION.
DISPLAY "Hello!".
MOVE 1 TO RETURN-CODE.
STOP RUN.
END PROGRAM HELLO.
Now:
$ zowe jobs submit local-file hello.jcl --view-all-spool-content
...
Hello!
$ echo $?
0
$ zowe jobs submit local-file hello.jcl --wait-for-output --rff retcode --rft string | cut -d" " -f 2
0001
Proposal:
$ zowe jobs submit local-file hello.jcl --view-result-with-exit-code
Hello!
$ echo $?
1
Pros:
- get rid of retcode parsers in CI pipelines (see Zowe tutorials with CircleCI)
- single-line job submission with result and exit-code
I'd like to have the CC presented as a number rather than a string "CC 0008" -> 8. The trouble I see with assigning the retcode of the job to the retcode of the command is that you would not know whether the command itself failed or the job failed.
Runtime or JCL errors permanently return 0
$ zowe jobs submit local-file hello.jcl --view-all-spool-content
...
$ echo $?
0
Thank you for raising this issue. The community has 90 days to upvote 👍 the issue. If it receives 5 upvotes, we will move it to our backlog. If not, we will close it.