|
I need an extra set of eyes please... I have this datastructure set up so that I may use multi-dimensional arrays, however, I can't get the program to work. Keep getting blanks in the datastructure instead of zeros. D LY C 1 D TY C 2 D Unit C 1 D Area C 2 D Regn C 3 D Comp C 4 D Year DS Qualified Dim(2) Inz D Location LikeDS(Variables) DIM(4) Inz D Variables DS Qualified Inz D Terms Like(HTOTOT) Inz D ServiceA Like(HTOSVA) Inz D ServiceB Like(HTOSVB) Inz D ServiceC Like(HTOSVC) Inz D ServiceD Like(HTOSVD) Inz D ServiceE Like(HTOSVE) Inz D ServiceH Like(HTOSVH) Inz D FTTerms Like(HTOFT) Inz D PBTerms Like(HTOPB) Inz D PTTerms Like(HTOPT) Inz D Active Like(HTOACT) Inz D FTActive Like(HTOAFT) Inz D PBActive Like(HTOAPB) Inz D PTActive Like(HTOAPT) Inz D TOP 4 1 Inz D TOPB 4 1 Inz D FTTOP 4 1 Inz D PBTOP 4 1 Inz D PTTOP 4 1 Inz D UMAMT 17 2 Inz D CUPHTO E DS Inz The program compiles just fine however; when I get to the point of populating the array, I get a data-decimal error. /Free Year(TY).Location(Unit) = *Zeros; Year(LY).Location(Unit) = *Zeros; For Period.Period = RangeBeg.Period To RangeEnd.Period; If Period.Mnth > 12; Period.Mnth = 1; Period.Year += 1; EndIf; HTOUNT = %SubSt(%EditC(Location:'X'):3:4) + ' '; Chain (Company:HTOUNT:Period.Period) CULHTO; If not %Found(CULHTO); Reset CUPHTO; EndIf; Year(TY).Location(Unit).Terms += HTOTOT; // Errors Here ... /End-Free When it gets to this point, I get the error. Trying to Add HTOTOT to blanks. Can you see what I'm missing? I thought on the very first line, I set everything to *Zeros. NOTE: that I also tried changing that to *ALL'0'
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.