LOGMSG |
![]() ![]() ![]() |
The LOGMSG statement adds a line to the system error log. This statement has no effect on the PDA version of QM.
Format
LOGMSG text
where
QM includes the option to maintain a log of system error messages in a file named errlog in the QMSYS account. The LOGMSG statement can be used by application software to write messages into this file. If the error log is disabled, the LOGMSG statement will be ignored.
Although programs can write to this file using the sequential file handling statements, the internal buffering mechanism used by these statements is likely to result in loss of messages. Programs should, therefore, use on the LOGMSG statement to write messages.
Example
READ ORDER.NO FROM @VOC, 'NEXT.ORDER' ELSE LOGMSG 'NEXT.ORDER record not found' RETURN END
The above program fragment logs a message in the system error log if the NEXT.ORDER record cannot be found in the VOC
See also: LOGMSG command |