如何在没有得到错误或NULL值的情况下将MEMPTR复制到LONGCHAR变量或从LONGCHAR变量复制MEMPTR? [英] How to Copy MEMPTR to/from a LONGCHAR variable with out getting error or NULL value?

查看:96
本文介绍了如何在没有得到错误或NULL值的情况下将MEMPTR复制到LONGCHAR变量或从LONGCHAR变量复制MEMPTR?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用GET-STRING将MEMPTR的值复制到LONGCHAR变量时,出现错误9324.有什么解决办法吗?

while copying the value of a MEMPTR to a LONGCHAR variable using GET-STRING, i got an error 9324 . Is there any solution ?

我已经尝试过了:

function x returns longchar():
  DEF VAR i_xml_string AS LONGCHAR NO-UNDO.
  DEF VAR i_mem        AS MEMPTR   NO-UNDO.
  p_doc:SAVE("memptr":U, i_mem).
  COPY-LOB FROM i_mem TO i_xml_string.
  return i_xml_string.
end.

但是出现以下错误:

[16/03/17 @ 10:20:58.984-0700] P-009824 T-000001 3 4GL 4GLTRACE从ConvertXmlDocToLongString返回" [yeai/ye508mu.p] [16/03/17 @ 10:20: 58.984-0700] P009824 T-000001 1 4GL-(过程:'GenerateT5008xmlCusipSummaryRecordyeai/ye508mu.p'行:2536)尝试超过CHARACTER变量的最大大小. (9324) [16/03/17 @ 10:20.58.984-0700] P-009824 T-000001 1 4GL-(过程:'GenerateT5008xmlCusipSummaryRecord yeai/ye508mu.p'Line:2536)**无法评估PUT语句的表达式. (564)[16/03/17 @ 10:20:58.984-0700] P009824 T-000001 3 4GL 4GLTRACE从GenerateT5008xmlCusipSummaryRecord返回?tmp_cusip_tots是" [yeai/ye508mu.p]

[16/03/17@10:20:58.984-0700] P-009824 T-000001 3 4GL 4GLTRACE Return from ConvertXmlDocToLongString "" [yeai/ye508mu.p] [16/03/17@10:20:58.984-0700] P009824 T-000001 1 4GL -- (Procedure: 'GenerateT5008xmlCusipSummaryRecordyeai/ye508mu.p' Line:2536) Attempt to exceed maximum size of a CHARACTER variable. (9324) [16/03/17@10:20:58.984-0700] P-009824 T-000001 1 4GL -- (Procedure: 'GenerateT5008xmlCusipSummaryRecord yeai/ye508mu.p' Line:2536) ** Unable to evaluate expression for PUT statement. (564) [16/03/17@10:20:58.984-0700] P009824 T-000001 3 4GL 4GLTRACE Return from GenerateT5008xmlCusipSummaryRecord "? tmp_cusip_tots yes " [yeai/ye508mu.p]

推荐答案

GET-STRING对普通字符串进行操作.它们的大小限制为大约31,000字节.使用COPY-LOB来获取MEMPTR数据进出LONGCHAR.

GET-STRING operates on ordinary character strings. Those are limited in size to around 31,000 bytes. Use COPY-LOB to to get MEMPTR data in and out of LONGCHAR.

类似的东西:

copy-lob from my_memptr to my_longchar.

PUT也仅限于普通CHAR字符串.如果要使用LONGCHAR和MEMPTR,则需要使用COPY-LOB.

PUT is also restricted to ordinary CHAR strings. If you want to work with LONGCHAR and MEMPTR you need to use COPY-LOB.

这篇关于如何在没有得到错误或NULL值的情况下将MEMPTR复制到LONGCHAR变量或从LONGCHAR变量复制MEMPTR?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆