MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » October 2004

Re: Bytes Available not correct in API QMHRTVM



fixed

Initially I was testing on some of my own internal messages, but I tried a few CPF messages and got the same results for some of the messages. It seems that the problem may relate to messages with substitution variables. The QCPFMSGF messages I tried and their results are:

Message 1st call Ret/Aval               2nd call Ret/Aval
CAE0002         8/264           264/264
CAE0024         8/284           284/780         has substitution variables
CPFAC00         8/264           264/264
CPFAC08         8/324           324/720         has substitution variables
CPF1001         8/264           264/264
CPF1002         8/284           284/424         has substitution variables

If you don't get the same results with these messages, then it must be something with my code, but I have looked don't see anything.

Thanks

At 07:19 AM 10/4/2004, you wrote:

What are the characteristics of the message you are trying to retrieve?  If
it's an IBM supplied message what is the msgid?

Your approach is correct and using some randomly picked msgids out of
qcpfmsg my testing showed the correct Bytes Available being returned so it
would appear to be something related to the definition of the msgd.

Bruce




Dave Murvin <davem@xxxxxxxx> Sent by: To midrange-l-bounce midrange-l@xxxxxxxxxxxx s@xxxxxxxxxxxx cc

                                                                   Subject
             10/01/2004 04:46          Bytes Available not correct in API
             PM                        QMHRTVM


Please respond to Midrange Systems Technical Discussion






I am trying to use the RTVM0400 format of the QMHRTVM (Retrieve message) API and am not getting the expected results in the returned Bytes Available

field (second field in the RTVM0400 format - field QMHBAVL14 in the QSYSINC

copy file).  Sequence of events is:

1. Allocate 8 bytes to the Message information input parm so I can get the
first two fields in the RTVM0400 format and find out how big the message
information is.
2. Call QMHRTVM for my particular message passing 8 in the Length of
message info input parm.
3. RTVM0400 Bytes available field is 328
4. reallocate Message information input parm to hold 328 bytes
5. Call QMHRTVM again, passing new length available as 328 bytes (Length of

message information input parm)
5. RVTM0400 Bytes available field is now 684 bytes!  Bytes actually
returned returned is 328 as expected.

The problem is that, as I understand the APIs,  the first call to QMHRTVM
should have returned 684 bytes in the Bytes Available field.

If I call QMHRTVM and allocate 3000 bytes on the first call, it does return

the correct 684 bytes, but this does not seem to be the way it should work.

I didn't see anything in the archives or on the IBM APAR site.

I am at V5R3.

Any suggestions?

Thanks


Dave Murvin DRM Enterprises, Inc.


-- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

Dave Murvin DRM Enterprises, Inc.







Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact