免费注册 查看新帖 |

Chinaunix

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

I/O error CPF5029 问题求教 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-05-14 19:16 |只看该作者 |倒序浏览
5可用积分
本帖最后由 cloudrack_chen 于 2010-03-15 15:09 编辑

最佳答案

查看完整内容

RPG 支持NULL, 定义H表就好H ALWNULL(*USRCTL)

论坛徽章:
0
2 [报告]
发表于 2009-05-14 19:16 |只看该作者
RPG 支持NULL, 定义H表就好
H ALWNULL(*USRCTL)

论坛徽章:
0
3 [报告]
发表于 2009-05-15 13:58 |只看该作者
Check the job log for a complete description of message

论坛徽章:
0
4 [报告]
发表于 2009-05-18 09:51 |只看该作者
不太确认是否是这个message

Message ID . . . . . . . . . :   CPF5029                                       
Message file . . . . . . . . :   QCPFMSG                                       
  Library  . . . . . . . . . :     QSYS                                       
                                                                              
Message . . . . :   Data mapping error on member &4.                           
Cause . . . . . :   A data mapping error occurred on member &4 file &2 in      
  library &3, because the data fields in record number &6, record format &7,   
  member number &8 are in error.                                               
Recovery  . . . :   If the record number is zero, the error occurred on an     
  attempt to put or update a record through a logical file, or the error      
  occurred on a group by operation, or the error was caused by a default      
  value, or the error was caused by a null value in the record.  See           
  previously listed message CPF5035 or CPD5036 to determine which fields are   
  in error.  Change the fields that are in error and try the operation again.  
    If the record number is not zero, the error occurred on an attempt to read
  an existing record from a file.  See previously listed message CPF5035 or   
  CPD5036 to determine which physical file fields are in error. Then either   
  delete the record from the file or change the data in the fields that are in
  error. Then try your request again.                                          
Possible choices for replying to message . . . . . . . . . . . . . . . :      
  C -- The request is canceled.                                                
  I -- The request is ignored.                                                


检查你的job log看看是否有CPF5035或CPF5036, 检查error code是几, 再查具体原因.

See previously listed message CPF5035 or   
  CPD5036 to determine which physical file fields are in error.


Message ID . . . . . . . . . :   CPF5035                                       
Message file . . . . . . . . :   QCPFMSG                                       
  Library  . . . . . . . . . :     QSYS                                       
                                                                              
Message . . . . :   Data mapping error on member &1.                           
Cause . . . . . :   A data mapping error occurred on field &9 in record number
  &5, record format &7, member number &8, in member &1 file &2 in library &3,  
  because of error code &6. The error code meanings follow:                    
    1 -- There is data in a decimal field that is not valid.                  
    2 -- A significant digit was truncated.                                    
    3 -- A floating point value exceeded the maximum representable value.      
    4 -- A floating point value was less than the minimum representable value.
    5 -- A binary floating point value could not be used for the attempted     
  operation because it is not a number, or is not valid.                       
    6 -- A floating point value could not be mapped to packed decimal, zoned   
  decimal, or binary.                                                         
    8 -- A binary floating point value that is not a number is not allowed as  
a key value.                                                                 
   9 -- Division by zero.                                                     
   10 -- A partial binary key field could not be mapped.  The length of the   
key did not include the entire binary field.                                 
   11 -- A partial key field could not be mapped.  The length of the key did  
not include the entire binary, floating point, date, or timestamp field.     
   12 -- There is data in a DBCS field that is not valid.                     
   13 -- Group by results could not be determined because no records were     
selected.                                                                    
   14 -- The length of a variable length field is not valid or the data in a  
substring variable is not valid.                                             
   15 -- A date value is greater than the maximum allowed value.              
   16 -- A date value is less than the minimum allowed value.                 
    17 -- The format of the data in a date, time, or timestamp field is not   
  valid.                                                                       
    18 -- There is data in a date, time, or timestamp field that is not valid.
    19 -- An unexpected null field was found.                                 
    20 -- A field that is not null capable could not be set to null.           
    21 -- The data has been converted from one CCSID to another. However,      
  substitution characters were used for characters which could not be         
  converted.                                                                  
    22 -- A shift-out character was found while converting to a single or      
  mixed byte CCSID or a substitution character was found. The data could not   
  be converted.                                                               
    23 -- The data could not be converted from one CCSID to another.           
    24 -- The data could not be converted from an ASCII CCSID to an EBCDIC     
  CCSID, or could not be converted from or to a UCS-2 (Universal Coded         
  Character Set) CCSID. The addition of shift-out and shift-in characters or   
  the expansion of single-byte data to a double-byte value caused the         
  converted length to be larger than the maximum length the result could hold.
    25 -- Hash value cannot be computed for the requested query.               
    If the error occurred on an attempt to read an existing record, file &2 in
  library &3 identifies the name of the physical file containing the field     
  contributing to the mapping error. Otherwise, the error occurred on an      
  attempt to put or update a record in a file and the file name identifies the
  open file that contains the field contributing to the mapping error.  If the
  field name is *N, the field name is not known or is a default value.         


Message ID . . . . . . . . . :   CPD5036                                       
Message file . . . . . . . . :   QCPFMSG                                       
   Library  . . . . . . . . . :     QSYS                                       
                                                                                
Message . . . . :   Data mapping error on member &1.                           
Cause . . . . . :   A data mapping error occurred on field &10 in record      
   number &5, record format &7, member number &8, in member &1 file &2 in      
   library &3, because of error code &6. The error codes and their meanings     
   follow:                                                                     
     26 -- For the CAST operation, a source character was found that is not     
   valid.                                                                       
     27 -- For the CAST operation, the character destination field is too short
   to hold all the significant digits of the source.                           
     28 -- User-defined function &9 returned a mapping error.                  
     29 -- Java user-defined function with external name &9 returned a mapping  
   error.                                                                       
     30 -- For an identity column, the range of values has been exhausted.      
    31 -- For a rowid column, the value is not valid.                          
    32 -- The total length of the fields of the file is greater than           
  3,758,096,383.                                                               
    33 -- The resulting length of a concatenation operation involving a        
  varying-length field exceeded the maximum allowed length for the result      
  type.                                                                        
    34 -- The data could not be converted from or to a UTF-8 or UTF-16 CCSID.  
  The expansion of single-byte data to a double-byte value caused the         
  converted length to be larger than the maximum length the result could hold.
    35 -- The data was not valid in a decimal floating point field.            
    36 -- The SQL subscript &11 is not valid.                                 
    37 -- The XMLCOMMENT parameter starting with &12 is not valid.            
    38 -- The XMLPI parameter starting with &12 is not valid.                  
    39 -- The XML string starting with &12 contains the invalid character &13  
  (0xhex(&13)).                                                               
    If the error occurred on an attempt to read an existing record, file &2 in
  library &3 identifies the name of the physical file containing the field     
  contributing to the mapping error. Otherwise, the error occurred on an      
  attempt to put or update a record in a file and the file name identifies the
  open file that contains the field contributing to the mapping error.  If the
  field name is *N, the field name is not known or is a default value.

论坛徽章:
0
5 [报告]
发表于 2009-05-26 22:12 |只看该作者
这个问题难道没有人知道怎么具体解决吗?或是我描述不够清楚?
现在我重新把问题进行描述如下:
本人用DDS建的表中,有的字段用ALWNULL进行了定义,这些字段定义后其默认值为空值。而后我的RPG程序在读取到这个表时,发现读取到的记录中存在有空值,所以就报了这个错误CPF5029。现在我想知道在RPG中要如何才能解决空值这个问题?因为在RPG中,是无法对空值的记录进行操作的,换句话说,RPG并不支持空值,而SQL可以。
难道一定要把表的全部字段都设置为非空才行吗?希望有处理过类似问题的大侠们不吝赐教!

论坛徽章:
0
6 [报告]
发表于 2009-05-27 10:09 |只看该作者
原帖由 tme45 于 2009-5-14 19:16 发表
RPG 支持NULL, 定义H表就好
H ALWNULL(*USRCTL)


昨晚我查了一晚的资料,终于找到另外一个解决办法了,跟老兄的办法异曲同工,我是在编译的时候,把Allow null values这个选项置为*YES就可以了(CRTRPGPGM和CRTBNDRPG都有该选项),调试程序时,读取到空值的字段,程序会将空值认同为空格或0。问题解决!!

论坛徽章:
0
7 [报告]
发表于 2009-06-01 18:24 |只看该作者
又学到了一招~O(∩_∩)O~

论坛徽章:
0
8 [报告]
发表于 2009-12-01 11:01 |只看该作者
原帖由 cloudrack_chen 于 2009-5-27 10:09 发表


昨晚我查了一晚的资料,终于找到另外一个解决办法了,跟老兄的办法异曲同工,我是在编译的时候,把Allow null values这个选项置为*YES就可以了(CRTRPGPGM和CRTBNDRPG都有该选项),调试程序时,读取到空值 ...



  我已经修改Allow null values这个选项置为*YES,但是还是提示相同的成为,使用UPDDTA命令直接看数据,在看到错误数据是提示A data or key conversion error occurred.请问还是什么方法解决????
另外,不太明白在H表中如何定义NULL.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP