× 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 believe the three buckets per month are in a non-normalized record with
all months in one record. That's 36.

Anyway your D-spec says based(prQty) but your setting ptQty. Undeclared
basing pointers are implicitly defined by the compiler -- no compile-time
error, just run time oddities result.

Stu


On Fri, Dec 3, 2010 at 17:28, Alan Campin <alan0307d@xxxxxxxxx> wrote:

How could it. You said you only had 3 fields per record, not 36. You are
just looking at other memory past the 3 fields in your records.

On Fri, Dec 3, 2010 at 3:23 PM, Gqcy <gmufasa01@xxxxxxxxx> wrote:

We have the following:
a file contains 54 buckets (packed 9,0) (one for each accounting week of
year)
to easily get these into an array I make:

an array: QtyArr s like(TAW01) Dim(54) Based(ptQty)
a pointer: ptQty s *

I read a record,
then I set the pointer to the first field in the record:

ptQty = %addr(TAW01) ;

I can work with QtyArr(x) fine...


however I tried to copy this logic to another program (different file),
instead of weekly buckets (packed 7,2) , I have 3 buckets per month...
and the array winds up with garbage...

array: QtyArr s like(VRJAN) dim(36) Based(prQty)
pointer: ptQty s *

read a record
then:
ptQty = %addr(VRJAN) ;

My array has garbage, which when I dump, in the later elements has the
names of different procedures in our binding directory, so either the
pointer is not correct, or the input record isn't all there???

Any Ideas to help debug this?

-gerald


--
This is the RPG programming on the IBM i / System i (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 / System i (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.