Keith,
Thanks for reminding me about the headers in QSYSINC.
However, they have not changed.
Since, the problem is space related, I debugged the receiver template
values.
At V5R2, it looks like the MI is not really bothered with the
initialization of the template being passed and is not upset by an
arbitrarily large value it finds in the bytes provided subfield. This
does appear to matter at V5R4.
The problem seems to be resolved by setting the bytes provided subfield
to the size of the structure passed.
Cheers, Peter
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Keith Carpenter
Sent: Friday, 7 September 2007 2:35 a.m.
To: RPG programming on the AS400 / iSeries
Subject: Re: Machine interface _MATINVS2
Peter Connell wrote:
Help.
I have critical production code which compiles the machine interface
procedure named _MATINVS2.
The reason this MI is used is that it is extremely efficient for the
purpose for which it is used.
This has always worked fine until upgrading to V5R4 where it now
throws a dreaded Space offset X'40405BEF' or X'0000000000000000' is
outside current limit for job ...................
There is IBM doc for the MI procedure named MATINVS but not for
MATINVS2 at
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rzatk/inst
.h
tm
Strangely, the compiler fails to resolve _MATINVS but it does compile
with _MATINVS1 and _MATINVS2
_MATINVS1 appears to require a pointer as a 2nd argument
_MATINVS2 only requires on argument to receive the returned stack
info.
So I've been attempting to use _MATINVS1 but it is throwing a "Pointer
not set for location referenced" error.
Here's some sample code that throws the error It works fine with
_MATINVS2 at V5R2 by changing the procedure name to
_MATINVS2 and dropping the 2nd argument
Peter,
You should take a look at the C header file for MATINVS. It's located
in member MATIVNS in file QSYSINC/MIH. This should clear up some of the
mystery.
The header file (member) defines the _MATINVS1 and _MATINVS2 prototype
variants of MATINVS. _MATINVS1 includes the process pointer where as
_MATINVS2 does not (it assumes the current process).
V5R4 may have changed either of the function prototypes, but it's more
likely, that the definition of the receiver template,
_MATINVS_Template_T changed or the sub structure (_MIS_Inv_Ent) for
returned entries. You should check if there is additional data being
returned that you did not define/allocate space for.
Keith
--
This is the RPG programming on the AS400 / iSeries (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 correspondence is for the named person's use only. It may contain confidential or legally privileged information, or both. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this correspondence in error, please immediately delete it from your system and notify the sender. You must not disclose, copy or rely on any part of this correspondence if you are not the intended recipient. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of Veda Advantage. If you need assistance, please contact Veda Advantage on either :- Australia 133124 or New Zealand +64 9 367 6200
As an Amazon Associate we earn from qualifying purchases.