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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SIM Micros Symphony

Status
Not open for further replies.

fsalinas

Systems Engineer
Oct 3, 2019
13
PR
The fopen instruction in a SIM Scripts return always 0. The code is:

fopen fn, "TransLog.txt", append
if fn = 0
errormessage "FN: ", fn, ", ", @FILE_ERRSTR, "-", @FILE_ERRNO
exitcontinue
else
format lineaMsg as "This is a TEST message"
fWriteLn fn, lineaMsg
fclose fn
endif

I suppose the fopen should return a valid file handle, since is append. In the default micros directory. But a 0 file number is always returned.

Any help?

p.d. Sorry but the text lose the original indentation
 
Thanks for your reply. The line:

fopen fn, "TransLog.txt", Local And Append

give the error: Invalid File Mode

The version I am running is 2.900.9.553
 

After Enabling "SIM File Access Service" and choosing the a service host for the service, AND rebooting the OPS client, your original code worked fine for me.

I am running 2.1000.0.0.245
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top