MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » June 2008

Re: Hot to clear the joblog



fixed


On 11/06/2008, at 10:56 PM, beppecosta wrote:

I have a CLLE program (say PGMA) that reads a list o items from a dtaq.

For each item, PGMA calls a RPGLE program (say PGMB) that accesses another system via a DDM file and returns the requested information.

At end, PGMA writes in the joblog the number of items read and after a delay time, loops reading again.

However the PGMA joblog has for each group of items - apart from a count message sent by the PGMA itself - at least 4 other messages:

CPI9150 Remote database job started.
CPI9200 DDM object xxxx in yyyy uses remote object ...
CPI9151 Remote database job ended.
CPI9153 1 DDM conversations ended

How can I remove only these messages and just keep the count message sent by PGMA ?

RCVMSG MSGTYPE(*LAST) will work if the message was sent to a call message queue still on the stack. You will need to examine the messages above to check the from and to programs to determine this. If the messages are accessible then loop over RCVMSG until either no more messages are found or the message ID is not one of the above.

I would RCVMSG *LAST RMV(*NO) MSGID(*MSGID) KEYVAR(&KEYVAR) then check the message ID against the list of message to remove then if found run RCVMSG again specifying RMV(*YES) MSGKEY(&KEYVAR).

I would expect you'd need to remove the messages from within PGMB therefore a CL *MODULE bound to the RPG module could be used or the equivalent Message Handling APIs could be used directly.

Otherwise you could use the List Joblog Messages API but that's overkill.

Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists

http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------








Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact