Skip to content

Commit

Permalink
cat datasets with dollar sign
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Zeithaml <[email protected]>
  • Loading branch information
Martin-Zeithaml committed May 14, 2024
1 parent bb10e99 commit f4f1d31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/libs/zos-jes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function submitJob(jclFileOrContent: string, printJobDebug:boolean=true,

common.printTrace(`- content of ${jclFileOrContent}`);
if (!jclIsContent) {
const catResult = shell.execOutSync('sh', '-c', `cat "${jclFileOrContent}" 2>&1`);
const catResult = shell.execOutSync('sh', '-c', `cat "${stringlib.escapeDollar(jclFileOrContent)}" 2>&1`);
if (catResult.rc != 0) {
common.printTrace(` * Failed`);
common.printTrace(` * Exit code: ${catResult.rc}`);
Expand All @@ -40,7 +40,7 @@ export function submitJob(jclFileOrContent: string, printJobDebug:boolean=true,

// cat seems to work more reliably. sometimes, submit by itself just says it cannot find a real dataset.
const result = shell.execOutSync('sh', '-c', jclIsContent ? `echo "${jclFileOrContent}" | submit 2>&1`
: `cat "${jclFileOrContent}" | submit 2>&1`);
: `cat "${stringlib.escapeDollar(jclFileOrContent)}" | submit 2>&1`);
// expected: JOB JOB????? submitted from path '...'
const code=result.rc;
if (code==0) {
Expand Down

0 comments on commit f4f1d31

Please sign in to comment.