免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2513 | 回复: 2
打印 上一主题 下一主题

请问如何在RPGLE中加一段代码,让程序等待60秒再执行下一步操作? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-01-16 10:11 |只看该作者 |倒序浏览
请问如何在RPGLE中加一段代码,让程序等待60秒再执行下一步操作?

论坛徽章:
0
2 [报告]
发表于 2010-01-16 18:19 |只看该作者
可以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 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2010-01-17 21:01 |只看该作者

回复 #1 giggsone 的帖子

2楼说的很对。
如果您不想使用clp,也可以使用qcmdexc执行dlyjob成命令来达到延迟的效果!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP