English 中文(简体)
How to pass arguments to REXX program through JCL
原标题:

Can we pass arguments to a REXX program from JCL?

I suppose, JCL PARM can be used as we use for passing arguments to COBOL programs.. Do put your ideas here...

最佳回答

You want EXEC PGM=IRXJCL,PARM= member_name exec_args . SYSEXEC should point to the PDS containing member name. SYSTSIN is the input for PULL, SYSTSPRT is the output DD for SAY

Check out the "Using REXX in TSO/E and Other MVS Address Spaces" chapter in the "TSO/E Rexx User Guide" book (SA22-7791) for a full example.

问题回答

An added note: If your REXX exec uses ISPF services, you can run it in batch with PGM=IKJEFTxx (xx being a variable suffix) and allocating ISPxLIB in the job step.

If the parameters together with the REXX member name exceeds 100 bytes, the method mentioned by Ron Patterson won t work as JCL syntax only allows a maximum paramater length of 100 bytes. In this case I recommend using IKJEFTxx (already posted by Tony). You then have to pass the REXX program name as instream data to SYSTSIN. The parameters to this program can simply written behind the program name. When you need more than one line, use the hyphen as last character of a line to indicate the concatenation with the following line. Example:

//EXAMPLE  EXEC PGM=IKJEFT01,REGION=4096K,DYNAMNBR=30
//SYSPRINT DD  SYSOUT=*                              
//SYSEXEC  DD  DISP=SHR,DSN=YOUR.REXX.LIBRARY    
//SYSTSPRT DD  SYSOUT=*                              
//SYSTSIN  DD  *                                     
  SCHLABB PARAMETER1 PARAMETER2 PARAMETER3 -
          VERY_LONG_PARAMETER4             -
          LAST_PARAMETER5                                
/*                                                   
//                                                   

I was getting RC (-3) for basic EXECIO, LIBDEF, commands when I tried running IRXJCL. I wish there was better documentation on what IRXJCL can and can not do.

Finally followed the approach from the below link, to dynamically pass values to a REXX by writing them to a file and reading from the file. How to run dymanic SQL through IKJEFT01 Utility?





相关问题
How to read a PS file in reverse order?

I have a PS file to be read in reverse order and process accordingly. Do we have a way to mention to read the file in reverse order in FD in COBOL module? OR do we have something to achieve the same ...

Allocation of memory with LE routines

At Allocation of Memory in Variable-Length Tables NealB mentioned LE routines to allocate/deallocate memory in a non-CICS COBOL program. I d very much like to know how this is done: how the LE ...

How to pass arguments to REXX program through JCL

Can we pass arguments to a REXX program from JCL? I suppose, JCL PARM can be used as we use for passing arguments to COBOL programs.. Do put your ideas here...

How to write a HEX string into a file as HEX using REXX

I have a string RAJA which should be written into a file as HEX data. Here are sample codes which help me to describe the issue. Case(a) name = RAJA name = C2X(name) /* Hex value = 52414A41 *...

Start SQL Server Jobs when field = specific value

I don t know if this is even possible, so i would appreciate any ideas, even those outside of Sql Server 2005, on how this might be accomplished. I have a linked server set up to a remote mainframe ...

热门标签