Hi All,
Please find the following:
MY Original KSDS file info:
Data Component Information:
Device type: 3390
Organization: KSDS EXT-ADDR COMP
KSDS key length: 23
KSDS key location: 0
Average record size: 73
Maximum record size: 73
Allocated Space: Unit Primary Secondary
Data: CYLINDERS 796 199
Index: TRACKS 67 17
Sort step used for copying the VSAM to flat file:
//STEP01 EXEC SORTD5
//SORTIN DD DSN=XXXXX.VSAM.MINDEX,
// DISP=SHR
//SORTOUT DD DSN=XXXX.FLAT.MINDEX.BKP,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(800,200),RLSE),
// DCB=(*.SORTIN)
//SYSIN DD *
SORT FIELDS=COPY
/*
Flat file properties:
General Data Current Allocation
Management class . . : MCTSTSTD Allocated cylinders : 2,320
Storage class . . . : SCBASE Allocated extents . : 9
Volume serial . . . : TSA009
Device type . . . . : 3390
Data class . . . . . : DCBASE
Organization . . . : PS Current Utilization
Record format . . . : FB Used cylinders . . : 2,320
Record length . . . : 73 Used extents . . . : 9
Block size . . . . : 27959
1st extent cylinders: 800
Secondary cylinders : 200 Dates
Data set name type : Creation date . . . : 2012/04/27
SMS Compressible. . : NO Referenced date . . : 2012/04/27
Expiration date . . : ***None***
I used the below sort card to get the count of the files:
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL NODETAIL,REMOVECC,
TRAILER1=(COUNT=(M10,LENGTH=15))
/*
I have the answer for the queries u have posted:
My VSAM file can have duplicates values for the column 1 to 15, but the original VSAM file with key length 23 doesnt have any duplicates cos the next coulmn values from 16 to 23 makes the record unique.
Since i defined the VSAM with 15 as the Key, when i tried to copy it with the flat file(unsorted) it failed.
So after sorting and by removing the duplicates(first column of lenght 15), the REPRO command worked as the duplicates were now removed.
I used the belwo JCL to get the dup count:
//STEP040 EXEC PGM=ICETOOL,REGION=128M
//INPUT DD DSN=XXXX.FLAT.MINDEX.BKP,DISP=SHR
//UNIQUE DD DSN=XXXXXX.MINDEX.UNIQUE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(500,200),RLSE),
// DCB=(*.INPUT)
//OUTPUT DD DSN=XXXXX.MINDEX.DUP,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(500,200),RLSE),
// DCB=(*.INPUT)
//TOOLIN DD *
SELECT FROM(INPUT) TO(OUTPUT) -
ON(01,15,CH) -
ALLDUPS DISCARD(UNIQUE)
//SYSOUT DD SYSOUT=*
//SSMSG DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
I have checked the record count of the dup file and it is 896, on making it half we get 448 which is the difference between the original file count and the sorted file count:
At last i had the result that i need , the duplicate records that are removed ...though are unique , they are not in my processing list of records