call "MFJZLOG" using msg-dest msg-len msg-txt
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 ' MyMsg0001P 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 ' MyMsg0001P Hi there!'. 77 msg-len pic 9(08) comp value 20. call 'MFJZLOG' using msg-dest-joblog msg-len msg-txt
Comments:
To use this API on IMS and CICS enterprise server regions, the region must be SSTM-enabled; see To enable JCL support from a CICS or IMS subsystem for more information. This API is not supported to run under ES for .NET.
The message length should be less than 108 bytes if you wish to keep the whole message on one line.
When using this call, if it cannot obtain a lock attempting to write to syslog, a return code of 16 is produced, and if it cannot obtain a lock attempting to write to joblog, a return code of 20 is produced.