Messages not appearing after calling an RP

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
jan
Posts: 30
Joined: Thu Sep 06, 2018 12:36 pm

Messages not appearing after calling an RP

Post 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.
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: Messages not appearing after calling an RP

Post 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.
Post Reply