I have files that contains both duplicates files(occur more
than twice) and non-duplicate files.The file is already
sorted by a key.I want to determine those records that are
duplicate and will be move to a duplicate file and non-
duplicate files to be move to a valid file.thank you.help
please

Answers were Sorted based on User's Feedback



I have files that contains both duplicates files(occur more than twice) and non-duplicate files.Th..

Answer / tamilselvan

Instead of cobol, try this with SORT in JCl.it will be
easier.
SORT FIELDS=copy
SUM FIELDS=NONE,XSUM


define a file with DD card SORTXSUM after SORTWK file in
the proc step.
You can capture the duplicate rows in the sortxsum file and
non dupliucates in the SORTOUT file.

Is This Answer Correct ?    7 Yes 1 No

I have files that contains both duplicates files(occur more than twice) and non-duplicate files.Th..

Answer / sowjanya

using jcl,
//ddname1 <- input file
//ddname2 <- outfile1(no duplicates)
//xsum <- outfile2 (duplicate)
//sysin dd *
sort fields=copy
sumfields =none,xsum
/*

Is This Answer Correct ?    4 Yes 1 No

Post New Answer

More COBOL Interview Questions

What is redefines clause in COBOL?

0 Answers   B-Ways TecnoSoft,


What is report-item?

1 Answers   IBM,


What is an index for tables?

2 Answers  


. How do we cast a variable in COBOL

1 Answers   HSBC,


what is linkcard in cobol?

1 Answers   TCS,






Write a program to concert an Indexed file into Sequential file?

1 Answers   Covansys,


can internal sort be applied to sort ksds files?

1 Answers  


01 text-data pic x(100). move 'xyzdbfrjjg u' to text-data. how to find the value of last index of text-data?

3 Answers   Mind Tree,


i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this

0 Answers  


how can we find total no of records in a file ....is there any utility......?

3 Answers   IBM,


consider the following two IF statements: IF X AND NOT Y MOVE A TO B IF Z=1 OR 9 MOVE A TO B select one of the following data divusion entries which gives identical results for both the above IF statements a.01 Z PIC 9 88 X VALUE 1.9 88 Y VALUE 0.2 THRU 8 b.01 Z PIC 9 88 X VALUE 0.2 THRU 8 Y VALUE 1.9 c.01 Z PIC 9 88 X VALUE 1.9 88 NOT-Y VALUE 0.2 THRU 1.9 d.none of yhe above

3 Answers   TCS,


what is the maximum error code in mainframe

2 Answers  


Categories