mac100
mac100

Reputation: 137

How to assign content of a file to a string variable in progress openedge 4gl?

Assigning content of a huge file around 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).

shows error attempt to exceed maximum size of character variable.

Upvotes: 4

Views: 1081

Answers (1)

Jensd
Jensd

Reputation: 8011

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

DEFINE VARIABLE cString AS LONGCHAR   NO-UNDO.

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

Upvotes: 5

Related Questions