-2

在 z/OS 系统上工作,我不是编程团队的一员,但我知道一些编程知识。我们有一个正在使用的工具,可以输出 JCL + NDM 以将文件从公司发送到客户。我可以在提交卡片之前手动添加和查看输出。

根据客户的要求,我正在寻找一种影响传输时间的方法。我想保持简单,只需在提交之前修改 JCL + NDM。他们希望每次传输之间有几分钟(执行 NDM 脚本),传输文件的时间可能会有所不同。

我可以使用哪些命令?我做了一些搜索,看起来大多数人认为这是一个糟糕的主意,尽管我不清楚为什么(对大型机来说还是新手)。

我遇到了 NDM MAXDELAY,但我不相信这会有所帮助,它看起来更像是一种排队机制而不是延迟。

另一个人提到 JCLSTARTT可以将它们隔开......如果我们知道它们需要多长时间才能发送。

我希望有一些东西会造成延迟。我们已经将优先级设置为单线程脚本并一次发送一个。

由于我在同一个脚本中有 JCL 和 NDm,我可以使用其中任何一个来进行延迟。

作为参考,在其他语言中,大多数语言都有可用的waitdelay或其他命令。此外,有时这些命令也有特殊之处。Arduino 在 a 期间停止所有执行delay,因此不推荐。

4

4 回答 4

2

如果您可以向 JCL 添加一个步骤,那么...

//WAITABIT EXEC PGM=BPXBATCH,PARM='SH sleep 10s'
//STDOUT   DD  SYSOUT=*
//STDERR   DD  SYSOUT=*

...可能是您正在寻找的东西。sleep shell 命令随 z/OS 提供。

有些人担心这会不必要地捆绑发起者。

于 2020-02-05T04:26:36.397 回答
1

仅供参考,NDM(网络数据移动器)被称为 Connect:Direct 已经有一段时间了。

您是否考虑过使用 DGADWAIT,即运行任务等待程序?

于 2020-02-07T04:57:03.387 回答
1

z/OS 2.2 确实引入了允许提交作业但将执行延迟到某个特定日期/时间的SCHEDULE语句。

它可能看起来像这样:

// SCHEDULE HOLDUNTL=('02:37','02/13/2020')

但是无论是HOLDUNTL还是STARTBY参数都不能保证确切的开始时间。

因此,如果您想有一个短暂的延迟,您可以使用 cschneid 的解决方案,在未来某个时间的固定开始时间,上述解决方案将避免不必要地阻塞启动器。

于 2020-02-05T07:18:42.227 回答
0

That's not the way mainframes work. The idea of putting a fixed delay into a batch job means you haven't defined your process properly (Why are you waiting? What are you waiting for? Why not just use some of the myriad of tools available to you to schedule the second part of the process once whatever you are waiting for has occurred?).

If you have a bunch of files to transfer, then just submit a batch job or jobs to transmit the files and they get there when they get there. If you have a specific requirement to run the batch jobs at specific intervals then either have the process that creates and submits the JCL only do so at intervals, or you could get the software to write each file to a dataset and have another process read that file every xxx minutes and build a transmission job for the eligible files.

The problem you have is that you are trying to modify a perfectly acceptable process (build a batch job to send a file and then submit the job) to do something different, because either the client's requirements have changed (they can't receive the files in an ad-hoc fashion anymore - usually because their processes around incoming files are bad) or were not properly understood from the outset.

If you can't modify the process, then you're going to have to ad-lib it. One option would be to direct the transmission jobs to an inactive initiator (the part of the system the executes jbatch jobs) and then have some automation to briefly start and then stop the initiator every xxx minutes, allowing just one job to run at a time.

If you want each transmission to run in sequence once the previou sone has completed, then just give all the batch jobs the same name (so they have to run single-stream) and use MAXDELAY=0.

于 2020-02-10T10:44:38.947 回答