Re: File keyed on a date field: the read doesn't actually get anything! What am I doing wrong?

"James H. H. Lampert via RPG400-L" <[email protected]>
Newsgroups gmane.comp.lang.as400.rpg
Message-ID <[email protected]>
On 1/7/26 2:47 PM, Brian Parkins wrote:
> To reaffirm Raul's advice, you could have tweaked your program slightly 
> to READ into a Data Structure as follows:
> . . .
>       D SLSMONTHSDS     DS                  LIKEREC(SLSMONTHR)
> . . .
>       C                   READ      SLSMONTHS     SLSMONTHSDS

> - then you would have been able to track all of the data in debug. Just 
> a thought for the future.

Actually, if Raul hadn't pointed out that scatter-gather doesn't fill 
fields that aren't referenced, I'd have done exactly what you suggested, 
since I knew scatter-gather wasn't working, and just didn't remember why.

Again, thank you to all who responded. It still took me an hour longer 
than expected to figure out how to best use the data from the lookup 
file for what the customer wanted, but at least I was no longer on the 
verge of screaming obscenities within earshot of the neighbors. And it 
turns out that my test program was useful in forcing the "border cases" 
under controlled conditions, to work out the logic.

--
JHHL
-- 
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: [email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact [email protected] for any subscription related questions.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.