I have been trying to run the OGET-command from within a JCL. Normally I would use the ishell-command line using ISPF;6 and then run the command from there, however, this job is so big that I need to automate the task.
What I have tried so far is to use IKJEF01, IKJEFT01 and the OSHELL-command, and BPXBATCH to send the command, but none have worked.
The command I wish to use is the following:
OGET '/CPU/TMP/filename.IND' 'library.INDEX.EHH' BINARY CONVERT(NO)
My attempt with IKJEFT01 and OSHELL:
//TMP1 EXEC PGM=IKJEFT01,
// DYNAMNBR=200
//SYSPROC DD DSN=SYS1.SBPXEXEC,DISP=SHR
//*
//SYSTSPRT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//*
//SYSTSIN DD *
OSHELL OGET '/CPU/TMP/filename.IND' 'library.INDEX.EHH' -
BINARY CONVERT(NO)
//*
My attempt using BPXBATCH:
//SHELLCMD EXEC PGM=BPXBATCH
//STDERR DD SYSOUT=*
//STDOUT DD SYSOUT=*
//STDPARM DD *
SH OGET '/CPU2/TMP/filename.IND' 'library.INDEX.EHH' BINARY CONVERT(NO)
/*
Both methods produce the same error:
FSUM1006 A shell was not specified. Processing continues using the default shell name.
FSUM7332 syntax error: got (, expecting Newline
If I remove CONVERT(NO), I get the following errors instead:
FSUM1006 A shell was not specified. Processing continues using the default shell name.
OGET: FSUM7351 not found
Can anybody help?
OGET is a TSO command, and is directly accessible via IKJEFT01. There is no need to invoke OSHELL or BPXBATCH (BTW... OSHELL is just a REXX that invokes BPXBATCH).
Simply use OGET directly (without the OSHELL command) in your original JCL and it will work: