If you really need to accommodate 32K days (do weather forecasts really stretch that far into the future?) I would be inclined to ignore the earlier part of the document - which doesn't seem to contain much you might need - and use path to drill down to the forecastday elements and then use %Handler to process them in a manageable group. If you need an example holler and I'll point you to one.

P.S. You may have missed it when it was announced - but you don't need all the LIkeDS of templates any more - just code the nested structures directly.

e.g.
dcl-ds response Qualified;
version char(5);
termsofservice char(55);
dcl-ds features;
feature char(50);
end-ds;
dcl-ds forecast;
dcl-ds txt_forecast;
date char(50);
dcl-ds forecastdays ....
etc. etc.

So much nicer because it maps the XML directly.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Dec 4, 2017, at 3:06 PM, Smith, Mike <Mike_Smith@xxxxxxxxxxxxxxxx> wrote:

I'm working on a program that retrieve weather 'FORECAST' from WUNDERGROUND.COM

I think I have finally worked out the layout of the datastructures, but now I'm getting
RNF0376
Total length 46856810 of data item SFORECA... exceeds
16,773,104 bytes.

The XML file is really not all that big. I have a significally larger XML that I am using for another process with no issue. My weather xml file is 10343 bytes my other xml file is 10210510 bytes
I'm not really sure how to go about resolving this issue.


Below is the declarations.

dcl-ds response Qualified;
version char(5);
termsofservice char(55);
features LikeDS(features_T);
forecast LikeDS(forecast_T);
end-ds response ;

dcl-ds features_T Template Qualified;
feature char(50);
end-ds;


dcl-ds forecast_T Template Qualified ;
txt_forecast LikeDS(txt_forecast_T);
simpleforecast LikeDS(simpleforecast_T);
end-ds;

dcl-ds txt_forecast_T Template Qualified;
date char(50);
forecastdays LikeDS(forecastdays_T);
end-ds;

dcl-ds forecastdays_T Template Qualified;
countforecast int(10);
forecastday Dim(32767) LikeDS(forecastday_T);
end-ds ;

dcl-ds forecastday_T Template Qualified;
period char(5);
icon char(5);
icon_url char(50);
title char(50);
fcttext char(50);
fcttext_metric LikeDS(fcttext_metric_T);
pop char(5);
end-ds ;

dcl-ds fcttext_metric_T Template Qualified;
#cdata_section char(50);
end-ds ;

dcl-ds simpleforecast_T Template Qualified;
forecastdays LikeDS(Sforecastdays_T);
end-ds;

dcl-ds Sforecastdays_T Template Qualified;
countSforecast int(10);
Sforecastday Dim(32767) LikeDS(Sforecastday_T);
end-ds ;

dcl-ds Sforecastday_T Template Qualified;
date char(50);
period char(5);
shigh LikeDS(high_T) ;
slow LikeDS(low_T) ;
conditions char(50);
icon char(5);
icon_url char(50);
skyicon char(50);
pop char(5);
gpf_allday LikeDS(gpf_allday_T);
gpf_day LikeDS(gpf_day_T) ;
gpf_night LikeDS(gpf_night_T) ;
snow_allday LikeDS(snow_allday_T) ;
snow_day LikeDS(snow_day_T) ;
snow_night LikeDS(snow_night_T) ;
maxwind LikeDS(maxwind_T) ;
avewind LikeDS(avewind_T) ;
avehumidity char(5);
maxhumidity char(5);
minhumidity char(5);
end-ds ;

dcl-ds high_T Template Qualified;
fahrenheit char(50);
celsius char(50);
end-ds ;

dcl-ds low_T Template Qualified;
fahrenheit char(50);
celsius char(50);
end-ds ;

dcl-ds gpf_allday_T Template Qualified;
ins char(50);
outs char(50);
end-ds ;

dcl-ds gpf_day_T Template Qualified;
ins char(50);
outs char(50);
end-ds ;

dcl-ds gpf_night_T Template Qualified;
ins char(50);
outs char(50);
end-ds ;

dcl-ds snow_allday_T Template Qualified;
ins char(50);
outs char(50);
end-ds ;

dcl-ds snow_day_T Template Qualified;
ins char(50);
outs char(50);
end-ds ;

dcl-ds snow_night_T Template Qualified;
ins char(50);
outs char(50);
end-ds ;


dcl-ds maxwind_T Template Qualified;
mph char(50);
kph char(50);
dir char(50);
degrees char(50);
end-ds ;

dcl-ds avewind_T Template Qualified;
mph char(50);
kph char(50);
dir char(50);
degrees char(50);
end-ds ;
NOTICE: This message, including any attachment, is intended as a confidential and privileged communication. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this message.
--
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: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD


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.