View previous topic :: View next topic
|
Author |
Message |
valisetty vijaya
New User
Joined: 18 Apr 2008 Posts: 1 Location: chennai
|
|
|
|
How to handle duplicate record in VSAM KSDS while accessing the file Dynamically.
Iam using the below code, but some how iam getting the duplicate records.
IF BCTEMP-FILE-STATUS EQUAL TO 0 AND
BCTEMP-REC-KEY EQUAL TO W-TEMP-ACCT-REC
CONTINUE
ELSE
DISPLAY 'TEMP-FILE-STATUS:' BCTEMP-FILE-STATUS
MOVE W-TEMP-ACCT-REC TO BCTEMP-RECORD
WRITE BCTEMP-RECORD
SET S-ACCT-GENERATED-Y TO TRUE
END-IF |
|
Back to top |
|
|
Debabrata Pruseth
New User
Joined: 11 Dec 2008 Posts: 59 Location: Pune , India
|
|
|
|
Well i doubt VSAM KSDS will have duplicate key and duplicate record . Unless it has a Alternate Key ( With alternate index defined with parameter NONUNIQUEKEY ) and you are referring this alternate key. A simple suggestion will be to have the output file in a FFB and then remove the duplicate records ( having duplicate key ) with SORT and then REPRO to a VSAM file . A similar thing can be done in the Input file also otherwise. That however depends upon your requirement. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Please show the error messages that state a duplicate record is present |
|
Back to top |
|
|
|