write a program to eliminate duplicate records in a input file
and send them to output file.

Answers were Sorted based on User's Feedback



write a program to eliminate duplicate records in a input file and send them to output file...

Answer / naidu sekhar yandrapu

We can use JCL SORT utility using SYSIN DD * SUM fields =
none, will eliminate duplicate and store in a different dataset.


e.g
//SORTXSUM DD DSN=... Output eliminated by the SUM stm

//SYSIN DD *
SORT FIELDS=(1,3,CH,A)
SUM FIELDS=NONE , XSUM
/*

Is This Answer Correct ?    1 Yes 0 No

write a program to eliminate duplicate records in a input file and send them to output file...

Answer / ehatesham

//SORTXSUM DD DSN=datasetname,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(CYL,(1,4),RLSE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
.
.
//SYSIN DD *
SORT FIELDS=(1,3,CH,A)
SUM FIELDS=NONE,XSUM
/*

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL Interview Questions

How to convert bunch of words in a line to relvant ASCII values?

2 Answers  


What are the steps you go through while creating a COBOL program executable?

3 Answers  


How to delete the records of a dataset through cobol programme?We should not use jcl utilitities like IDCAMS.

2 Answers  


Can JUSTIFIED be used for all the data types?

3 Answers  


How can you submit a job from COBOL programs?

2 Answers   ITC Infotech,






input:- A 10 20 30 40 B 5 7 10 14 C 8 12 14 16.... output:- A = 100,B=36,C=50. Here spaces are considered between numbers. When we give input as above, the numbers should be added n displayed.So please help me out.

4 Answers  


In EBCDIC, how would the number 1234 be stored?

2 Answers   TCS,


What is the local-storage section?

0 Answers  


Will the variable POS in the following code have a value of 2 or not? 01 POS PIC S9(4) COMP VALUE 2. 01 FIRST-NAME PIC X(10) VALUE 'ABC'. 01 LAST-NAME PIC X(10) VALUE 'XYZ'. 01 NAME PIC X(20) VALUE SPACES. STRING FIRST-NAME DELIMITED BY SPACES ' ' DELIMITED BY SIZE LAST-NAME DELIMITED BY SPACES INTO NAME WITH POINTER POS

2 Answers  


What is the difference between PIC 9.99 and 9v99 in COBOL?

0 Answers   SwanSoft Technologies,


What are the access modes of START statement?

0 Answers  


What are the rules of the move verb?

0 Answers  


Categories