gpt4 book ai didi

batch-processing - 如何将我的 Rexx 程序作为批处理作业运行?

转载 作者:行者123 更新时间:2023-12-05 08:33:31 26 4
gpt4 key购买 nike

我有一个要作为批处理作业运行的 Rexx 程序。我该怎么做?

这是我的程序:-

/* Rexx – HELLO – Write Hello World */
Say "hello World"

该程序位于 PDS ME.USER.EXEC 中的成员 HELLO

我的安装的有效 JOB CARD 是(我们的环境包括 ISPF/PDF 而不是 ROSCOE):-

//MYJOB    JOB ,,CLASS=1,MSGCLASS=H,NOTIFY=&SYSUID

注意!这是作为教程编写的

最佳答案

您可以通过多种方式通过批处理运行程序。我将介绍 3 种方法,所有这些方法都因环境而异(即它们可以利用什么。)



方法 1 - 在 Rexx 环境中运行程序。

这需要运行程序 IRXJCL 并通过 PARM 字段传递程序名称(即 PDS 的成员名称)(您也可以传递参数; 通过 PARSE ARG 语句访问它们)。

IRXJCL需要(通常)3个DDNAMES它们是SYSEXEC(程序所在的PDS),SYSTSIN(这可以反射(reflect)终端输入)和 SYSTSPRT(这是发送终端输出的地方)。

这是根据上面提供的信息工作的 JCL:-

//MYJOB    JOB ,,CLASS=1,MSGCLASS=H,NOTIFY=&SYSUID
//*-------------------------------------------------------------------
//RUNPROG EXEC PGM=IRXJCL,PARM=’HELLO’
//*
//* RUN OUR REXX PROGRAM CALLED HELLO
//*
//SYSEXEC DD DSN=ME.USER.EXEC,DISP=SHR
//SYSTSIN DD DUMMY
//SYSTSPRT DD SYSOUT=*
//*-------------------------------------------------------------------

This method, although the simplest (by just a few lines of JCL), is the most restrictive in that it does not allow the use of TSO/E services, such as TSO/E commands and most of the TSO/E external functions.

However, as IRXJCL is a Rexx processor, there is no requirement to let TSO/E know that it is a Rexx program (the first line must include REXX).



方法 2 - 从 TSO/E 环境运行程序

这需要运行 TSO/E 批处理程序之一 IKJEFT01,此示例中使用了该程序。备选方案是 IKJEFT1AIKJEFT1B。可以通过此方法使用 TSO/E 服务和命令(例如,在使用 TIME 命令的方法末尾注明)

Comprehensive information about the differences between the programs can be found at Writing JCL for command execution

IKJEFT01 的 JCL 类似于方法 1 中使用的 JCL。可以对额外的 DDNAME SYSPROC 进行编码。 SYSPROCDDNAMECLISTS 所在的位置;除了 SYSEXEC 之外,您还可以在此处找到 Rexx 程序(这不是必需的,建议对两者进行编码,并且 SYSEXEC 用于 Rexx 程序,SYSPROC 用于 CLISTS)。

It's the requirement that Rexx is on the first line that differentiates a Rexx program from a CLIST (by the TSO/E processor). Thus, if the Rexx program is found/located via SYSEXEC, if I recall correctly, this negates the requirement).

Another suggestion is to always include REXX in the first line of a Rexx program>

EXEC 语句调用IKJEFT01 程序而不是IRXJCLPARM 可用于指定第一个命令(因此我们的 HELLO 程序)。但是,对于前台,您可以通过终端指定它,即 SYSTSIN DDNAME

这是一些适用于第二种方法的 JCL;注意 HELLO 程序是通过 SYSTSIN DDNAME 作为 instream 数据调用的:-

//MYJOB    JOB ,,CLASS=1,MSGCLASS=H,NOTIFY=&SYSUID
//*-------------------------------------------------------------------
//RUNPROG EXEC PGM=IKJEFT01
//*
//* RUN OUR REXX PROGRAM CALLED HELLO IN A TSO/E ENVIRONMENT
//*
//SYSPROC DD DSN=ME.USER.CLIST,DISP=SHR
//SYSEXEC DD DSN=ME.USER.EXEC,DISP=SHR
//SYSTSIN DD *
HELLO
//SYSTSPRT DD SYSOUT=*
//*-------------------------------------------------------------------

If, for example, the following were used (i.e. added TIME as another line to SYSTSIN) then the TSO/E TIME command would be run (which would cause the time to be displayed to SYSTSPRT).

//SYSTSIN  DD *
HELLO
TIME


方法三——在ISPF环境下运行程序

此方法使用 IKJEFT01 程序(请参阅方法 2 了解 IKJEFT1A/B 替代方案)。然而,它随后使用ISPSTART 命令在ISPF 环境中运行该程序;启用 ISPF 服务(例如文件定制(骨架)ISPF 表等)。

ISPF 环境有额外的要求,因为需要分配 ISPF 库才能启动 ISPF 环境。至少将提供的 ISPF 库分配给 ddnames ISPPLIB(ISPF 面板)、ISPMLIB(ISPF 消息)和 ISPTLIB (ISPF 表)。 ISPPROF 是 ISPF 为 session 保存一些配置文件数据的地方,因此临时存储就足够了(UNIT=SYSDA 通常可用,但并非总是可用)。

Note you would likely allocate, at a minimum, the installations system libraries (the TSO/E command LISTA can likely be used to determine these from a foreground session). Alternately, ask you local friendly system programmers. In the following they are SYS1.ISPPLIB, SYS1.ISPMLIB and SYS1.ISPTLIB.

这是一些适用于第三种方法的 JCL。请注意,HELLO 作为参数传递给 ISPSTART 命令。

//MYJOB    JOB ,,CLASS=1,MSGCLASS=H,NOTIFY=&SYSUID
//*-------------------------------------------------------------------
//RUNPROG EXEC PGM=IKJEFT01
//*
//* RUN OUR REXX PROGRAM HELLO IN A TSO/E/ISPF ENVIRONMENT
//*
//SYSPROC DD DSN=ME.USER.CLIST,DISP=SHR
//SYSEXEC DD DSN=ME.USER.EXEC,DISP=SHR
//ISPPLIB DD DSN=SYS1.ISPPLIB,DISP=SHR
//ISPMLIB DD DSN=SYS1.ISPMLIB,DISP=SHR
//ISPTLIB DD DSN=SYS1.ISPTLIB,DISP=SHR
//ISPPROF DD UNIT=SYSDA,SPACE=(CYL,(10,1)),
// RECFM=FB,LRECL=80,BLKSIZE=0
//SYSTSIN DD *
ISPSTART CMD(HELLO)
//SYSTSPRT DD SYSOUT=*
//*-------------------------------------------------------------------

Note this is not a fully comprehensive, it is an overview that should suffice for getting started with running Rexx programs in batch.

关于batch-processing - 如何将我的 Rexx 程序作为批处理作业运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38867243/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com