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