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



Ok... but that's what I'm asking. How to best retrieve message data from inside an RPG pgm.

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Mark Murphy
Sent: Tuesday, July 16, 2019 2:06 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: RNX0356 Document for DATA-INTO does not match RPG Variable

Retrieve the message data. What you are looking for is in field &4. First two fields are Int(10), &3 is a character varying with an int(5) length value. &4 immediately follows that with an int(5) length value.

On Tue, Jul 16, 2019 at 11:42 AM Greg Wilburn < gwilburn@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

Just wondering if there is a relatively easy way to retrieve the
message "Cause" from within the RPG program?
The "Cause" is usually where the issue is described - "the exact
subfield for which the error was detected is..."

I would like to use this as output in my text logs.

Example:

Additional Message Information

Message ID . . . . . . : RNX0356 Severity . . . . . . . : 50
Message type . . . . . : Escape
Date sent . . . . . . : 07/16/19 Time sent . . . . . . :
11:35:04

Message . . . . : The document for the DATA-INTO operation does not match
the RPG variable; reason code 4.
Cause . . . . . : While parsing a document for the DATA-INTO operation,
the
parser found that the document does not correspond to RPG variable "json"
and the options do not allow for this. The reason code is 4. The exact
subfield for which the error was detected is
"json.orders(1).promotions.applied_promotions". The options are "doc=file
case=convert allowextra=yes countprefix=count_". The document name is
/apis/Mirakl/046/GetOrdersReady_Response_0.json; *N indicates that the
document is not an external file. The parser is 'YAJLINTO'. *N indicates
that the parser is a procedure pointer.
--
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

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

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.