Using QShell (QSH) cmd in a CL program
Posted: Mon Sep 21, 2020 4:02 pm
From Profound, I am calling a CLP that runs a change directory command in QSH and is failing with exit status 127 (command not found) though it says it ended normally. If I call the CLP from the iSeries command line, it executes the QSH "cd" command without errors. Any suggestions on next steps?
Snippet of the code:
CHGVAR VAR(&SCRIPT) VALUE('CD +
/MY/IFSFLDR/UTILITY')
ADDENVVAR ENVVAR(QIBM_QSH_CMD_OUTPUT) VALUE(NONE) +
LEVEL(*JOB) REPLACE(*YES)
QSH CMD(&SCRIPT)
***********************
JOBLOG:
6000 - ADDENVVAR ENVVAR(QIBM_QSH_CMD_OUTPUT) VALUE(NONE) LEVEL(*JOB)
REPLACE(*YES)
Environment variable added.
6500 - QSH CMD('CD /MY/IFSFLDR/UTILITY')
Command ended normally with exit status 127.
Snippet of the code:
CHGVAR VAR(&SCRIPT) VALUE('CD +
/MY/IFSFLDR/UTILITY')
ADDENVVAR ENVVAR(QIBM_QSH_CMD_OUTPUT) VALUE(NONE) +
LEVEL(*JOB) REPLACE(*YES)
QSH CMD(&SCRIPT)
***********************
JOBLOG:
6000 - ADDENVVAR ENVVAR(QIBM_QSH_CMD_OUTPUT) VALUE(NONE) LEVEL(*JOB)
REPLACE(*YES)
Environment variable added.
6500 - QSH CMD('CD /MY/IFSFLDR/UTILITY')
Command ended normally with exit status 127.