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

01 x pic s9(8) comp. How will the following value be internally allocated '18787'

4 Answers   Steria,


I want to remove a duplicates form a given input field using cobol program. please Any one help me out to solve this ... Thanks in Advance.

3 Answers   IBM,


How can we increase the size of an existing PDS to include more no. of modules. I tried the answer posted by Jagan(TSO PDS 'pds name') but did not find it working. The answer posted by kamal i know very well. Please suggest me a answer so that we don't need to delete the existing PDS and still we can change the size as well.

10 Answers  


What is redefines clause in COBOL?

0 Answers   B-Ways TecnoSoft,


suppose a cobol programme A calling programme B,C and D. If C undergoes some change what if A,B,C,D need to be recompiled or only C nee to be recompliled.

2 Answers   IBM,


What is the difference between Call and a Link?

0 Answers  


Without using move verb how to move one variable to another.

5 Answers  


is it possible to pass an SQL query inside a jcl which is inside a cobol program?

5 Answers   CTS,


When is a scope terminator mandatory?

3 Answers  


which generation language is cobol

4 Answers   Kanbay,


what is qualification on occurs clause?

2 Answers  


how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)

0 Answers   HSBC, Quest,


Categories