STARTLOG( )
The STARTLOG( ) function opens an error log file.
filename is a quoted string to specify a filename (and optional path name and file
extension) of the error log file.
- ariable is a variable of type CHAR or VARCHAR containing a filename (and optional path
name and file extension) of the error log file.
The following is a typical sequence to implement error logging:
Call STARTLOG( ) in the MAIN program block to open or create an error log file.
Use a LET statement with ERR_GET(status) to retrieve the error text and to
assign this value to a program variable.
Use ERRORLOG( ) to make an entry into the error log file.
The last two steps are not needed, if you are satisfied with the error records
that are automatically produced after STARTLOG( ) has been invoked. After you
call the STARTLOG( ) function, a record of every subsequent error that occurs
during the execution of your program is written to the error log file, provided
that the WHENEVER ERROR CONTINUE statement is not in effect.
The error record consists of the date, time, source-module name and line
number, error number, and error message. You can also write your own messages in the
error log file by using the ERRORLOG( ).
References
ERR_GET( )
ERRORLOG( )