My FAQ,最新最全的IT技术FAQ
最新100篇 | 推荐100篇 | 专题100篇 | 排行榜 | 搜索 | 在线API文档
首 页 | 程序开发 | 操作系统 | 软件应用 | 图形图象 | 网络应用 | 精文荟萃 | 教育认证 | 未整理篇 | 技术讨论
  当前位置: > 操作系统 > IBM Server
tips:Record Locks
作者:未知 时间:2005-09-13 15:43 出处:ChinaUnix.net 责编:My FAQ
              摘要:tips:Record Locks

by Barbara Morris

If you are processing records in a primary file and you want to just skip any records that get input errors, you can code an INFSR subroutine for the file. On the ENDSR of the subroutine, code '*GETIN'. That will cause control to go to the part of the cycle that gets the next record.
[code:1:cffb8a82d5]
Fmyfile    ip   e             disk    infsr(myinfsr)
C     myinfsr       begsr
C                   ... file error
C                       endsr     '*GETIN'[/code:1:cffb8a82d5]
If you also want to ignore program errors encountered when processing the data in a record, code a *PSSR subroutine the same way. If you don't have any file-specific processing in your INFSR subroutine, you can use the *PSSR as the INFSR.
[code:1:cffb8a82d5]
Fmyfile    ip   e             disk    infsr(*pssr)
C     *pssr         begsr
C                   ... general error
C                   endsr     '*GETIN'[/code:1:cffb8a82d5]
If you don't always want to just go straight to the next record, you can soft-code the return point on the ENDSR.
[code:1:cffb8a82d5]
Fmyfile    ip   e             disk    infsr(myinfsr)
D infsrEnd        s              6a
D recordLock      c                   1218
C     myinfsr       begsr
C                   eval      infsrEnd = '*CANCL'
C                   if        %status(myfile) = recordLock
C                   eval      infsrEnd = '*GETIN'
C                   endif
C                   endsr     infsrEnd
 [/code:1:cffb8a82d5]

【发表回复】【查看CU论坛原帖】【添加到收藏夹】【关闭
 michael9406 回复于:2003-12-31 14:33:38
这么好的贴子是该设为精华了。

 yoyoage 回复于:2003-12-31 15:17:31
:oops: 没错,可是 :em06: ,不是原创阿 :em06: 。。。
多谢老大鼓励~

 stephenxie2003 回复于:2003-12-31 16:11:13
鼓励鼓励!
 :)

 riancy1106 回复于:2003-12-31 16:51:31
永远支持

 sean810 回复于:2004-01-02 09:21:54
Very Good!

 yj2yq 回复于:2004-01-02 09:43:28
支持!大家一起来!

 stephenxie2003 回复于:2004-01-02 14:38:34
建议:
用中文也写一下吧!
来个双语版的!

 yoyoage 回复于:2004-01-02 15:31:54
有时间写好了再给大家:----我担心的是,英文的海勉强可以看懂,被我一折腾成中文的,就没人看懂了HOHO~

 andrewleading_he 回复于:2004-01-03 16:16:23
支持!

 
首页 | 投资与合作 | 服务条款 | 隐私政策 | 收藏本站 | 设为首页 | 新用户注册 | 免责声明 | 使用帮助
Copyright ©2005-2008 myfaq.com.cn All rights reserved. www.myfaq.com.cn 版权所有