|
May or may not need work variables. Depends on what the fields <Somekey> is.
I don't think you would be using the fields from the data base for the Somekey
fields. You would be using some other variables like this.
Setll (In_ORDN:In_SUFF:In_INVN) OPMCHGR1;
Dou 0 = 1;
Read OPMCHGR1;
If %EOF(OPMCHGR1) or
In_ORDN <> CHORDN or
In_SUFF <> CHSUFF or
In_INVN <> CHINVN;
Leave;
EndIf;
If CHCHGC = 'MR' or CHCHGC = 'PR';
ReturnVal = ReturnVal + CHamt;
EndIf;
EndDo;
Free format just makes everything easier and you don't need to create key
variables.
-----Original Message-----
From: Paul Morgan [mailto:pmorgan@xxxxxxxxxxxxxx]
Sent: Tuesday, March 29, 2005 3:35 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Chain doesn't set %EOF
Sudha,
Nah. It only reads a block of records. The difference is the key
comparison for ending the group is done in the program ( SomeKey <>
KeyField ) after the read rather than as part of the ReadE ( SomeKey )
opcode. This logic requires work variables for all the key fields to be
compared against.
Paul
--
Paul Morgan
Senior Programmer Analyst - Retail
J. Jill Group
100 Birch Pond Drive, PO Box 2009
Tilton, NH 03276-2009
Phone: (603) 266-2117
Fax: (603) 266-2333
Sudha wrote
> I don't understand. This would read the entire file and could be a
> potential huge performance issue depending upon the size of the file.
> Thanks,
> Sudha
>
> Sudha Ramanujan
> SunGard Futures Systems
> sramanujan@xxxxxxxxxxxxxxxxxx
> (312) 577 6179
> (312) 577 6101 - Fax
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.