Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Micros SIM - how to write to log file on server from terminal 1

Status
Not open for further replies.

jd11111

Programmer
Apr 29, 2010
160
0
0
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
 

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top