Bhavin Bhaskaran
Bhavin Bhaskaran

Reputation: 582

Reading input string from a text file in progress4gl

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

Answers (2)

Tom Bascom
Tom Bascom

Reputation: 14020

define variable s as longchar no-undo.

copy-lob from file "fileName.txt" to s.

Upvotes: 6

Tim Kuehn
Tim Kuehn

Reputation: 3251

DEF VAR ch-var AS CHARACTER NO-UNDO.

INPUT FROM VALUE(file-name).

REPEAT:

IMPORT UNFORMATTED ch-var.

END.

Upvotes: 2

Related Questions