MFJZLOG writes a message to the syslog and/or the joblog.
| msg-dest | pic 9(8) comp | Message destination; A value of 1 sends it to the joblog, a value of 2 sends it to syslog, and a value of 0 sends it to both. |
| msg-dest-both | pic 9(8) comp | |
| msg-dest-joblog | pic 9(8) comp | |
| msg-dest-syslog | pic 9(8) comp | |
| msg-len | pic 9(8) comp | Length of the message text. Message length should be less than 108 bytes if you want to keep the whole message on one line. |
| msg-txt | x(118) | Text of the message. |
Example 1. To write “MyMsg0001P Hi there!” to both the system log and the job log:
77 msg-dest-both pic 9(8) comp value 0.
77 msg-dest-joblog pic 9(8) comp value 1.
77 msg-dest-syslog pic 9(8) comp value 2.
77 msg-txt pic x(118) value ' MyMsg0001I Hi there!'.
77 msg-len pic 9(08) comp value 20.
call 'MFJZLOG' using msg-dest-both
msg-len
msg-txt
Example 2. To write “MyMsg0001P Hi there!” to just the job log:
77 msg-dest-both pic 9(8) comp value 0.
77 msg-dest-joblog pic 9(8) comp value 1.
77 msg-dest-syslog pic 9(8) comp value 2.
77 msg-txt pic x(118) value ' MyMsg0001I Hi there!'.
77 msg-len pic 9(08) comp value 20.
call 'MFJZLOG' using msg-dest-joblog
msg-len
msg-txt
Comments:
The message length should be less than 108 bytes if you wish to keep the whole message on one line.