Aug 24, 2011 #1 jd11111 Programmer Apr 29, 2010 160 US Trying to use FWrite to write to a log file on the Micros server. How do I format the filename to write from a terminal? I'm trying this but it's not working: format filepathname as "\\",@ServerName,"\d$\micros\res\pos\etc\Log.txt
Trying to use FWrite to write to a log file on the Micros server. How do I format the filename to write from a terminal? I'm trying this but it's not working: format filepathname as "\\",@ServerName,"\d$\micros\res\pos\etc\Log.txt
Aug 25, 2011 1 #2 MikeRose Programmer Mar 11, 2010 115 US When I have done this I have formatted the path such as this var trailerfile : a50 = "\\micros01\00Temp\trailer.txt" //////// FILE PATH OF DATA FILE Then somewhere in my script, depending on my needs I call a sub proedure ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// sub write_trailerfile fopen fn, trailerfile, write and append if fn=0 exitcancel endif fwrite fn,storenum,business_date,hhmmss,@CKNUM{4},@TREMP{4},@RVC{1},@WSID{1},trailercode{1} fclose fn endsub //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// I nthe cas above, I have formatted some of my own variables as well as write some system variables... I think you get the idea I did however, stop using text logs and instead just wrote to a custom table in the DB... for me it was easier to retrieve it that way Upvote 0 Downvote
When I have done this I have formatted the path such as this var trailerfile : a50 = "\\micros01\00Temp\trailer.txt" //////// FILE PATH OF DATA FILE Then somewhere in my script, depending on my needs I call a sub proedure ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// sub write_trailerfile fopen fn, trailerfile, write and append if fn=0 exitcancel endif fwrite fn,storenum,business_date,hhmmss,@CKNUM{4},@TREMP{4},@RVC{1},@WSID{1},trailercode{1} fclose fn endsub //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// I nthe cas above, I have formatted some of my own variables as well as write some system variables... I think you get the idea I did however, stop using text logs and instead just wrote to a custom table in the DB... for me it was easier to retrieve it that way