|
If you specify 'case=any' in the XML-INTO verb, the case will not matter.
Steve Needles
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Vern Hamberg
Sent: Wednesday, August 21, 2013 12:13 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: xml-into
I don't know that it matters, but I'd be sure to match case, as well. XML
itself is case-sensitive.
No one should use the same letters in different case, but who knows, and
what would RPG do with it, where names are not case-sensitive?
----- Original Message -----
The XML has a field called 'pickup', but the DS in the RPG has a field
called 'pickups' - could that be it?
On Wed, Aug 21, 2013 at 7:23 AM, RPGLIST <rpglist@xxxxxxxxxxx> wrote:
Thanks Jon, I'll take a look at it.
You should be able to deal with this by using %Handler and
processing a load at a time. That removes the 999 X at the top level.
This article describes your scenario and how to handle it.
http://www.mcpressonline.com/rpg/handling-xml-into-problems.html
On 2013-08-21, at 10:16 AM, "RPGLIST" <rpglist@xxxxxxxxxxx> wrote:
Hey Barbara,
I finally found an opportunity to get back to this project.
Here is the sample xml doc I'm using:
<loads>
<load>
<shipper>Acme Metal</shipper>
<consignee>Derringer Steel</consignee>
<pickup>Norfolk</pickup>
<pickup>Omaha</pickup>
</load>
</loads>
I have it loaded on the IFS, not that it should really matter at
this point...
The following is my RPG code:
0001.07 D load_t ds qualified template
0001.08 D dim(999)
0001.09 D Shipper 20
0001.10 D Consignee 20
0001.11 D pickups 20 dim(999)
0001.12 D Num_Pickups 10i 0
0001.13
0001.14 Dloads ds qualified
0001.15 D Load like(load_t) dim(999)
0001.17 d num_load 10i 0
0001.18
0008.00 Dfile s 100a varying
0009.00 DOpts s 100a varying
0009.01 DMyTest s 20a
0009.02 DLo s 5 0
0010.00
0010.02
0011.00 /Free
0011.01 file = '/testxmlfile.xml';
0011.02 Opts = 'countprefix=num_ doc=file case=any';
0011.03
0011.05
0011.06 xml-into loads %xml(file: opts);
0011.07 for lo = 1 to loads.Num_Load;
0011.08 MyTest = Loads.load(lo).shipper;
0011.09 endfor;
0011.11
0011.12 *inlr = *on;
0012.00 /End-Free
When I try to compile its throwing me an entirely new error:
*RNF0376 30 2 The data item is larger than the maximum of
16,773,104
byte
There are others but this one I'm not sure how to fix....
I suppose I could lower the max stops to 99, I don't see anyone
making
1,000 stops between point A and point B, but I suppose if someone
wanted a truck to make daily deliveries for two years it would be
possible :)
--
This is the RPG programming on the IBM i (AS/400 and 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.
Jon Paris
www.partner400.com
www.SystemiDeveloper.com
--
This is the RPG programming on the IBM i (AS/400 and 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 is the RPG programming on the IBM i (AS/400 and 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.
--
Rory Hewitt
http://www.linkedin.com/in/roryhewitt
--
This is the RPG programming on the IBM i (AS/400 and 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 is the RPG programming on the IBM i (AS/400 and 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 communication, including attachments, is confidential, may be subject
to legal privileges, and is intended for the sole use of the addressee. Any
use, duplication, disclosure or dissemination of this communication, other
than by the addressee, is prohibited. If you have received this
communication in error, please notify the sender immediately and delete or
destroy this communication and all copies.
TRVDiscDefault::1201
--
This is the RPG programming on the IBM i (AS/400 and 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.
As an Amazon Associate we earn from qualifying purchases.
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.