|
Hello Tim, Well, I did get a chance to play with this and I am correct. Here is my test program: PGM DCL &DATE *CHAR 6 DCL &TIME *CHAR 6 RTVSYSVAL QDATE &DATE RTVSYSVAL QTIME &TIME /* Send impromptu message */ SNDPGMMSG MSG('Job started at' *BCAT &TIME *BCAT 'on' *BCAT &DATE) + TOPGMQ(*PRV) TOMSGQ(*TOPGMQ) MSGTYPE(*INFO) /* Send 'pre-defined' message */ SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('Job started at' *BCAT &TIME *BCAT 'on' *BCAT &DATE) + TOPGMQ(*PRV) TOMSGQ(*TOPGMQ) MSGTYPE(*INFO) ENDPGM Submitting this program to batch with a LOG setting of (4 00 *SECLVL) results in both messages appearing in the job log. Using a LOG setting where the second item is greater than 0 results in the first message 'disappearing'. This is due to impromptu messages not having a severity and so any filtering excludes them. The CPF9898 message has a severity of 40 and so would not be excluded until the second item was 40 or greater. Using a LOG setting where the the first parameter is 0 results in both messages 'disappearing'. The word disappearing is in quotes because the messages are still in the program queue, just filtered out. If the job is still active and you change the LOG setting the messages will appear again. The third parameter does not have any real effect. It determines whether a joblog will be produced or not. Sending impromptu messages is bad practice anyway. They should all be pre-defined (properly -- not cheating with CPF9898 or its ilk). Regards, Simon Coulter. //---------------------------------------------------------- // FlyByNight Software AS/400 Technical Specialists // Phone: +61 3 9419 0175 Mobile: +61 3 0411 091 400 // Fax: +61 3 9419 0175 E-mail: shc@flybynight.com.au // // Windoze should not be open at Warp speed. +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to "MIDRANGE-L@midrange.com". | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.