请问如何在RPGLE中加一段代码,让程序等待60秒再执行下一步操作?
请问如何在RPGLE中加一段代码,让程序等待60秒再执行下一步操作?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
请问如何在RPGLE中加一段代码,让程序等待60秒再执行下一步操作?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
2楼说的很对。
如果您不想使用clp,也可以使用qcmdexc执行dlyjob成命令来达到延迟的效果!
可以call一个clp子程序,子程序就一个命令(DLYJOB),可以设置延迟时间。
ps:好像我记得一个 api可以直接执行400命令,不是很记得了。。。:wink:
DLYJOB (Delay Job) Command Description
Purpose
The Delay Job (DLYJOB) command causes the current job to wait for a specified number of seconds, or until a specified time of day, before running resumes.
Required Parameters
DLY
Specifies the number of seconds to delay the job. The DLY keyword allows up to 999999 seconds (approximately 11 days, 14 hours). This parameter and the RSMTIME parameter are mutually exclusive.
RSMTIME
Specifies the time of day the job resumes running. When specifying a resume time, the date is implied by the time specified. If the resume time is later than the current time of day, the date is assumed to be the current date. If the resume time is earlier than the current time of day, tomorrow's date is assumed (the delay lasts until that time tomorrow). This parameter and the DLY parameter are mutually exclusive.
Examples for DLYJOB
Example 1: Delaying a Job for 15 Seconds
DLYJOB DLY(15)
This command delays running of the job for 15 seconds.
Example 2: Delaying a Job Until Midnight
DLYJOB RSMTIME('000000')
This command delays running of the job until midnight tonight.
Error messages for DLYJOB
None:wink: :wink: :wink:
[ 本帖最后由 insmile 于 2010-1-16 18:26 编辑 ]