On Fri, Jan 20, 2012 at 9:56 AM, <rob@xxxxxxxxx> wrote:
There's some way to do this using the RRN keyword.
Perhaps this is very old-school and low-tech, but if you happen to be
able to determine the record number for the beginning of the data you
want to keep, you can copy out just those records by specifying the
starting record in CPYF. Then do deleting/renaming as necessary. (Or
rename the file first, then CPYF into the file you want to keep. I'm
sure you can figure it out.)
Of course, this is completely out the window if you had deleted
records and are reusing them, or if you otherwise wrote the file such
that the newest records are not necessarily at the end.
As for identifying the proper RRN: If you know how many records you
had in your original run, then of course just add 1 to that. If you
don't have that information handy, but you wrote the data out in such
a way that the repeated account numbers will appear in the same order
as they did in the original run, then you can simply fire up DSPPFM
and do a search for the first account number (the one in RRN 1). The
second time that account number appears, read off the RRN and use that
for the CPYF.
(If you are more comfortable using SQL or other query tool, and you
know that every account number in the original run was duplicated by
the second run, then you can probably write some query to tell you
exactly how many duplicated records you have. Which might be half the
number of your query result, depending on how you wrote the query.
The number of (pairs of) duplicates + 1 is the RRN to start copying.)
I know my explanation is kind of wordy, but it's actually much faster
to do it than to describe it, especially if you are comfortable with
DSPPFM.
John
As an Amazon Associate we earn from qualifying purchases.