|
<<SNIP>>
I am creating a duplicate of FileA in QTEMP and then with OPNQRYF I
select only those balances of current Month. Then override the file
to <ed: the copy of the file in> QTEMP with Share(*Yes).
Then I call an RPG program am reading FileA in a loop and using an
SQL am determining whether the date falls on Friday. If the SQL
returns value for Friday, then I will call a subroutine which will
increment the date by one and write a record (Using RPG WRITE
Opcode). Again the same for Sunday. At the end, using an SQL, am
calculating the average balance.
But unfortunately the Sat and Sun records are not written in order,
it writes at the end. Please see the attachment for reference. I am
wondering if the file is keyed, then why the WRITE opcode is writing
at the end and not inserting the record in the order?
I know the query appears is little big.. but am highly dependent on
your valuable inputs. Please help me if you are able to find where
am missing.
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.