如何清除 AS400 上的屏幕?
AS400有什么方法可以清除RPG中的屏幕吗?我正在寻找与 C 中的 clrscr() 具有相同结果的东西。
Is there any method to clear the screen in RPG for the AS400? I'm looking for something with the same result as clrscr()
in C.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可以使用 RPG 清除屏幕,但 RPG 不像 clrsrc()
那样直接寻址屏幕。您使用设备文件,也称为显示文件 (DSPF)。创建该文件的标准方法是使用 DDS 源和 DDS 编译器(始终在 AS/400 上可用)。 DSPF 具有一条或多条记录。 RPG程序写入或读取这些记录。如果你写一条用关键字CRLR()定义的记录,那么你的屏幕就会清晰。另请阅读与此关键字密切相关的 OVERLAY()。
所有信息均位于 IBM 信息中心。 IBM DDS 参考 (pdf)
我想您需要从理解该机制开始(RPG 程序员指南(pdf) 非常简单,但需要阅读一些
免责声明:还有更多方法可以做到这一点(包括肮脏和令人讨厌的技巧)。也是 iSeries 世界中最常用的方式。
You can clear the screen with RPG, but it's not like clrsrc()
RPG does not address the screen directly. You work with a device file aka display file (DSPF). The standard way to create that file is with DDS source and the DDS compiler (always available on a AS/400). The DSPF has one or more records. The RPG program writes or reads these records. If you write a record that is defined with the keyword CRLR(), then your screen will be clear. Also read about OVERLAY() that goes hand in hand with this keyword.
All information is in the IBM information center. DDS is described in the IBM DDS reference (pdf)
I guess that you need to start with understanding the mechanism (RPG programmers guide (pdf). It is quite simple but need a little reading.
Disclaimer: there are more ways to do this (including dirty & nasty tricks). But RPG+DDS is the preferred, standard, and most-used way in the iSeries world.
在 AS/400(大学)和 IBM/390(商业)上进行过编程后,我不记得如何在 RPG IV 中执行此操作,但快速搜索在讨论使用 ILE 动态屏幕管理器的页面上找到了命中此处< /a>.
希望这有帮助,
此致,
汤姆.
Having had programmed on AS/400 (College) and IBM/390 (Commercial), I cannot remember how to do this in RPG IV, but a quick search yielded the hit here on a page that talks about using ILE dynamic screen manager here.
Hope this helps,
Best regards,
Tom.
好吧,我在 RPG 程序中清除屏幕的最佳方法是在 DSPF 文件中使用新记录。
Well , the best way that I use to clear screans in a RPG program is using a new Record inside the DSPF file.
只需设计一个新的显示文件,记录为空,并在RPG程序中使用它
Just design a new display file with empty record and use it in RPG program