Kbase P125788: How to read the contents of a standard text file?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/8/2009 |
|
Status: Verified
GOAL:
How to read the contents of a standard text file?
GOAL:
How to read the contents of a file?
FACT(s) (Environment):
OpenEdge 10.x
All Supported Operating Systems
FIX:
The UNFORMATTED option of the Import statement can be used to read the contents of a standard text file. For example, the following procedure reads and displays the contents of the hello file:
DEFINE VARIABLE text-string AS CHARACTER FORMAT "x(76)".
INPUT FROM VALUE(SEARCH("hello")).
DO WHILE TRUE ON ENDKEY UNDO, LEAVE:
IMPORT UNFORMATTED text-string.
DISPLAY text-string WITH DOWN FRAME x.
DOWN WITH FRAME x NO-LABELS.
END.
INPUT CLOSE.