Page 1 of 1

Messages not appearing after calling an RP

Posted: Tue Oct 20, 2020 2:37 pm
by jan
Good day. I have a WAM that calls an RP with the definition inside a method routine:

Code: Select all

Mthroutine Name(umCheckShipToRDI) Desc('Check Ship To RDI')

Define_Map For(*OUTPUT) Class(#PRIM_ALPH) Name(#oRDI)

Define_Com Class(#RP_GETRDI) Name(#RP_GetRDI)
We got a report that some validation messages that are set (using Message Msgtxt) stopped appearing at some point and it turns out the call to a method in the RP above causes that problem. I added Option(*RECEIVE_MESSAGES *RETURN_MESSAGES) to the RP's method and that got it working then.

Today, we received another report that the validation messages stopped working again. This time, almost all solutions attempted did not work. These include:
  • Adding Option(*RECEIVE_MESSAGES *RETURN_MESSAGES) on all involved method routines
  • Utilizing BIF GET_MESSAGE to try and store the messages before the call to the RP and message them out after (was not returning an OK status)
  • Collecting messages in a working list and displaying them near the endroutine (this was not a good solution due to the number of messages we would have needed to cater for)
Eventually, I fixed it by putting the call to the RP near the start of the WAM but this adds extra load to the processing as in some cases, the RP would not have needed to be called anyway.

Does anyone know why the RP affects messages? The only thing that is suspicious to me in the RP is that it utilizes extended libraries to consume webservices.

Also, defining the RP but not calling its method makes messages work.

Re: Messages not appearing after calling an RP

Posted: Wed Oct 21, 2020 10:30 am
by MarkD
Is your GET_MESSAGE read loop in a method or in a subroutine?
If it is in a method try changing it to be a subroutine.
Methods all have their own individual message queues, which are not the same queue as the method invoker's queue.