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



ok - thanks



From: "Tyler, Matt" <matt.tyler@xxxxxxxxxxxxxx>
To: "RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>
Date: 01/26/2012 03:50 PM
Subject: RE: XML-INTO with %HANDLER
Sent by: rpg400-l-bounces@xxxxxxxxxxxx



I realized that the copy book HSPECLE and DSPGMINF4 were in the code

Just replace them with something you have or use this code.

HSPECLE:
H OPENOPT(*NOINZOFL) OPTION(*NODEBUGIO:*SRCSTMT)
H BNDDIR('WFIBNDDIR')
/IF DEFINED(*CRTBNDRPG)
/IF NOT DEFINED(HSPECLE_OVERRIDE_ACTGRP)
H DFTACTGRP(*NO) ACTGRP(*CALLER)
/ENDIF
/ELSE
H NOMAIN
/ENDIF
DSPGMINF4:
D PGMINF SDS
D ProcStatus *STATUS
D ProcRoutin *ROUTINE
D ProcName *PROC
D ParmCount *PARMS
D PrmCnt *PARMS
D ProgName 334 343
D Pgmnam 334 343
D JobName 244 253
D JobNam 244 253
D UserName 254 263
D JobUsr 254 263
D JobNbr 264 269 0
D JobDate 270 275 0
D JobDat 270 275 0
D ProgDate 276 281 0
D PgmDat 276 281 0
D ProgTime 282 287 0
D PgmTim 282 287 0


Thanks, Matt

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Tyler, Matt
Sent: Thursday, January 26, 2012 2:45 PM
To: RPG programming on the IBM i / System i
Subject: RE: XML-INTO with %HANDLER

I had to parse a four large Lawson Report Writer XML document (up to
several hundred megs big ). Its structure was not deep and was
consistence enough but repeated an unknown number of times. I first
coded the XML-INTO with a handler. During testing it took about 3
minutes for the documents to be processed. I ended up going to the
XML-SAX (I forget the exact reason but it was because of the document I
had to process), when I was done figuring out all the needed handler
code the same documents processed in 30 seconds.

It was more work with the XML-SAX but I learned a lot from the
experience.

Below are code samples I used to build my experience with the XML-SAX
parser.

http://code.midrange.com/6ad9d425e7.html
http://code.midrange.com/36f1294cf9.html
http://code.midrange.com/2258cfb028.html


try them out.

Thanks, Matt
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
MRiggins@xxxxxxxxxxxx
Sent: Thursday, January 26, 2012 2:04 PM
To: RPG programming on the IBM i / System i
Subject: Re: XML-INTO with %HANDLER

Are you using %handler because the PO data structure is too big when you

make the arrays as big as you need? (Just curious.)

Yes that is correct.

The example I sent just showed one POChange set. There will be multiple

POChange sets and I wanted to be able to process an XML file that had an

unknown number of these sets.

Thanks,
MLR



From: Barbara Morris <bmorris@xxxxxxxxxx>
To: rpg400-l@xxxxxxxxxxxx
Date: 01/26/2012 02:59 PM
Subject: Re: XML-INTO with %HANDLER
Sent by: rpg400-l-bounces@xxxxxxxxxxxx



On 1/26/2012 12:07 PM, MRiggins@xxxxxxxxxxxx wrote:
that's good info, I'm concerned that I have 3 nodes at the same level
of
ChangePODetail.
I have the ChangePODetail, SplitPODetail and NewPODetail - is that
possible to handle in this way?

No, if you need to handle the ChangePODetail's using %handler, you'd
have to handle anything at the same level separately.

Are you using %handler because the PO data structure is too big when you

make the arrays as big as you need? (Just curious.)


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.