|
Gotcha... is this DS defined somewhere already (preferably in free format)?
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of
B Stone
Sent: Tuesday, July 30, 2019 1:24 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: RNX0356 Document for DATA-INTO does not match RPG Variable
It does return the text, but it's in a structure along with other data,
like the length of that text. Easy enough to make and parse out using a
DS. And you may need to use format RCVM0200
https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_74/apis/QMHRCVPM.htm#HDRRCVM1A
Bradley V. Stone
www.bvstools.com
MAILTOOL Benefit #14 <https://www.bvstools.com/mailtool.html>: The
ability to use Configuration Files at the system, User, or individual email
Level.
This means that should any of the settings (such as your password) is
changed you only need to update it in the configuration file that is used.
On Tue, Jul 30, 2019 at 12:15 PM Greg Wilburn <
gwilburn@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
Yes... I saw that after I sent it.--
RcvPgmMsg( ErrorMsg
: %len(ErrorMsg)
: 'RCVM0100'
: '*'
: 0
: '*ESCAPE'
: ' '
: 0
: '*SAME'
: QUSEC);
I was hoping to just get the text for the message... does it actually
return the entire text (along with the other preceding values)? Or,
do I have to somehow reconstruct the message?
If the latter is the case, I'm not going to take the time... it's just
not worth the effort.
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf
Of B Stone
Sent: Tuesday, July 30, 2019 12:29 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: RNX0356 Document for DATA-INTO does not match RPG
Variable
Greg,
I think your parm list is a little off. Shouldn't the 3rd parm be
format name?
You can also see the format of the return variables for the format you
received. It won't be just text:
https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_74/apis/QMHRC
VPM.htm
On Tue, Jul 30, 2019 at 10:42 AM Greg Wilburn <
gwilburn@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
Jon,--
I appreciate the response... I created prototypes for QMHRCVPM and
tried to use it.
The ErrorMsg is formatted odd.
RcvPgmMsg( ErrorMsg
: %len(ErrorMsg)
: psds.ErrCde
: '*'
: 0
: '*ESCAPE'
: ' '
: 0
: '*SAME'
: QUSEC);
In debug it looks like this:
Ò Ò RNX035315 œí ŸŸ ' ' œ hdr
hdr(14).shiptomethod ádoc=file case=any allowextra=yes
countprefix=count_ path=orders/order /gwilburn/bad.xml
What am I missing?
Greg
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] On
Behalf Of Jonathan Wilson
Sent: Wednesday, July 17, 2019 12:51 PM
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Subject: Re: RNX0356 Document for DATA-INTO does not match RPG
Variable
On Tue, 2019-07-16 at 15:42 +0000, Greg Wilburn 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.
From within RPG the best way is to use the IBM supplied message API's.
More specifically the QMHRCVPM (receive program message) which can
be used to not only get the message ID but also the message data.
After that, you can use it however you feel.
If you wanted to use the actual message text, and the message data
that is shown for the message you would need to probably use the
QMHRTVM API along with the data returned in QMHRCVPM as that can
retrieve the message text and do the substitution at the same time.
I often use the QMHRCVPM API, but have never used the QMHRTVM API.
This is a fairly good article on using the API's in conjunction -
https://www.itjungle.com/2009/10/14/fhg101409-story01/
Jon.
--
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
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
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 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.