Previous Topic Next topic Print topic


MFJZLOG

MFJZLOG writes a message to the syslog and/or the joblog.

Syntax:

call "MFJZLOG" using msg-dest msg-len msg-txt

Parameters:

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.

Comments:

The message length should be less than 108 bytes if you wish to keep the whole message on one line.

Note:
  • Where the characters in positions 6 ,7, 8 and 9 of your message string are digits (as is the case in the examples below) MFJZLOG assumes that you are supplying your own message code. In all other circumstances, it prepends your message with the default code, 'JCLXM0000I '.
  • If the message string contains the character 'I' at position 10 (as is the case where your original string is prepended with JCLXM0000I) the default user exit casumxit will exclude it from the system log.

Example:

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
Previous Topic Next topic Print topic