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



A working example of QMHRMVPM and QMHSNDPM from a subprocedure can now be found on www.rpglanguage.com/message_subfile

Regards,
John McKay


----- Original Message ----- From: "Jerry Adams" <Jerry@xxxxxxxxxxxxxxx>
To: "RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>
Sent: Wednesday, April 29, 2009 7:56 PM
Subject: RE: QMHRMVPM Problem in Subprocedure


Loyd,

Thanks; I didn't find that reference. I tried setting the call stack entry but executing the subprocedure which executes the QMHRMVPM this morning, but no luck. I went on to other things to let the dust settle. But I did wonder, call-stack-wise, if the fact that the main body (i.e., not a subprocedure) invokes both the QMHSNDPM and QMHRMVPM APIs could have anything to do with the problem. When QMHSNDPM is invoked, the call stack entry is blatantly set to '0'. But it does percolate the message subfile entry back to main line so I discounted that as a possibility. I have to admit that I rarely have had to deal with call stacks; I think I need to do some research and reading up.

Again, thanks.

Jerry C. Adams
IBM System i Programmer/Analyst
--
B&W Wholesale
office: 615-995-7024
email: jerry@xxxxxxxxxxxxxxx


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Loyd Goodbar
Sent: Wednesday, April 29, 2009 1:33 PM
To: RPG programming on the IBM i / System i
Subject: Re: QMHRMVPM Problem in Subprocedure

You should set the "bytes provided" field in QUSEC prior to calling an API.
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/apiref/pgmerr_errorco.htm

Here are the relevant comments:
* Initialize the bytes provided field (QUSBNDB) of the error code
* structure. Languages such as RPG and CL tend to initialize the bytes
* provided field to blanks, which when passed to an API is viewed as a
* very large (and incorrect) binary value. If you receive CPF3CF1 when
* calling an API, the bytes provided field should be the first field
* you examine as part of problem determination.

HTH,
Loyd


There were no errors returned. I.e., qusei = *Blanks, and qusbavl = *Zeros.
I am not loading anything into the qusec data structure; I've only written
about a dozen programs using API's and the few that use the error data
structure simply check it afterwards, never initialize anything in it.
Should I?

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

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



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.