× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



--




Joe, on revisiting the CL I noticed a CPF9898 escape message down in the error
handling section. My oversight, I should have checked the "borrowed" shell more
closely!

However, I ran the program directly from a command line and a dspjoblog showed:
CALL PGM(MSGTEST) PARM('DEVLIBKM' 'MSGTEST01' X'00123F')
File MSGTEST01 in library DEVLIBKM in use.
--

                 (DLTF)
//CPF3202 - escape monitored (cmd  lvl)
File MSGTEST01 in library DEVLIBKM already exists.  (CRTPF)    //CPF5813 -
diagnostic monitored   (pgm  lvl)                               File MSGTEST01
not created in library DEVLIBKM.       (CRTPF)   //CPF7302 - escsape monitored
(pgm  lvl)
.        //CPF9898 Final escape
So it seems that although ALL CPF messages do appear in the joblog, only the
unmonitored ones are caught by the getMessageList() method although this is not
mentioned in the toolbox documentation. I would have thought that all CPF
messages would be returned by this method, like a Java equivalent of the RCVMSG
command.

Thanks,

Keith

             PGM   (&LIB &FIL &LEN)
             DCL        &LIB *CHAR  LEN(10)
             DCL        &FIL *CHAR  LEN(10)
             DCL        &LEN *DEC   LEN(5 0)
            MONMSG     MSGID(CPF0000) EXEC(GOTO CMDLBL(ERROR))
             DLTF       &LIB/&FIL
             MONMSG     MSGID(CPF2100 CPF3200)
            CRTPF      FILE(&LIB/&FIL) RCDLEN(&LEN)
  /*End program normally */
             GOTO       CMDLBL(FINISH)
   ERROR:
             DMPCLPGM
             MONMSG     MSGID(CPF0000)
              DSPJOB     OUTPUT(*PRINT) OPTION(*ALL)
             MONMSG     MSGID(CPF0000)
  /*Escape msg. */
             SNDPGMMSG  MSGID(CPF9898) MSGF(QSYS/QCPFMSG) +
                          MSGTYPE(*ESCAPE)
             MONMSG     MSGID(CPF0000)
 FINISH:     ENDPGM


--



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.