[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Space offset X'0008A000' or X'0000000000000000' is outside current limit



Hi Kevin,

I can see the EndOfElement procedure but no StartOfElement. Since your code points to a StartOfElement and there is no such procedure I think that is where things go wrong.

Kind regards,

Loek Maartens.

On 26-2-2015 12:46, Kevin Wengert wrote:
Hi Scott,

I'm trying to parse some xml from an ifs file and I'm getting this error:

Space offset X'0008A000' or X'0000000000000000' is outside current limit for
object QPADEV001GKEVINW    819274.

Here is the relevant code:

Ctl-Opt Copyright('Logistix Software Solutions, 2014')
          Option(*SrcStmt: *NoDebugIO)
          DatEdit(*MDY)
          DatFmt(*MDY)
          DftActGrp(*NO)
          ActGrp(*CALLER)
          PgmInfo(*PCML:*MODULE)
          Bnddir('KWA':'LOGISTIX':'HTTPAPI');
/copy qrpglesrc,httpapi_h
/copy qrpglesrc,ifsio_h
Dcl-PI SelectorProExport ExtPgm('CALLIT');
   End-PI;
    Dcl-Pr EndOfElement;
      UserData            Pointer;
      depth               Int(10);
      name                VarChar(1024)  Const;
      path                VarChar(24576) Const;
      value               VarChar(65535) Const;
      attrs               Pointer        Dim(32767)
                                         Const Options(*VarSize);
    End-Pr;

   wFile = '/Logistix/Events/SE20150225183816276.xml';
   rc = http_parse_xml_stmf( wFile
        : 1208
        : %paddr(StartOfElement)
        : %paddr(EndOfElement)
        : *Null);
   If rc <> *Zero;
     //  Error processing;
     http_error(err);
     http_crash();
   EndIf;

Dcl-Proc EndOfElement;
      Dcl-PI *n;
        UserData            Pointer;
        depth               Int(10);
        name                VarChar(1024)  Const;
        path                VarChar(24576) Const;
        value               VarChar(65535) Const;
        attrs               Pointer        Dim(32767)
                                           Const Options(*VarSize);
      End-Pi;
Dcl-S count Int(10);
      Dcl-S  attrname       VarChar(1024);
      Dcl-S  attrval        VarChar(65535);
// Pick Update
    If path = '/PickUpdate'
            + '/Locations'
            + '/Location'
            + '/Items'
            + '/Item';
      If name = 'AI';
        wCatchWeight = *Off;
        count = 1;
        Dow http_nextXmlAttr(attrs: count: attrname: attrval);
          If attrname = 'ID';
            If attrval = '3202';
              wCatchWeight = *On;
            EndIf;

            EndIf;
          EndDo;
          If wCatchWeight;
            wIndex += 1;
            RandomWeight(wIndex) = %Dec(value:9:2);
          EndIf;
        EndIf;
      EndIf;
End-Proc EndOfElement;

Here is the ifs file:

<PickUpdate ID="593" WarehouseID="0001" PickID="3619052"
AssignmentNumber="011289769" User="101" Quantity="1" ItemNumber="38564" Ord
derNumber="1627531" OrderLineNumber="19-000" xmlns="">
   <Time>2015-02-24T19:47:09</Time>

   <Locations>

     <Location Aisle="AE" Slot="321" Quantity="1" Verification="SCANNED">

       <Items>

         <Item ID="1" EntryMethod="SCANNED"
Barcode="01000680620222241716111910009">

           <AI ID="1" EntryMethod="SCANNED">00068062022224</AI>

           <AI ID="17" EntryMethod="SCANNED">11/19/2016 12:00:00 AM</AI>

           <AI ID="10" EntryMethod="SCANNED">009</AI>

         </Item>

       </Items>

       <LabelBarcodes>

         <LabelBarcode>3619052</LabelBarcode>

       </LabelBarcodes>

     </Location>

   </Locations>
</PickUpdate>

I get the error on this line:
          Dow http_nextXmlAttr(attrs: count: attrname: attrval);

I've debugged and stepped into the http_nextXmlAttr proc and it happens
before the first line of code is executed.  Could it be that the xml is
using the same name(AI) 3 times?

Any help is greatly appreciated.

Thanks,

Kevin


-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------