Bhavin Bhaskaran
Bhavin Bhaskaran

Reputation: 582

Out put stream with dynamic location value/ file name?

How to output a stream into a location that is getting dynamically..

For location getting statically can use

OUTPUT stream s1 to "D:\reports1.txt".

but if I want to get the value from screen, how?

Upvotes: 0

Views: 2502

Answers (1)

ade jones
ade jones

Reputation: 669

DEF VAR cFileName AS CHAR NO-UNDO INITIAL "c:\temp\Bongo.txt".

DEF STREAM s1.

UPDATE cFileName FORMAT "x(30)".

OUTPUT STREAM s1 TO VALUE(cFileName).

OUTPUT STREAM s1 CLOSE.

Upvotes: 2

Related Questions