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



I make it a point to initialize all "i" fields regardless of usage. 
I've seen strange results in Debug if I don't, so try adding inz to the
sub-field as well.

HTH,

Joel
http://www.rpgnext.com


On Tue, 2003-09-16 at 10:40, George Amaya wrote:
> When you initialize a data structure, it initializes all fields to
> blanks... the last field is causing the problem.
> 
> >>> facchinetti@xxxxxxxxx 09/16/03 7:16 AM >>>
> Just want to know if I'm misunderstanding the coding/usage
> of DS with indexes, otherwise I'll call IBM support.
> 
> My DS is:
> 
> dtotali           ds                  dim(10) qualified inz
> d dest                          45                         
> d qta                                 dim(20) like(w1qta01)
> d val                                 dim(20) like(w1imp01)
> d con                           10i 0 dim(20)              
> 
> if I code (sum each element in totali(2).qta to
> totali(1).qta):
> 
> totali(i2).qta+=totali(i3).qta;
> 
> I got an MCH1202 (decimal data....) but the dump clealry
> states the data in totali().qta are ok.
> 
> in fact if I code:
> 
> totali(i2).qta(01)+=totali(i3).qta(01);
> totali(i2).qta(02)+=totali(i3).qta(02);
> totali(i2).qta(03)+=totali(i3).qta(03);
> ....
> 
> no errors and the result is correct.
> 
> Any comments?
> 
> Marco
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> _______________________________________________
> This is the RPG programming on the AS400 / 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 AS400 / 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 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.