Hi
I am trying to output to a file using PUT statement but it does not seem to work. Basic code below:
--------------------------------------------------------------------------------
def var filename as char no-undo.
DEFINE STREAM stOrd.
filename = "invSara" + TRIM(STRING(day(TODAY))) +
TRIM(STRING(month(TODAY))) + TRIM(STRING(year(TODAY))) + ".txt".
output stream stOrd to filename.
put stream stOrd unformatted
"hello" + "kidda"
skip.
output stream stOrd close.
when outputting using the filename is does not create the file. But if i do the following it works fine? why is this?
output stream stOrd to c:\test.txt.
this line works fine and creates the file
hope someone can assist
cheers
TJ
I am trying to output to a file using PUT statement but it does not seem to work. Basic code below:
--------------------------------------------------------------------------------
def var filename as char no-undo.
DEFINE STREAM stOrd.
filename = "invSara" + TRIM(STRING(day(TODAY))) +
TRIM(STRING(month(TODAY))) + TRIM(STRING(year(TODAY))) + ".txt".
output stream stOrd to filename.
put stream stOrd unformatted
"hello" + "kidda"
skip.
output stream stOrd close.
when outputting using the filename is does not create the file. But if i do the following it works fine? why is this?
output stream stOrd to c:\test.txt.
this line works fine and creates the file
hope someone can assist
cheers
TJ