[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: XMl parsing using XML-Into opcode on V5R4
Please see the attached files. The xml file is just an example. We could have multiple stops, commodities, accessorials and so multiple <CTLError> per xml element. I have attempted to explain the issue in the rpg program's text file.
-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Jon Paris
Sent: Wednesday, July 15, 2009 5:16 PM
To: HTTPAPI and FTPAPI Projects
Subject: Re: XMl parsing using XML-Into opcode on V5R4
I'm afraid the high level view is not very helpful without knowing
where (if any) the repeat levels are. You can - for example - get
past the limits by using %Handler - but that is only applicable to
repeating elements.
Another alternative of course is to use XML-SAX or Scott's port of
Expat.
Jon Paris
www.Partner400.com
www.SystemiDeveloper.com
On 15-Jul-09, at 4:54 PM, Nilesh Jokhakar wrote:
> Is there any way else to make this happen other than using
> multiple XML-INTOs? I just want to make sure that I'm making a right
> approach to handle this issue. Herewith, I'm providing a high level
> tree structure of the XML.
>
>
>
> <freightbill SingleShipment="false">
> <freightbillaccessorials/>
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
9400 *----------------------------------------------------------------
9500 * Input Data Structure
9600 *----------------------------------------------------------------
9700 07/08/09
9800 D Freightbill Ds Qualified 07/10/09
9900 D id 10 07/15/09
10000 D ClientCode 30 07/15/09
10100 D ClientNetRate 5 07/10/09
10200 D Clientid 10 07/15/09
10300 D CarrierCode 20 07/15/09
10400 D Carrierid 10 07/15/09
10500 D CarrierMode 10 07/15/09
10600 D CarrierGoverningClass... 07/10/09
5722WDS V5R4M0 060210 SEU SOURCE LISTING 07/15/09 13:47:12 MISDEVO PAGE 3
SOURCE FILE . . . . . . . NJOKHAKAR/QRPGLESRC
MEMBER . . . . . . . . . UTFRWBRB
SEQNBR*...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 ...+... 9 ...+... 0
10700 D 30 07/15/09
10800 D FreightTerms 2 07/15/09
10900 D FreightTermsid 10 07/15/09
11000 D PrepaidCollect 3 07/15/09
11100 D IOIndicator 1 07/15/09
11200 D ShipDate 10 07/15/09
11300 D TotalRatedAmount... 07/10/09
11400 D 7 07/15/09
11500 D ResultCurrency 10 07/15/09
11600 D ResultCurrencyid... 07/10/09
11700 D 10 07/15/09
11800 D TotalWeight 5 07/10/09
11900 D TotalMiles 5 07/10/09
12000 D TotalRatedAsWeight... 07/10/09
12100 D 5 07/10/09
12200 D TariffMinimumCharge... 07/10/09
12300 D 7 07/15/09
12400 D TariffUsed 13 07/15/09
12500 D TariffRBNumber 20 07/15/09
12600 D TariffEffectiveDate... 07/10/09
12700 D 10 07/15/09
12800 D RatedDiscountPercentage... 07/10/09
12900 D 5 07/10/09
13000 D TotalDiscountAmount... 07/10/09
13100 D 5 07/10/09
13200 D TotalLineHaulAmount... 07/10/09
13300 D 7 07/15/09
13400 D TotalAccessorialAmount... 07/10/09
13500 D 7 07/15/09
13600 D PricingEffectiveDate... 07/10/09
13700 D 10 07/15/09
13800 D PricingExpirationDate... 07/10/09
13900 D 10 07/15/09
14000 D LinehaulPricingTypeid... 07/10/09
14100 D 10 07/15/09
14200 D LinehaulPricingid... 07/10/09
14300 D 10 07/15/09
14400 D LinehaulPricingLineNumber... 07/10/09
14500 D 3 07/15/09
14600 D LinehaulClassPricingid... 07/10/09
14700 D 10 07/15/09
14800 D LinehaulClassPricingLineNumber... 07/10/09
14900 D 3 07/15/09
15000 D AuthorityPublisher... 07/10/09
15100 D 20 07/15/09
15200 D AuthorityRelease... 07/10/09
15300 D 20 07/15/09
15400 D AuthorityItem... 07/10/09
15500 D 20 07/15/09
15600 D AuthorityNotes... 07/10/09
15700 D 50 07/15/09
15800 D AuthorityEffectiveDate... 07/10/09
15900 D 10 07/15/09
5722WDS V5R4M0 060210 SEU SOURCE LISTING 07/15/09 13:47:12 MISDEVO PAGE 4
SOURCE FILE . . . . . . . NJOKHAKAR/QRPGLESRC
MEMBER . . . . . . . . . UTFRWBRB
SEQNBR*...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 ...+... 9 ...+... 0
16000 D AuthorityExpirationDate... 07/10/09
16100 D 10 07/15/09
16200 D ShipperLocationCode... 07/10/09
16300 D 30 07/15/09
16400 D ShipperLocationid... 07/10/09
16500 D 10 07/15/09
16600 D ShipperName 30 07/15/09
16700 D ShipperAddress1... 07/10/09
16800 D 30 07/15/09
16900 D ShipperAddress2... 07/10/09
17000 D 30 07/15/09
17100 D ShipperGeographyid... 07/10/09
17200 D 10 07/15/09
17300 D ShipperCity 30 07/15/09
17400 D ShipperState 10 07/15/09
17500 D ShipperZip 15 07/15/09
17600 D 07/10/09
17700 D ShipperCounty 30 07/15/09
17800 D ShipperSPLC 15 07/15/09
17900 D ShipperCountry 10 07/15/09
18000 07/10/09
18100 D ConsigneeLocationCode... 07/10/09
18200 D 30 07/15/09
18300 D ConsigneeLocationid... 07/10/09
18400 D 10 07/15/09
18500 D ConsigneeName 30 07/15/09
18600 D ConsigneeAddress1... 07/10/09
18700 D 30 07/15/09
18800 D ConsigneeAddress2... 07/10/09
18900 D 30 07/15/09
19000 D ConsigneeGeographyid... 07/10/09
19100 D 10 07/15/09
19200 D ConsigneeCity 30 07/15/09
19300 D ConsigneeState 10 07/15/09
19400 D ConsigneeZip 15 07/15/09
19500 D ConsigneeCounty... 07/10/09
19600 D 30 07/15/09
19700 D ConsigneeSPLC 15 07/15/09
19800 D ConsigneeCountry... 07/10/09
19900 D 10 07/15/09
20000 D BillToLocationCode... 07/10/09
20100 D 30 07/15/09
20200 D BillToLocationid... 07/10/09
20300 D 10 07/15/09
20400 D BillToName 30 07/15/09
20500 D BillToAddress1... 07/10/09
20600 D 30 07/15/09
20700 D BillToAddress2... 07/10/09
20800 D 30 07/15/09
20900 D BillToGeographyid... 07/10/09
21000 D 10 07/15/09
21100 D BillToCity 30 07/15/09
21200 D BillToState 10 07/15/09
5722WDS V5R4M0 060210 SEU SOURCE LISTING 07/15/09 13:47:12 MISDEVO PAGE 5
SOURCE FILE . . . . . . . NJOKHAKAR/QRPGLESRC
MEMBER . . . . . . . . . UTFRWBRB
SEQNBR*...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 ...+... 9 ...+... 0
21300 D BillToZip 15 07/15/09
21400 D BillToCounty 30 07/15/09
21500 D BillToSPLC 15 07/15/09
21600 D BillToCountry 10 07/15/09
21700 D RoundTripFlag 5 07/10/09
21800 D FullVisibleCapacityFlag... 07/10/09
21900 D 5 07/10/09
22000 D Equipmentid 10 07/15/09
22100 D EquipmentInitials... 07/10/09
22200 D 10 07/15/09
22300 D EquipmentNumber... 07/10/09
22400 D 10 07/15/09
22500 D EquipmentTypeid... 07/10/09
22600 D 10 07/15/09
22700 D EquipmentType 20 07/15/09
22800 D InterlineFlag 5 07/10/09
22900 D IntraStateFlag 5 07/10/09
23000 D Routeid 10 07/15/09
23100 D Route 200 07/15/09
23200 D RouteCode 10 07/15/09
23300 D GP1 50 07/15/09
23400 D GP2 50 07/15/09
23500 D GP3 50 07/15/09
23600 D GP4 50 07/15/09
23700 D GP5 50 07/15/09
23800 D GP6 50 07/15/09
23900 D GP7 50 07/15/09
24000 D GP8 50 07/15/09
24100 D GP9 50 07/15/09
24200 D GP10 50 07/15/09
24300 D GP11 50 07/15/09
24400 D GP12 50 07/15/09
24500 D GP13 50 07/15/09
24600 D GP14 50 07/15/09
24700 D GP15 50 07/15/09
24800 D PricingTraceEnabled... 07/10/09
24900 D 5 07/10/09
25000 D EntryUser 50 07/15/09
25100 D EntryDate 10 07/15/09
25200 D LastModUser 50 07/15/09
25300 D LastModDate 10 07/15/09
25400 D LastUpdate 10 07/15/09
25500 D FatalError 5 07/10/09
25600 D UseOnlyForcedMiles... 07/10/09
25700 D 5 07/10/09
25800 D ServiceTime 3 07/15/09
25900 D DimWeight 5 07/10/09
26000 D SingleShipment 5 07/10/09
26100 D freightbillaccessorials... 07/14/09
26200 D likeds(FrBlAccs_t1) 07/14/09
26300 D freightbillcommodities... 07/14/09
26400 D likeds(FrBlComm_t1) 07/14/09
26500 D freightbillratingdetails... 07/14/09
5722WDS V5R4M0 060210 SEU SOURCE LISTING 07/15/09 13:47:12 MISDEVO PAGE 6
SOURCE FILE . . . . . . . NJOKHAKAR/QRPGLESRC
MEMBER . . . . . . . . . UTFRWBRB
SEQNBR*...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 ...+... 9 ...+... 0
26600 D Likeds(FrBlRtDtl_t1) 07/14/09
26700 D freightbillmileagecalculations... 07/14/09
26800 D Likeds(FrBlMlCal_t1) 07/14/09
26900 D freightbillpricingdisqualifys... 07/14/09
27000 D Likeds(FrBlPrDis_t1) 07/14/09
27100 D freightbillratingerrors... 07/14/09
27200 D Likeds(FrBlRtErr_t1) 07/14/09
27300 D freightbillstops... 07/14/09
27400 D Likeds(FrBlStops_t1) 07/14/09
27500 D freightbilluomunits... 07/14/09
27600 D Likeds(FrBlUOMun_t1) 07/14/09
27700 D freightbillconstraints... 07/14/09
27800 D Likeds(FrBlCstrs_t1) 07/14/09
27900 D freightbilluierrors... 07/15/09
28000 D Likeds(FrBierrd) Dim(10) 07/15/09
28100 07/10/09
28200 * freightbill/freightbillaccessorials 07/13/09
28300 D*freightbillaccessorials... 07/14/09
28400 D* Ds Qualified 07/14/09
28500 D FrBlAccs_t1 Ds Qualified 07/14/09
28600 D freightbillaccessorial... 07/12/09
28700 D Likeds(FrBlAccs_t) Dim(18) 07/14/09
28800 D FrBlAccs_t Ds Qualified 07/14/09
28900 D id 10 07/15/09
29000 D LineNumber 3 07/15/09
29100 D AccessorialCode... 07/08/09
29200 D 10 07/15/09
29300 D AccessorialCodeid... 07/13/09
29400 D 10 07/15/09
29500 D Instance 3 07/15/09
29600 D ForcedUnits 1 07/15/09
29700 D ForcedRate 1 07/15/09
29800 D ForcedUOMDesc 20 07/15/09
29900 D ForcedExtension... 07/13/09
30000 D 7 07/15/09
30100 D ForcedApplyLevel... 07/13/09
30200 D 3 07/15/09
30300 D UIErrorsColl Likeds(FrBlUIerr_t) 07/14/09
30400 D 07/08/09
30500 07/10/09
30600 * freightbill/freightbillcommodities 07/12/09
30700 D*freightbillcommodities... 07/14/09
30800 D* Ds Qualified 07/14/09
30900 D FrBlComm_t1 Ds Qualified 07/14/09
31000 D freightbillcommodity... 07/12/09
31100 D Likeds(FrBlComm_t) Dim(15) 07/14/09
31200 07/12/09
31300 D FrBlComm_t Ds Qualified 07/14/09
31400 D id 10 07/15/09
31500 D LineNumber 3 07/15/09
31600 D Description 200 07/15/09
31700 D Code 2 07/15/09
31800 D Commodityid 10 07/15/09
5722WDS V5R4M0 060210 SEU SOURCE LISTING 07/15/09 13:47:12 MISDEVO PAGE 7
SOURCE FILE . . . . . . . NJOKHAKAR/QRPGLESRC
MEMBER . . . . . . . . . UTFRWBRB
SEQNBR*...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 ...+... 9 ...+... 0
31900 D FBClass 3 07/15/09
32000 D Weight 5 07/15/09
32100 D Pieces 5 07/10/09
32200 D UIErrorsColl Likeds(FrBlUIerr_t) 07/14/09
32300 07/13/09
32400 07/13/09
32500 * freightbill/freightbillratingdetails 07/13/09
32600 D*freightbillratingdetails... 07/14/09
32700 D* Ds Qualified 07/14/09
32800 D FrBlRtDtl_t1 Ds Qualified 07/14/09
32900 D freightbillratingdetail... 07/13/09
33000 D Likeds(FrBlRtDtl_t) Dim(10) 07/14/09
33100 07/13/09
33200 D FrBlRtDtl_t Ds Qualified 07/14/09
33300 D id 10 07/15/09
33400 D LineNumber 3 07/15/09
33500 D Linehaulflag 5 07/15/09
33600 D PricingEffectiveDate... 07/13/09
33700 D 10 07/15/09
33800 D PricingExpirationDate... 07/13/09
33900 D 10 07/15/09
34000 D PricingTypeName... 07/13/09
34100 D 50 07/15/09
34200 D PricingTypeId 10 07/15/09
34300 D PricingId 10 07/15/09
34400 D PricingLineNumber... 07/13/09
34500 D 3 07/15/09
34600 D AuthorityPublisher... 07/13/09
34700 D 20 07/15/09
34800 D AuthorityRelease... 07/13/09
34900 D 20 07/15/09
35000 D AuthoritySection... 07/13/09
35100 D 20 07/15/09
35200 D AuthorityItem... 07/15/09
35300 D 20 07/15/09
35400 D AuthorityNotes... 07/13/09
35500 D 100 07/15/09
35600 D AuthorityEffectiveDate... 07/13/09
35700 D 10 07/15/09
35800 D AuthorityExpirationDate... 07/13/09
35900 D 10 07/15/09
36000 D ActualWeight 5 07/13/09
36100 D AsWeight 5 07/13/09
36200 D PricingBasedOn 2 07/15/09
36300 D PricingBasedOnPer... 07/13/09
36400 D 20 07/15/09
36500 D Description 100 07/15/09
36600 D CommodityCode 2 07/15/09
36700 D AccessorialCode... 07/13/09
36800 D 30 07/15/09
36900 D AccessorialCodeid... 07/13/09
37000 D 10 07/15/09
37100 D AccessorialLevel... 07/13/09
5722WDS V5R4M0 060210 SEU SOURCE LISTING 07/15/09 13:47:12 MISDEVO PAGE 8
SOURCE FILE . . . . . . . NJOKHAKAR/QRPGLESRC
MEMBER . . . . . . . . . UTFRWBRB
SEQNBR*...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 ...+... 9 ...+... 0
37200 D 3 07/15/09
37300 D Instance 3 07/15/09
37400 D ActualClass 3 07/15/09
37500 D AsClass 3 07/15/09
37600 D UOMDescription 20 07/15/09
37700 D Rate 5 07/13/09
37800 D Extension 5 07/13/09
37900 D MinimumChargeFlag... 07/13/09
38000 D 5 07/13/09
38100 D FloorRevenueFlag... 07/13/09
38200 D 5 07/13/09
38300 D AutoAppliedFlag... 07/13/09
38400 D 5 07/13/09
38500 D ForcedAccFlag 5 07/13/09
38600 D UnRatedFlag 5 07/13/09
38700 D UOMPricingBasis... 07/13/09
38800 D 10 07/15/09
38900 D UOMGP1 50 07/15/09
39000 D UOMGP2 50 07/15/09
39100 D UOMGP3 50 07/15/09
39200 D UOMGP4 50 07/15/09
39300 D UOMGP5 50 07/15/09
39400 D UIErrorsColl Likeds(FrBlUIerr_t) 07/14/09
39500 07/08/09
39600 * freightbill/freightbillmileagecalculations 07/13/09
39700 D*freightbillmileagecalculations... 07/14/09
39800 D* Ds Qualified 07/14/09
39900 D FrBlMlCal_t1 Ds Qualified 07/14/09
40000 D freightbillmileagecalculation... 07/13/09
40100 D Likeds(FrBlMlCal_t) Dim(20) 07/14/09
40200 07/13/09
40300 D FrBlMlCal_t Ds Qualified 07/14/09
40400 D id 10 07/15/09
40500 D MileageTypeName... 07/13/09
40600 D 50 07/15/09
40700 D MileageProfileName... 07/13/09
40800 D 15 07/15/09
40900 D MileageTypeid 10 07/15/09
41000 D MileageProfileid... 07/13/09
41100 D 3 07/15/09
41200 D DirectMiles 5 07/13/09
41300 D ExcessMiles 5 07/13/09
41400 D TotalMiles 5 07/13/09
41500 D ErrorFlag 5 07/13/09
41600 D ErrorDescription... 07/13/09
41700 D 200 07/15/09
41800 D UIErrorsColl Likeds(FrBlUIerr_t) 07/14/09
41900 07/13/09
42000 * freightbill/freightbillpricingdisqualifys 07/13/09
42100 D*freightbillpricingdisqualifys... 07/14/09
42200 D* Ds Qualified 07/14/09
42300 D FrBlPrDis_t1 Ds Qualified 07/14/09
42400 D freightbillpricingdisqualify... 07/13/09
5722WDS V5R4M0 060210 SEU SOURCE LISTING 07/15/09 13:47:12 MISDEVO PAGE 9
SOURCE FILE . . . . . . . NJOKHAKAR/QRPGLESRC
MEMBER . . . . . . . . . UTFRWBRB
SEQNBR*...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 ...+... 9 ...+... 0
42500 D Likeds(FrBlPrDis_t) Dim(10) 07/14/09
42600 07/13/09
42700 D FrBlPrDis_t Ds Qualified 07/14/09
42800 D id 10 07/15/09
42900 D LineNumber 3 07/15/09
43000 D PricingTypeid 10 07/15/09
43100 D PricingTypename... 07/13/09
43200 D 50 07/15/09
43300 D Remark 100 07/15/09
43400 D Pricingids 100 07/15/09
43500 D UIErrorsColl Likeds(FrBlUIerr_t) 07/14/09
43600 07/13/09
43700 * freightbill/freightbillratingerrors 07/13/09
43800 D*freightbillratingerrors... 07/14/09
43900 D* Ds Qualified 07/14/09
44000 D FrBlRtErr_t1 Ds Qualified 07/14/09
44100 D freightbillratingerror... 07/13/09
44200 D Likeds(FrBlRtErr_t) Dim(10) 07/14/09
44300 07/13/09
44400 D FrBlRtErr_t Ds Qualified 07/14/09
44500 D ErrorCode 10 07/15/09
44600 D Source 50 07/15/09
44700 D ErrorMessage 100 07/15/09
44800 D ExtraMessage 100 07/15/09
44900 D Fatal 5 07/13/09
45000 07/13/09
45100 * freightbill/freightbillstops 07/13/09
45200 D*freightbillstops... 07/14/09
45300 D* Ds Qualified 07/14/09
45400 D FrBlStops_t1 Ds Qualified 07/14/09
45500 D freightbillstop... 07/13/09
45600 D Likeds(FrBlStops_t) Dim(40) 07/14/09
45700 07/13/09
45800 D FrBlStops_t Ds Qualified 07/14/09
45900 D id 10 07/15/09
46000 D LineNumber 3 07/15/09
46100 D StopTypeid 3 07/15/09
46200 D StopType 10 07/15/09
46300 D LocationCodeid 3 07/15/09
46400 D UILocationCode 30 07/15/09
46500 D Name 30 07/15/09
46600 D Address1 30 07/15/09
46700 D Address2 30 07/15/09
46800 D Geographyid 10 07/15/09
46900 D City 30 07/15/09
47000 D State 10 07/15/09
47100 D Zip 15 07/15/09
47200 D County 30 07/15/09
47300 D SPLC 15 07/15/09
47400 D Country 10 07/15/09
47500 D UIErrorsColl Likeds(FrBlUIerr_t) 07/14/09
47600 07/13/09
47700 07/13/09
5722WDS V5R4M0 060210 SEU SOURCE LISTING 07/15/09 13:47:12 MISDEVO PAGE 10
SOURCE FILE . . . . . . . NJOKHAKAR/QRPGLESRC
MEMBER . . . . . . . . . UTFRWBRB
SEQNBR*...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 ...+... 9 ...+... 0
47800 * freightbill/freightbilluomunits 07/13/09
47900 D*freightbilluomunits... 07/14/09
48000 D* Ds Qualified 07/14/09
48100 D FrBlUOMun_t1 Ds Qualified 07/14/09
48200 D freightbilluomunit... 07/13/09
48300 D Likeds(FrBlUOMun_t) Dim(10) 07/14/09
48400 07/13/09
48500 D FrBlUOMun_t Ds Qualified 07/14/09
48600 D FreightBillid 10 07/15/09
48700 D Instance 3 07/15/09
48800 D Qualifier 30 07/15/09
48900 D Units 2 07/15/09
49000 D UnitsCals 100 07/15/09
49100 D UIErrorsColl Likeds(FrBlUIerr_t) 07/14/09
49200 07/13/09
49300 * freightbill/freightbillconstraints 07/13/09
49400 D*freightbillconstraints... 07/14/09
49500 D* Ds Qualified 07/14/09
49600 D FrBlCstrs_t1 Ds Qualified 07/14/09
49700 D freightbillconstraint... 07/13/09
49800 D Likeds(FrBlCstrs_t) Dim(10) 07/14/09
49900 07/13/09
50000 D FrBlCstrs_t Ds Qualified 07/14/09
50100 D id 10 07/15/09
50200 D ConstraintName 30 07/15/09
50300 D Constraintid 10 07/15/09
50400 D ConstraintValue... 07/13/09
50500 D 50 07/15/09
50600 D UIErrorsColl Likeds(FrBlUIerr_t) 07/14/09
50700 07/13/09
50800 07/15/09
50900 D FrBlUIerr_t Ds Qualified 07/15/09
51000 D CtlError Likeds(FrBiErrd) Dim(5) 07/15/09
51100 07/15/09
51200 D FrBiErrd Ds Qualified 07/15/09
51300 D ErrorCode 10 07/15/09
51400 D Source 50 07/15/09
51500 D ErrorMessage 100 07/15/09
51600 D ExtraMessage 100 07/15/09
51700 D Fatal 5 07/15/09
The below statement works fine ( including "UIErrorsColl" data strucutre) if I reduce the Dimension elements to 2 or 3,
Clear freightbill;
xml-into(e) freightbill
%XML(retdata : 'case=any allowextra=yes +
allowmissing=yes');
But, in my scenerio, I can not use just 2 or 3 dimensional elements. So, I started to
separate out the couple of internal data structures and use the following commands.
// Use freightbillcommodities xml element separately (path = freightbill/freightbillcommodities)
// clear freightbillcommodities;
// xml-into freightbillcommodities
// %XML(xmldata : 'case=any allowextra=yes +
// allowmissing=yes path=freightbill/+
// freightbillcommodities');
BegProcIndex = %scan('<freightbillcommodities>':retdata);
EndProcIndex = %scan('</freightbillcommodities>':retdata);
datacomm = %Subst(xmldata : BegProcIndex :
EndProcIndex - BegProcIndex + 25);
// I even tried path = freightbillcommodities but still I don't get "UIErrorsColl" data strucutre populated
clear freightbillcommodities;
xml-into freightbillcommodities
%XML(datacomm : 'case=any allowextra=yes +
allowmissing=yes path= +
freightbillcommodities');
I don't get "UIErrorsColl" data structure populated in the above XML-Into freightbillcommodities. So, using XML-SAX
to parse only "freightbillcommodities" xml element and populate "UIErrorsColl"
XML-SAX(E) %handler(mysaxhandler : dummyCommArea)
%XML(datacomm : 'doc=string');
<freightbill id="0" ClientCode="ChildSample" ClientNetRate="false" Clientid="95" CarrierCode="SampleAlone" Carrierid="85" CarrierMode="T" CarrierGoverningClass="NMFC" FreightTerms="OP" FreightTermsid="159" PrepaidCollect="PPD" IOIndicator="O" ShipDate="2009-02-18" TotalRatedAmount="2411.10" ResultCurrency="USD" ResultCurrencyid="1" TotalWeight="15000" TotalMiles="1269.00000000" TotalRatedAsWeight="15000" TariffMinimumCharge="0" TariffUsed="" TariffRBNumber="" TariffEffectiveDate="9998-12-31" RatedDiscountPercentage="0" TotalDiscountAmount="0" TotalLineHaulAmount="1713.15" TotalAccessorialAmount="697.95" PricingEffectiveDate="2009-01-01" PricingExpirationDate="9998-12-31" LinehaulPricingTypeid="42" LinehaulPricingid="449" LinehaulPricingLineNumber="1" LinehaulClassPricingid="0" LinehaulClassPricingLineNumber="0" AuthorityPublisher="" AuthorityRelease="" AuthoritySection="" AuthorityItem="" AuthorityNotes="" AuthorityEffectiveDate="2009-01-01" AuthorityExpirationDate="9998-12-31" ShipperLocationCode="" ShipperLocationid="0" ShipperName="" ShipperAddress1="" ShipperAddress2="" ShipperGeographyid="0" ShipperCity="Cleveland" ShipperState="OH" ShipperZip="44101" ShipperCounty="Cuyahoga" ShipperSPLC="" ShipperCountry="USA" ConsigneeLocationCode="" ConsigneeLocationid="0" ConsigneeName="" ConsigneeAddress1="" ConsigneeAddress2="" ConsigneeGeographyid="0" ConsigneeCity="Houston" ConsigneeState="TX" ConsigneeZip="77002" ConsigneeCounty="Harris" ConsigneeSPLC="" ConsigneeCountry="USA" BillToLocationCode="" BillToLocationid="0" BillToName="" BillToAddress1="" BillToAddress2="" BillToGeographyid="0" BillToCity="" BillToState="" BillToZip="" BillToCounty="" BillToSPLC="" BillToCountry="" RoundTripFlag="false" FullVisibleCapacityFlag="false" Equipmentid="0" EquipmentInitials="" EquipmentNumber="" EquipmentTypeid="0" EquipmentType="" InterlineFlag="false" IntraStateFlag="false" Routeid="0" Route="" RouteCode="" GP1="" GP2="" GP3="" GP4="" GP5="" GP6="" GP7="" GP8="" GP9="" GP10="" GP11="" GP12="" GP13="" GP14="" GP15="" PricingTraceEnabled="false" EntryUser="HD-SQL-DRL\CT Logistics User" EntryDate="2009-02-18" LastModUser="HD-SQL-DRL\CT Logistics User" LastModDate="2009-02-18" LastUpdate="1" FatalError="false" UseOnlyForcedMiles="false" ServiceTime="0" DimWeight="0" SingleShipment="false">
<freightbillaccessorials>
<freightbillaccessorial id="-1" LineNumber="1" AccessorialCode="UNL" AccessorialCodeid="0" Instance="1" ForcedUnits="0" ForcedRate="0" ForcedUOMDesc="" ForcedExtension="0" ForcedApplyLevel="0">
<UIErrorsColl/>
</freightbillaccessorial>
</freightbillaccessorials>
<freightbillcommodities><freightbillcommodity id="1" LineNumber="1" Description="FAK" Code="1" Commodityid="201" FBClass="9999" Weight="15000" Pieces="0"><UIErrorsColl /></freightbillcommodity><freightbillcommodity id="0" LineNumber="2" Description="Hazmat Products, ITEM 20000: WEIGHING" Code="20000.20000000" Commodityid="0" FBClass="200" Weight="21000" Pieces="4"><UIErrorsColl><CTLError><ErrorCode>FBVal</ErrorCode><Source>Commodity</Source><ErrorMessage>Unable to load commodity by code</ErrorMessage><ExtraMessage>20000.20000000</ExtraMessage><Fatal>true</Fatal></CTLError></UIErrorsColl></freightbillcommodity></freightbillcommodities>
<freightbillratingdetails>
<freightbillratingdetail id="0" LineNumber="1" LinehaulFlag="true" PricingEffectiveDate="2009-01-01T00:00:00" PricingExpirationDate="9998-12-31T00:00:00" PricingTypeName="Linehaul" PricingTypeid="42" Pricingid="449" PricingLineNumber="1" AuthorityPublisher="" AuthorityRelease="" AuthoritySection="" AuthorityItem="" AuthorityNotes="" AuthorityEffectiveDate="2009-01-01T00:00:00" AuthorityExpirationDate="9998-12-31T00:00:00" ActualWeight="15000" AsWeight="15000" PricingBasedOn="1269.00000000" PricingBasedOnPer="Per Mile" Description="Mileage Charge" CommodityCode="0" AccessorialCode="" AccessorialCodeid="0" AccessorialLevel="0" Instance="-1" ActualClass="0" AsClass="0" UOMDescription="ML" Rate="1.35000000" Extension="1713.1500000000000000" MinimumChargeFlag="false" FloorRevenueFlag="false" AutoAppliedFlag="false" ForcedAccFlag="false" UnratedFlag="false" UOMPricingBasis="MILEAGE" UOMGP1="" UOMGP2="" UOMGP3="" UOMGP4="" UOMGP5="">
<UIErrorsColl/>
</freightbillratingdetail>
<freightbillratingdetail id="0" LineNumber="2" LinehaulFlag="false" PricingEffectiveDate="2009-01-01T00:00:00" PricingExpirationDate="9998-12-31T00:00:00" PricingTypeName="Surcharge" PricingTypeid="40" Pricingid="451" PricingLineNumber="1" AuthorityPublisher="" AuthorityRelease="" AuthoritySection="" AuthorityItem="" AuthorityNotes="" AuthorityEffectiveDate="2009-01-01T00:00:00" AuthorityExpirationDate="9998-12-31T00:00:00" ActualWeight="15000" AsWeight="15000" PricingBasedOn="1269.00000000" PricingBasedOnPer="Per Mile (Fuel)" Description="Fuel Surcharge (Fuel Per Mile Fuel Price 4.49700000 2/18/2009 2/18/2009)" CommodityCode="0" AccessorialCode="FSC" AccessorialCodeid="170" AccessorialLevel="0" Instance="1" ActualClass="0" AsClass="0" UOMDescription="FFM" Rate="0.55000000" Extension="697.9500000000000000" MinimumChargeFlag="false" FloorRevenueFlag="false" AutoAppliedFlag="true" ForcedAccFlag="false" UnratedFlag="false" UOMPricingBasis="MILEAGE" UOMGP1="" UOMGP2="" UOMGP3="" UOMGP4="" UOMGP5="">
<UIErrorsColl/>
</freightbillratingdetail>
</freightbillratingdetails>
<freightbillmileagecalculations>
<freightbillmileagecalculation id="0" MileageTypeName="" MileageProfileName="3 Digit Zip Code Mileages" MileageTypeid="0" MileageProfileid="24" DirectMiles="1269.00000000" ExcessMiles="0" TotalMiles="1269.00000000" ErrorFlag="false" ErrorDescription="">
<freightbillmileagecalculationlegs>
<freightbillmileagecalculationlegs id="1" LineNumber="1" Mileage="1269.00000000">
<UIErrorsColl/>
</freightbillmileagecalculationlegs>
</freightbillmileagecalculationlegs>
<UIErrorsColl/>
</freightbillmileagecalculation>
</freightbillmileagecalculations>
<freightbillpricingdisqualifys>
<freightbillpricingdisqualify id="0" LineNumber="1" PricingTypeid="42" PricingTypeName="Linehaul" Remark="Records Selected" Pricingids="449, 454">
<UIErrorsColl/>
</freightbillpricingdisqualify>
<freightbillpricingdisqualify id="0" LineNumber="2" PricingTypeid="40" PricingTypeName="Surcharge" Remark="Records Selected" Pricingids="451">
<UIErrorsColl/>
</freightbillpricingdisqualify>
<freightbillpricingdisqualify id="0" LineNumber="3" PricingTypeid="38" PricingTypeName="Accessorial" Remark="Records Selected" Pricingids="452">
<UIErrorsColl/>
</freightbillpricingdisqualify>
<freightbillpricingdisqualify id="0" LineNumber="4" PricingTypeid="38" PricingTypeName="Accessorial" Remark="Disqualified for Accessorial Codes" Pricingids="452">
<UIErrorsColl/>
</freightbillpricingdisqualify>
<freightbillpricingdisqualify id="5" LineNumber="5" PricingTypeid="42" PricingTypeName="Linehaul" Remark="Rating the following pricings" Pricingids="449, 454">
<UIErrorsColl/>
</freightbillpricingdisqualify>
</freightbillpricingdisqualifys>
<freightbillratingerrors>
<freightbillratingerror>
<ErrorCode>113</ErrorCode>
<Source>FreitRater</Source>
<ErrorMessage>Cannot establish rates for this bill</ErrorMessage>
<ExtraMessage/>
<Fatal>true</Fatal>
</freightbillratingerror>
</freightbillratingerrors>
<freightbillstops>
<freightbillstop id="0" LineNumber="1" StopTypeid="162" StopType="SO" LocationCodeid="0" UILocationCode="" Name="" Address1="" Address2="" Geographyid="251191" City="Houston" State="TX" Zip="77001" County="Harris" SPLC="" Country="USA">
<UIErrorsColl/>
</freightbillstop>
</freightbillstops>
<freightbilluomunits>
<freightbilluomunit id="0" Instance="1" Qualifier="162" Units="SO" UnitsCals="0">
<UIErrorsColl/>
</freightbilluomunit>
</freightbilluomunits>
<freightbillconstraints>
<freightbillconstraint id="-1" ConstraintName="ServiceType" Constraintid="0" ConstraintValue="TL">
<UIErrorsColl/>
</freightbillconstraint>
</freightbillconstraints>
</freightbill>
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------