startlog
Posted in 1999
Topics: General Discussion
In migrating to version 7, from 5, a certain program calls 'startlog'. yet, when errorlog is called, the program blows up (runtime), stating that startlog has never been started. any clues ? thanks
Mike Devine wrote: > In migrating to version 7, from 5, a certain program calls 'startlog'. > > yet, when errorlog is called, the program blows up (runtime), stating > that startlog has never been started. > > any clues ? There never was a version 5 I4GL, much to my irritation. Presumably, you upgraded from a 4.x I4GL and 5.x OnLine/SE to 7.2 I4GL and 7.2 or later OnLine/IDS/SE/AOTW*. STARTLOG() does not report any error when it fails to open the file. Therefore, ERRORLOG() can fail. I always used to get around this by also writing a 'started' message to the log with ERRORLOG() immediately after doing the STARTLOG(). This way, if there's a problem, it happens at program startup, not 95% of the way through the user's work. However, one of the lesser known backwaters of 4.12 I4GL was the function pair fgl_startlog() and fgl_errorlog(). IIRC, the fgl_errorlog() function is substantially identical to the traditional ERRORLOG() function, but the fgl_startlog() function returns a value 0 on success or negative on failure. These were covered in the release notes at one point; whether the information subsequently got lost is debatable. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h> * AOTW = acronym of the week, useful for identifying the current name for Informix Turbo :-)
In article <378A149F.D911F092@vbws01.ba.ford.com>, Mike Devine <mdevine2@vbws01.ba.ford.com> writes >In migrating to version 7, from 5, a certain program calls 'startlog'. > >yet, when errorlog is called, the program blows up (runtime), stating >that startlog has never been started. > >any clues ? > >thanks Does your program have permission to create/append to the log file? -- Steve Wright