Reputation: 582
I have a .txt file having some text. I want to read this file and store it into a string. Is there available any function for that? Or how to do it ? please help
Upvotes: 3
Views: 11710
Reputation: 14020
define variable s as longchar no-undo.
copy-lob from file "fileName.txt" to s.
Upvotes: 6
Reputation: 3251
DEF VAR ch-var AS CHARACTER NO-UNDO.
INPUT FROM VALUE(file-name).
REPEAT:
IMPORT UNFORMATTED ch-var.
END.
Upvotes: 2