如何将我的Rexx程序作为批处理作业运行? [英] How can I run my Rexx program as a batch job?

查看:191
本文介绍了如何将我的Rexx程序作为批处理作业运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Rexx程序,要作为批处理作业运行.我该怎么办?

I have a Rexx program that I want to run as a batch job. How can I do this?

这是我的程序:-

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

该程序在 PDS ME.USER.EXEC中作为成员HELLO定位.

The program is located as member HELLO in the PDS ME.USER.EXEC.

用于我的安装的有效作业卡是(我们的环境包括 ISPF/PDF 而不是ROSCOE):-

A valid JOB CARD for my installation is (our environment includes ISPF/PDF as opposed to ROSCOE):-

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

注意!这已经写成教程了

推荐答案

可以通过多种方式来批量运行程序.我将介绍3种方式,这些方式根据环境(即它们可以利用的方式)的不同而不同.

There are a number of ways that you can run the program via batch. I will cover 3 ways all of which are different according to the environment (i.e. what they can utilise.)

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

This entails running the program IRXJCL and passing the name of the program (i.e. the PDS's member name) via the PARM field (you can also pass parameters; accessing them via a PARSE ARG statement).

IRXJCL (通常)需要3个 DDNAMES ,它们是 SYSEXEC (程序所在的PDS), SYSTSIN (可以反映终端输入)和 SYSTSPRT (这是发送终端输出的位置).

IRXJCL requires (normally) 3 DDNAMES they are SYSEXEC (The PDS where the program is located), SYSTSIN (this can reflect terminal input) and SYSTSPRT (this is where terminal output is sent).

以下是 JCL ,它将根据上面提供的信息工作:-

Here is the JCL that would work according the information provided above:-

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

此方法尽管最简单(仅JCL几行),但由于它不允许使用以下命令而具有最大的局限性 TSO/E服务,例如TSO/E命令和大多数TSO/E外部 功能.

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.

但是,由于IRXJCL是Rexx处理器,因此无需让 TSO/E知道这是一个Rexx程序(第一行必须包含 REXX).

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 .替代方法是 IKJEFT1A IKJEFT1B .可以通过此方法使用TSO/E服务和命令(例如,使用TIME命令在此方法的末尾注明 )



Method 2 - Run the program from a TSO/E environment

This entails running one of the TSO/E batch processing programs IKJEFT01 is used in this example. Alternatives are IKJEFT1A and IKJEFT1B. TSO/E services and commands can be used via this method (e.g. note at end of this method using the TIME command)

有关程序之间差异的全面信息 可以在为以下内容编写JCL中找到命令 执行

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

用于 IKJEFT01 的JCL与方法1中使用的JCL类似.可以对其他 DDNAME SYSPROC 进行编码. SYSPROC CLISTS 所在的 DDNAME ;除了SYSEXEC之外,您还可以在这里找到Rexx程序(这不是必需的,建议这两者都已编码,并且SYSEXEC用于Rexx程序,而SYSPROC用于CLISTS).

The JCL for IKJEFT01 is similar to that used in Method 1. An additional DDNAME SYSPROC can be coded. SYSPROC is the DDNAME where CLISTS would be located; You can have Rexx programs found here in addition to SYSEXEC (which isn't required, a suggestion is that both are coded and that SYSEXEC is used for Rexx programs and SYSPROC is used for CLISTS).

这是Rexx在第一行的要求 通过TSO/E处理器将Rexx程序与 CLIST 区别开来.因此,如果通过SYSEXEC找到/定位了Rexx程序,那么如果我没记错的话,这个要求就无效了.

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

另一个建议是始终在Rexx程序的第一行中包含REXX>

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

EXEC语句调用 IKJEFT01 程序,而不是 IRXJCL . PARM 可用于指定第一个命令(以及我们的HELLO程序).但是,对于前景,您可以通过终端即 SYSTSIN DDNAME 进行指定.

The EXEC statement invokes the IKJEFT01 program instead of IRXJCL. PARM can be used to specify the first command (and therefore our HELLO program). However, as for foreground, you can specify this via the terminal i.e. the SYSTSIN DDNAME.

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

Here is some JCL that would work for the second method; noting that the HELLO program is invoked via the SYSTSIN DDNAME as instream data :-

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

例如,如果使用了以下内容(即,将TIME添加为另一个 行到SYSTSIN),然后将运行TSO/E TIME命令( 导致时间显示到SYSTSPRT.

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



方法3-在ISPF环境中运行程序

此方法使用 IKJEFT01 程序(有关IKJEFT1A/B的替代方法,请参见方法2).但是,它随后使用 ISPSTART 命令在 ISPF 环境中运行该程序.启用对 ISPF 服务的使用(例如文件剪裁(骨架)ISPF表等).



Method 3 - Run the program in an ISPF environment

This method uses the IKJEFT01 program (see method 2 for IKJEFT1A/B alternatives). However, it then uses the ISPSTART command to run the program in an ISPF environment; enabling the use of ISPF services (e.g file tailoring (skeletons) ISPF tables etc).

ISPF环境还有其他要求,因为需要分配 ISPF 库才能启动ISPF环境.至少将提供的 ISPF 库分配给ddnames ISPPLIB (ISPF面板), ISPMLIB (ISPF消息)& ISPTLIB (ISPF表). ISPPROF 是ISPF保留会话的一些配置文件数据的地方,因此临时存储就足够了(UNIT = SYSDA经常可用,如果不是总是可用的话).

An ISPF environment has additional requirements in that ISPF libraries need to be allocated in order to start an ISPF environment. At a minimum have the supplied ISPF libraries allocated to ddnames ISPPLIB (ISPF Panels), ISPMLIB (ISPF Messages) & ISPTLIB (ISPF Tables). ISPPROF is where ISPF keeps some profile data for the session, so a temporary store is sufficient (UNIT=SYSDA is often available if not always).

请注意,您可能至少会分配安装系统 库(TSO/E命令LISTA可能用于确定 这些来自前台会话).或者,请您与本地友好的系统程序员联系.下面是SYS1.ISPPLIB,SYS1.ISPMLIB和SYS1.ISPTLIB.

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

Here is some JCL that would work for the 3rd method. Note that HELLO is passed as a parameter to the ISPSTART command.

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

请注意,这不是一个全面的书,它应该是一个概述 足够开始批量运行Rexx程序.

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

这篇关于如何将我的Rexx程序作为批处理作业运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆