How to assign file contents to string variable during 4gl opening process?

Assigning the contents of a huge file of about 80 KB to a string variable

copy-lob from file "E:\edifact\test\22685.EDI" to text-memptr.
v-edistring  = get-string(text-memptr,1).

indicates that the error attempt exceeded the maximum size of the character variable.

+4
source share
1 answer

Do you really need a mempointer? Otherwise, you can just COPY-LOB to LONGCHAR directly.

DEFINE VARIABLE cString AS LONGCHAR   NO-UNDO.

COPY-LOB FROM FILE "E:\edifact\test\PFCONCEPT22685.EDI" TO cString.
+5
source

All Articles