Posted: Sat Jun 24, 2006 3:44 am Post subject: removing duplicates in VB file
i am having the VB file 1000 lrecal in that I want to remove the duplicates from the file, i don't want to sort the file records should be in the same order
I have worked considering a FB File to remove duplicates as well to get back the records in original order only and i have done in two steps but i guess it can also be done in one step also.I will try out for VB File and come back with my results.
If you use the BUILD, FIELDS, or IFTHEN BUILD parameter, you must begin your INREC or OUTREC statement fields by specifying 1,4 (starting position is 1 and length is 4) to represent the RDW in your VB records.
For example: INREC FIELDS=(1,4,8,25)
If you want your first field to include input data bytes immediately after the RDW (that is, starting with position 5), you can use 1,n (starting position is 1 and length is n, with n greater than 4) instead of 1,4.
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
SHEKAR 1
KOLUSU 2
MERVYN 3
SHEKAR 4
COOLGUY 5
FRANK 6
BEEPBOP 7
KOLUSU 8
COOLGUY 9
SHEKAR 10
SHEKAR.TEST.OUT1
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+---
********************************* Top of Data ******************************************
BEEPBOP 7 00000007
COOLGUY 5 00000005
FRANK 6 00000006
KOLUSU 2 00000002
MERVYN 3 00000003
SHEKAR 1 00000001
SHEKAR.TEST.OUT2
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
SHEKAR 1
KOLUSU 2
MERVYN 3
COOLGUY 5
FRANK 6
BEEPBOP 7
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum