subfile中readc的疑问
本帖最后由 rise720 于 2010-09-28 13:33 编辑
设计了一个subfile,其中,只有option字段是可输入的. 希望是在subfile中通过用'1'选择某条记录,然后进行操作
我原意是用readc循环查找subfile中修改过的记录,即标记'1'的记录
但发现所有记录,包括没做任何操作的记录,也被readc读了出来.请问下为什么? 需要注意什么地方么?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
不会看源码,只会在SDU上弄
回复 6# NINERI
确实如此,谢谢回复!
在reference中查了下相关信息,与大家分享下
Subfile operations with SFLNXTCHG
If the program detects typing errors in the changed records, it can send update operations (UPDATE in RPG IV, REWRITE SUBFILE in COBOL) to the subfile records in error, setting indicators so that SFLNXTCHG is in effect during the update operations. These update operations are sent to the subfile record format.
After all the records in error have been updated, the program sends an input/output operation to the subfile-control record format to display the subfile again. With the subfile displayed again, the workstation user types the data again and presses the Enter key. If the data is correct, the program does not display the subfile again. The records in error (and any other records changed by the workstation user) are returned to the program on the next get-next-changed operation. This is because SFLNXTCHG caused the subfile records to be considered changed even though the workstation user did not change them. This allows the program to prohibit the workstation user from ignoring program-detected typing errors in subfile records.
Subfile operations without SFLNXTCHG
If SFLNXTCHG is not specified, or is specified but not selected on the update operations to the subfile records, then the workstation user can press the Enter key instead of correcting the program-detected errors. The program then reads no records because the get-next-changed operations find no changed records the second time the Enter key is pressed. Option indicators are valid for this keyword.
SFLNXTCHG 加一個指示器 如66
SETON 66
UPDATSFL01
SETOF 66
试过了,不行. SFLNXTCHG是RECORD LEVEL的keyword吧?
要复制代码的话,只要点编辑帖子里的工具栏 '代码' 一栏即可
DDS 中SFLNXTCHG keyword放到S1OPT 下面你试试,
请教你源代码怎样复制贴的这样漂亮的?
本帖最后由 rise720 于 2010-09-28 13:50 编辑
复制代码
复制代码麻烦了!
能不能把那段代码贴上来,这么说不是很明确