免费注册 查看新帖 |

Chinaunix

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

如何在RPG中显示屏幕后,程序继续执行,不需要按执行键什么的? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-07-11 15:03 |只看该作者 |倒序浏览
RPG中,EXFMT 后会等用户按ENTER后程序才继续执行。现在我想屏幕显示出来后,程序继续执行。而不是等待用户输入。

CL程序中可以做到,SNDRCVF RCDFMT(AAAA) WAIT(*NO)
我就是想在RPG中实现这样的效果。

论坛徽章:
0
2 [报告]
发表于 2008-07-11 15:14 |只看该作者
用WRITE呢?

论坛徽章:
0
3 [报告]
发表于 2008-07-11 15:18 |只看该作者
用WRITE看不到屏幕,只会在左下角显示*SYSTEM。呵呵

论坛徽章:
0
4 [报告]
发表于 2008-07-11 16:27 |只看该作者
exfmt ddsrec

change to

write ddsrec

you can get your purpose.


exfmt ddsrec

equal to

write ddsrec
read ddsrec

[ 本帖最后由 passthru 于 2008-7-11 16:30 编辑 ]

论坛徽章:
0
5 [报告]
发表于 2008-07-11 16:30 |只看该作者
用WRITE程序是继续执行了,但是屏幕并没有显示出来,所以这样做不行。

论坛徽章:
0
6 [报告]
发表于 2008-07-11 16:33 |只看该作者
用 delay 方法

论坛徽章:
0
7 [报告]
发表于 2008-07-11 17:20 |只看该作者
用 write, 带上这个参数试试
CRTDSPF FILE(#LIB/DSPF) DFRWRT(*NO)

论坛徽章:
0
8 [报告]
发表于 2008-07-11 20:10 |只看该作者
可以用自动刷屏的写法

论坛徽章:
0
9 [报告]
发表于 2008-07-11 21:35 |只看该作者
To optimize operations, AS/400 doesn't update the screen until (or unless) you request a READ operation from the display file. In most cases, this is desirable behavior. If you "paint" the screen by writing several pieces one after another, the AS/400's default treatment makes the result appear all at once.

You need to defeat this feature with the DFRWRT parameter of either the Create Display File (CRTDSPF) command or the Change Display File (CHGDSPF) command. If you haven't already compiled the display file, run CRTDSPF with DFRWRT(*NO). If the display file already exists, use CHGDSPF DFRWRT(*NO).

Then you can use WRITE statement to display.

论坛徽章:
0
10 [报告]
发表于 2008-07-16 08:57 |只看该作者
yes 楼上正解,非常感谢!!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP