JCL to Pass Command to REXX Program



IBM's Command List programming language & Restructured Extended Executor

JCL to Pass Command to REXX Program

Postby Krishna22 » Thu May 13, 2021 2:24 am

I am working on REXX Program for the first time and Need help to pass Command through Parameter or SYSTIN Option from JCL to REXX Program

Right now , We are executing manually by executing the REXX Program using EX Option as below.

EX ENV.ABCD.V6R2M0.USERLIB(NCMD)

We get Local Prompt and will provide the command in the local Prompt as below

Local> export binding E1_ABC TSO.DRABC.BINDING.XML

We want to pass the command( export binding E1_ABC TSO.DRABC.BINDING.XML) through a PARM OR SYSTIN .Can this be achieved

REXX Program Details.

Code
ENV.ABCD.V6R2M0.USERLIB(NCMD)

/*REXX*/
"ALLOCATE DDNAME(SYSOUT) DUMMY"
"ALLOCATE DDNAME(SYSDUMP) DUMMY"
"EXEC 'ENV.ABCD.V6R2M0.USERLIB(FCALL)'
'TASKLIB NAVUTIL P('''')' "
"FREE,DDNAME(SYSOUT)"
"FREE DDNAME(SORTWK01)"
RETURN


ENV.ABCD.V6R2M0.USERLIB(FCALL) Code Below

CALL 'ENV.ENV.V6R2M0.LOAD(FCALL)' '&MEM,&P' --------------> Load Program

JCL

//JS30 EXEC IKJEFT01,
// ENV='EN19.',
// APPL='MIS.',
// APPL2='MIS.',
// PARM=NCMD,
// DYNAMNBR=10
//SYSEXEC DD DSN=ENV.ABCD.V6R2M0.USERLIB,
// DISP=SHR
//PARMIN DD DSN=ENV.MIS.PARMLIB(CMD), ----------------> The Parmin member has export command.
// DISP=(SHR,KEEP,KEEP)
//SYSTSIN DD DUMMY

I tried both PARM Option and also Passing command in SYSTSIN Option both didn't work .

After Executing with JOB, The SYSOUT has Local> for 6+ Million Rows and need to manually kill the job.

Local>
Local> ... 6 Million

Our requirement is execute the below command either passing thru dataset or SYSTSIN Option
export export binding E1_ABC TSO.DRABC.BINDING.XML

Note : REXX Programs are provided by Vendor and only we are writing JCL to run the REXX Program and pass the command.
Appreciate if you can help on this.

Thank you,
Krishna
Krishna22
 
Posts: 1
Joined: Thu May 13, 2021 12:52 am
Has thanked: 0 time
Been thanked: 0 time

Re: JCL to Pass Command to REXX Program

Postby willy jensen » Thu May 13, 2021 2:42 am

Something like:
//JS30 EXEC PGM=IKJEFT01,PARM='%NCMD EN19.MIS.MIS.'
//SYSEXEC  DD DISP=SHR,DSN=ENV.ABCD.V6R2M0.USERLIB
//PARMIN DD DSN=ENV.MIS.PARMLIB(CMD),
// DISP=(SHR,KEEP,KEEP)
//SYSTSIN DD DUMMY
//SYSTSPRT DD SYSOUT=*
willy jensen
 
Posts: 467
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 70 times

Re: JCL to Pass Command to REXX Program

Postby sergeyken » Thu May 13, 2021 2:47 am

I’ve tried to read the post about 15 times. Nothing except senseless bullshit of words, some code with definitely syntax errors, with absolutely no idea how one part is related to any other of them?

First, learn how to use code tags, and how to align the lines of code, for someone to be able to understand something.
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 438
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Re: JCL to Pass Command to REXX Program

Postby willy jensen » Thu May 13, 2021 2:54 am

of course you need an 'parse arg parm' or 'parse upper arg parm' at the top of your program to pull in the parameter string.
willy jensen
 
Posts: 467
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 70 times

Re: JCL to Pass Command to REXX Program

Postby Pedro » Sat May 15, 2021 3:39 am

re: "We get Local Prompt and will provide the command in the local Prompt as below"

It seems like your NCMD calls compiled program LOAD(FCALL) which displays an ISPF panel where you type in your EXPORT command. Is this correct? If so, I think you need to re-write FCALL so that it does not display the ISPF panel.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post