× 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.



Barbara,

I would also like to thank you (and had been hoping you might jump in).
This was driving me crazy yesterday (in between some chess games :) )

Thanks again,
Bruce

On Fri, Mar 6, 2020 at 6:45 AM Bruno VARON <bvaron@xxxxxxxxxxx> wrote:

Thank you very much Barbara for this explanation.

Regards

Bruno

--

Le vendredi 06 mars 2020 à 06:20 -0500, Barbara Morris a écrit :
On 2020-03-06 4:01 a.m., Bruno VARON wrote:

Hello Peter,

I send CPF9897 message of QCPFMSG, MONMSG keep the message.
but the caller RPG program receive the message too.


I think it is due to the "Program Return Code" of the job. You can
see
this value in DSPJOB OPTION(*STSA).

When the main procedure of the ILE RPG module ROXBMXR ends
abnormally
after sending the escape message, ILE RPG sets the return code to
'2'.
This is done as part of the RPG cycle, so I guess that your ILE RPG
module is not a NOMAIN module.

OPM RPG checks this return code after a call, and if the return code
is
still '2', OPM RPG thinks that the call failed.

ILE RPG does not check the return code after a call unless the call
failed some other way.

This is actually mentioned in the ILE RPG Programmer's Guide in the
section about difference between ILE RPG and OPM RPG:

https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzasc/diffrun.htm

"5. ILE RPG does not interpret return codes that are not 0 or 1 for
calls to programs or procedures that end without an exception."

To stop the OPM RPG program from ending in error, you could add an
error
indicator to the CALL.

Or, you could change the ILE RPG module ROXMBXR so that it is a
NOMAIN
module, where the code is in a subprocedure called ROXMBXR. When a
subprocedure ends abnormally, ILE RPG does not set the 'Program
Return
Code' to '2'.

--
Barbara




--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.