Chinaunix

标题: 怎样update有variable length field 的 file [打印本页]

作者: rakie    时间: 2004-09-29 22:00
提示: 作者被禁止或删除 内容自动屏蔽
作者: xuguopeng    时间: 2004-09-29 22:12
标题: 怎样update有variable length field 的 file
用MOVEL试试吧
作者: rakie    时间: 2004-09-29 22:16
提示: 作者被禁止或删除 内容自动屏蔽
作者: rakie    时间: 2004-10-01 11:38
提示: 作者被禁止或删除 内容自动屏蔽
作者: aeiou    时间: 2004-10-08 13:01
标题: 怎样update有variable length field 的 file
1。检查你的F表定义文件的时候是不是UF的。
2。在D表定义数据结构如下:

  1. D                 DS                                       
  2. D VarStr                  1   200                        
  3. D  sStrLen                       5U 0 OVERLAY(VarStr:1)
  4. D  sStrDta                    198     OVERLAY(VarStr:3)
复制代码

3。在C表用如下方式赋值:

  1. C                   EVAL      sStrLen = %SIZE(W0REFF)                    
  2. C                   EVAL      sStrDta = W0REFF
复制代码


然后再用VarStr去更新文件中的变长字段:
key CHAIN FILE 81
*in81 IFEQ *OFF
EVAL ZGVLOC = VarStr
UPDATE FILE
ENDIF
[/quote]




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2