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



David,

 My guess would be that this code:

        if gotData;
          pData = %subst(data:1:dataLength);
        else;
          pData = *blank;
        endif;

 should be:

        if gotData;
          %subst(pData:1:dataLength) = %subst(data:1:dataLength);
        else;
          %subst(pData:1:dataLength) = *blank;
        endif;

 since you're accessing the parm past the area that you have passed (>
position 601.)

 -mark


Folks:

I've got an odd problem that's kind of driving me crazy.

Please keep in mind, this code worked fine the day before yesterday ...
I have no idea what changed to cause it to stop working.

Basically, I'm getting a MCH3601-pointer not set error when I try to
assign a character field with options(*varsize) to the substring of a
standalone field.

Here's the situation ... I've got a generic routine that I used to
retrieve an entry off a keyed data queue (getClientData).  Since the
data queue entry is formatted for a data structure, I pass a data
structure into the routine.

Here's how the data structure is defined in the calling routine ...

D dataQueueEntry...
D               E DS                  extname(EXTDSPF) qualified inz

(this data structure is 601 bytes long)

And the call to the generic data queue routine is ...

moreEntries = getClientData(pListId: dataQueueEntry);


getClientData is is a different module than the caller, but the same
service program.

Here is the full getClientData Routine ...

     PgetClientData...
     P                 B                   export
     D                 PI              N
     D pListId                       35    value
     D pData                       2048    options(*varsize)
     D

     D data            S           2048
     D dataLength      S              5  0
     D gotData         S               N
     D dummySender     S              8
     D parmLength      S              5  0

      /free

       QRCVDTAQ(CLIENT_REQUEST_DATA_QUEUE:'*LIBL':dataLength:data:
         *zero:'EQ':%size(pListId):pListId:*zero:dummySender);

       gotData = (dataLength > 0);

       if gotData;
         pData = %subst(data:1:dataLength);
       else;
         pData = *blank;
       endif;

       return gotData;

      /end-free

     P                 E

When I receive the entry off the data queue, everything is fine ... the
dataLength is 601 (which is correct for the data queue entry), the data
field has the data queue entry content.

The problem arises when I try to trim the data field to the datalength
value (using %subst) and put it into the pData field.  pData, which was
previously valid, now has an invalid pointer.  The debugger tells me
this, and the program bombs with the MCH3601 error.

This is driving me crazy ... it worked FINE two days ago.  I can't
figure out what changed.

I did rename a few procedures ... but the binding source was updated and
all modules recompiled and the service program recreated.

Can anyone see what is probably quite obvious ... that I'm missing?

Thanks!

david



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.