Write a record to the specified log file
This function is used in LAS procedures to record the success or failure of the steps in a log file. The information recorded includes a process key, an operation code, descriptive text, and the date and time the entry was placed in the log file.
- INFILE
- Input file. The name of the log file to update.
- PROCKEY
- Process key. An ASCII key that identifies the entity being processed.
- OPCODE
- Operation code. An ASCII code indicating the operation being executed.
- TEXT("")
- Text string. A descriptive text string describing the operation.
The PROCKEY, OPCODE, TEXT, date, and time stamp are written to the "INGEST;LOG" file located in [ADAPS.LOG] directory. The following is an example of the record written to the INGEST log file:
"AH11031292131106 04/01/92 11:24:54 INGEST_ START Starting the auto-ingest procedure"
The current date and time are retrieved and the specified log file is opened for appending. If there is an error opening the log file (e.g. another process has the same log file open), WRTLOG will wait for the log file to become available. WRTLOG will try to re-open the log file up to five times before a fatal error is encountered. When the log file is successfully opened, the PROCKEY, date, time, OPCODE, and TEXT are appended to the log file.
A fatal error was encountered during processing. The error message displayed immediately preceding this message is the specific error encountered.
The specified log file could not be opened. Check the protections on the file and the directory.