zowe / zowe-cli

Zowe CLI
Eclipse Public License 2.0
113 stars 87 forks source link

Submit JOB from local file has a false(?) error message #979

Open zszabo14 opened 3 years ago

zszabo14 commented 3 years ago

I'M using local-file option to submit a JCL file. I had a small issue with the file, One line exceeded the 80 char. The JOB was submitted, executed successfully, but the response showed a failure. Even if there are warnings but the JOB (or any of the commands) are executed the final result must be success.

{ "success": false, "exitCode": 1, "message": "z/OSMF REST API Error:\nRest API failure with HTTP(S) status 400\nrc: 4\nreason: 9\ncategory: 6\nmessage: Job submission error. Record length 100 too long for JCL submission, maxlen=80\n\n", "stdout": "", "stderr": "Command Error:\nz/OSMF REST API Error:\nRest API failure with HTTP(S) status 400\nrc: 4\nreason: 9\ncategory: 6\nmessage: Job submission error. Record length 100 too long for JCL submission, maxlen=80\n\n\nError Details:\nHTTP(S) error status \"400\" received.\nReview request details (resource, base path, credentials, payload) and ensure correctness.\n\nHost: SERVER.COM\nBase Path: \nResource: /zosmf/restjobs/jobs\nRequest: PUT\nHeaders: [{\"Content-Type\":\"text/plain; charset=utf8\"},{\"X-IBM-Intrdr-Mode\":\"TEXT\"},{\"X-IBM-Intrdr-Lrecl\":\"80\"},{\"X-IBM-Intrdr-Recfm\":\"F\"},{\"X-CSRF-ZOSMF-HEADER\":true}]\nPayload: \"//BKP00022 JOB (BACKUPMB),'PKG BACKUP',\\n\" +\n '// MSGCLASS=H,\\n' +\n '// MSGLEVEL=(1,1),\\n' +\n '// CLASS=A\\n' +\n '// EXPORT SYMLIST=*\\n' +\n '//***********************************************************************\\n' +\n '//BKP00 EXEC PGM=IEBCOPY\\n' +\n '//SYSPRINT DD SYSOUT=A\\n' +\n '//SYSUT1 DD DSN=MYLIB.SCMD,DISP=SHR\\n' +\n '//SYSUT2 DD DSN=MYLIB.WFR00010.BKP22.SCMD,DISP=OLD\\n' +\n '//SYSIN DD *\\n' +\n ' COPY OUTDD=SYSUT2,INDD=SYSUT1\\n' +\n 'SELECT MEMBER=((WFDLDL19,,R), -\\n' +\n ' (WFDLDL31,,R))\\n' +\n '/*\\n' +\n '//'\n", "data": {}, "error": { "msg": "z/OSMF REST API Error:\nRest API failure with HTTP(S) status 400\nrc: 4\nreason: 9\ncategory: 6\nmessage: Job submission error. Record length 100 too long for JCL submission, maxlen=80\n\n", "causeErrors": "{\"rc\":4,\"reason\":9,\"category\":6,\"message\":\"Job submission error. Record length 100 too long for JCL submission, maxlen=80\"}", "source": "http", "errorCode": 400, "port": 32208, "host": "SERVER.COM", "basePath": "", "httpStatus": 400, "payload": "//BKP00022 JOB (BACKUPMB),'PKG BACKUP',\n// MSGCLASS=H,\n// MSGLEVEL=(1,1),\n// CLASS=A\n// EXPORT SYMLIST=*\n//***********************************************************************\n//BKP00 EXEC PGM=IEBCOPY\n//SYSPRINT DD SYSOUT=A\n//SYSUT1 DD DSN=MYLIB.SCMD,DISP=SHR\n//SYSUT2 DD DSN=MYLIB.WFR00010.BKP22.SCMD,DISP=OLD\n//SYSIN DD *\n COPY OUTDD=SYSUT2,INDD=SYSUT1\nSELECT MEMBER=((WFDLDL19,,R), -\n (WFDLDL31,,R))\n/*\n//", "headers": [ { "Content-Type": "text/plain; charset=utf8" }, { "X-IBM-Intrdr-Mode": "TEXT" }, { "X-IBM-Intrdr-Lrecl": "80" }, { "X-IBM-Intrdr-Recfm": "F" }, { "X-CSRF-ZOSMF-HEADER": true } ], "resource": "/zosmf/restjobs/jobs", "request": "PUT", "additionalDetails": "HTTP(S) error status \"400\" received.\nReview request details (resource, base path, credentials, payload) and ensure correctness.\n\nHost: SERVER.COM\nBase Path: \nResource: /zosmf/restjobs/jobs\nRequest: PUT\nHeaders: [{\"Content-Type\":\"text/plain; charset=utf8\"},{\"X-IBM-Intrdr-Mode\":\"TEXT\"},{\"X-IBM-Intrdr-Lrecl\":\"80\"},{\"X-IBM-Intrdr-Recfm\":\"F\"},{\"X-CSRF-ZOSMF-HEADER\":true}]\nPayload: \"//BKP00022 JOB (BACKUPMB),'PKG BACKUP',\\n\" +\n '// MSGCLASS=H,\\n' +\n '// MSGLEVEL=(1,1),\\n' +\n '// CLASS=A\\n' +\n '// EXPORT SYMLIST=*\\n' +\n '//***********************************************************************\\n' +\n '//BKP00 EXEC PGM=IEBCOPY\\n' +\n '//SYSPRINT DD SYSOUT=A\\n' +\n '//SYSUT1 DD DSN=MYLIB.SCMD,DISP=SHR\\n' +\n '//SYSUT2 DD DSN=MYLIB.WFR00010.BKP22.SCMD,DISP=OLD\\n' +\n '//SYSIN DD *\\n' +\n ' COPY OUTDD=SYSUT2,INDD=SYSUT1\\n' +\n 'SELECT MEMBER=((WFDLDL19,,R), -\\n' +\n ' (WFDLDL31,,R))\\n' +\n '/*\\n' +\n '//'" } }

zszabo14 commented 3 years ago

btw, no lines are longer than 100 chars...

github-actions[bot] commented 1 year ago

Thank you for creating a bug report. If you haven't already, please ensure you have provided steps to reproduce it and as much context as possible.