Re: READING 2 RECS before write to PRINT REC
- From: docdwarf@xxxxxxxxx ()
- Date: Mon, 21 Aug 2006 14:42:22 +0000 (UTC)
In article <1156169022.727565.158660@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
<jeff@xxxxxxxxxx> wrote:
Thanks DD. Here is how it is accomplished now. It reads a work file I
created and just prints the records, I will need to change the
structure on how to accomplish this. That is where I am stuck.
So... if you have a parameter indicating the number of years (n) then you
know you have to MOVE the current record's data to a save are and READ the
file again. If the 'key' data are not the same as the previous record's
then you process a new record; if they are the same then you can compute
the percentage change. Lather, rinse and repeat until the number of recs
with the same 'key' data = the number of years, then skip identical 'keys'
and start with the next one.
[end top post]
DD
0@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
<jeff@xxxxxxxxxx> wrote:
I have a program that I wrote that creates a work file to read from to
create a print record. The program is a sales report that allows the
user to specify how many years to compare. An example is 07-01-06 thru
07-31-06 If they answer 3 prior years it would show sales data (it also
handles exact day instead of just 070106, 071005, 070104)
20060701
20050702
20040703
20060702
20050703
20040704
When I read the Work file I need to read 2 recs before writing the
print record to calculate the percentage change in amount.
That's usually accomplished by coding two READ statements.
DD
.
- References:
- Prev by Date: Re: Conversion from MF Cobol to.....
- Next by Date: Re: Duplicate input files
- Previous by thread: Re: READING 2 RECS before write to PRINT REC
- Next by thread: Re: READING 2 RECS before write to PRINT REC
- Index(es):