• Subject: Problem with matctx supported interface
  • From: bvining@xxxxxxxxxxxx
  • Date: Fri, 15 Sep 00 12:35:07 CDT

For MATCTX the first four bytes of the Receiver (MATCTXSPC in your
case) needs to be set to the size of the Receiver variable.  This is
documented as 'Number of bytes provided for materialization' in the MI
Reference.  You evidently have it set to x'00000000' currently.

Set the first four bytes to the user space size (as an integer value)
and the Materialize should work.

Bruce

>
>Hi all,
>
>I'm trying to write a utility to display changed
>objects. It is mainly in rpg and call c for the
>qusmatarializecontext api (didnt want to use system
>pointers in rpg).
>
>I didnt want to use mi since matctx is not directly
>supported.
>
>So the rpg creates a user space manges the selection
>structure and call the c module. This is the c module:
>
>#include <qusmiapi.h>
>
>#include <QSYSINC/MIH/RSLVSP>
>
>#include <QSYSINC/MIH/MIOBJTYP>
>
>#include <QSYSINC/H/QUSPTRUS>
>
>void MATCTXC(_LIB_NAME prlib,void * Options) {
>
>
>
>_SYSPTR           lib_ptr;
>
>_SPCPTR           TargetSpace;
>
>
>
>lib_ptr = rslvsp(_Library, prlib, "QSYS",
>_AUTH_OBJ_MGMT);
>QUSPTRUS("MATCTXSPC QTEMP     ", &TargetSpace);
>
>
>
>QusMaterializeContext(TargetSpace,
>
>                           lib_ptr,
>
>                           Options);
>
>         }
>
>
>The c program does not work and i get :
>*************************************************************************
> Message ID . . . . . . :   MCH0601       Severity . .
>. . . . . :   40
> Message type . . . . . :   Escape
>
> Date sent  . . . . . . :   14/09/00      Time sent  .
>. . . . . :   11:23:41
>
>
> Message . . . . :   Space offset X'00000000' is
>outside current limit for
>   object MATCTXSPC.
>
> Cause . . . . . :   You tried to operate outside the
>specified space or tried
>   to set the space pointer outside the specified
>space. The object referred to
>   is MATCTXSPC. The offset specified is X'00000000'.
>The space class is X'00'.
>   The secondary associated space number is X'0000'.
>The activation group mark
>   is X'00000000'. The heap space identifier is
>X'00000000'. The pointer to the
>   start of the implicit process space used for the
>allocation is
>   X'AF000000000000000000000000000000'. The space
>class designates the
>***********************************************************************
>
>What is my problem here ? i'm quite sure the space
>pointer targetspace is ok.
>
>Thanks for helping a begginer
>
>
>=====
>Shahar mor
>


+---
| This is the MI Programmers Mailing List!
| To submit a new message, send your mail to MI400@midrange.com.
| To subscribe to this list send email to MI400-SUB@midrange.com.
| To unsubscribe from this list send email to MI400-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: dr2@cssas400.com
+---

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