如何通过 JCL 将参数传递给 REXX 程序

发布于 2024-08-16 00:39:38 字数 96 浏览 5 评论 0原文

我们可以将参数从 JCL 传递给 REXX 程序吗?

我想,JCL PARM 可以像我们用来向 COBOL 程序传递参数一样使用。请把你的想法放在这里......

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...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

谷夏 2024-08-23 00:39:38

您需要EXEC PGM=IRXJCL,PARM='member_name exec_args'SYSEXEC 应指向包含成员名称 的 PDS。 SYSTSINPULL 的输入,SYSTSPRTSAY 的输出 DD

查看“使用TSO/E 和其他 MVS 地址空间中的 REXX”章节位于 TSO/E Rexx 用户指南”一书 (SA22-7791) 了解完整示例。

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.

云淡月浅 2024-08-23 00:39:38

补充说明:如果您的 REXX exec 使用 ISPF 服务,您可以使用 PGM=IKJEFTxx(xx 是变量后缀)批量运行它,并在作业步骤中分配 ISPxLIB。

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.

┼── 2024-08-23 00:39:38

如果参数连同 REXX 成员名称超过 100 字节,Ron Patterson 提到的方法将不起作用,因为 JCL 语法只允许最大参数长度为 100 字节。在这种情况下,我建议使用 IKJEFTxx(已由 Tony 发布)。然后,您必须将 REXX 程序名称作为流内数据传递给 SYSTSIN。该程序的参数可以简单地写在程序名称后面。当需要多行时,请使用连字符作为一行的最后一个字符来指示与下一行的连接。
例子:

//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                                
/*                                                   
//                                                   

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                                
/*                                                   
//                                                   
吃兔兔 2024-08-23 00:39:38

当我尝试运行 IRXJCL 时,我得到了基本 EXECIO、LIBDEF、命令的 RC (-3)。我希望有更好的文档来说明 IRXJCL 可以做什么和不能做什么。

最后按照以下链接中的方法,通过将值写入文件并从文件中读取来动态地将值传递给 REXX。 如何通过 IKJEFT01 实用程序运行动态 SQL ?

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?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文