Write a log file in 4gl Write a log file in 4gl patriceguic (Programmer) (OP) 7 May 07 10:16 Hello,I want to write a file during the execution of my 4ge.I don't know how open and write into a file.thank for your reply. RE: Write a log file in 4gl olded (Programmer) 7 May 07 20:27 There are three typical ways of creating log files in Informix 4GL:1) After a call to the Informix startlog function:CODEcall startlog("/path/to/errorfile")You can then append any text using the errorlog function to /path/to/errorfile :CODEcall errorlog("my test line")2) You can use the Informix 4GL REPORT option:CODE# untestedSTART REPORT errReport TO "/path/to/myerrorfile"OUTPUT TO REPORT errReport("a string of text")FINISH REPORT errReportYour errReport might look like this:CODEREPORT errReport(p_errMsg)DEFINE p_errMsg CHAR(80) ON EVERY ROW PRINT column 2, p_errMsgEND REPORTThe drawback of the REPORT option is it truncates the file when the REPORT is started.3) You can input text into a database table and then unload to a file using the Informix 4GL unload syntax. I think that is dumb for this case, so I won't even cover it.Finally, there's a 4th way; I've created a FAQ over in the IBM: Informix Dynamic Server forum:FAQ179-2007: How can Informix 4GL interact with Unix?The FAQ describes "C" functions that let you interact with the Unix OS. This includes reading and writing to disk files "on the fly". You really don't have to be a "C" programmer to use them. Just link them into your code and call them correctly.