Consultor Eletrônico



Kbase P98609: File is not created using OUTPUT STREAM
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   09/12/2004
Status: Unverified

SYMPTOM(s):

Attempting to write data to a file using a stream

Using statement:

OUTPUT STREAM <stream> TO <path variable>.

No file is created at the location specified

Path contained in variable is valid

CAUSE:

Path variable is interpreted literally and a file with the name of the variable is created in the current working directory. For example,

path = C:\temp\results.txt.
OUTPUT STREAM <stream> TO path.

A file called "path" will be created rather than the file "results.txt" in C:\temp.

FIX:

Use the VALUE() option with the OUTPUT statement to ensure that the value of the variable is used:

OUTPUT STREAM <stream> TO VALUE(<path variable>).