write a program to eliminate duplicate records in a input file
and send them to output file.THIS IS IGATE RECENT
QUESTIONN.....JUST 1 WEEK BACKKKK...
Answers were Sorted based on User's Feedback
Answer / khasim
In Answer2 just i am editing one line to make 100% correct
SUM FIELDS=NONE,XSUM
then it will store duplicates into dataset.
Is This Answer Correct ? | 10 Yes | 0 No |
Answer / shan
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
/*
Is This Answer Correct ? | 11 Yes | 2 No |
Answer / kumarmf2004
Step1. Make sure that the input is sorted on the field
you are validating as duplicates (IN-FIELD in this
case)
Step2. In your program
IF IN-FIELD = HOLD-FIELD
CONTINUE
ELSE
WRITE OUTREC
MOVE IN-FIELD TO HOLD-FIELD
END-IF
READ IN-FILE
Keep performing Step 2 until end of file
Is This Answer Correct ? | 7 Yes | 3 No |
how to transfer the file from pc to mainframe??
In a program, variables are used but no DB2 involved in it. Can you call it as host variables??
A table has two indexes defined. Which one will be used by the SEARCH?
What is link edit in cobol?
what is the use of filler in cobol programing?
how to run sub programs using static and dynamic call ...
what is the difference between Plan & package?
I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue
Which mode is used to operate the sequential file?
What are the divisions in a cobol program?
which is better either static call or dynamic call? and why?
what are the working storage fields in BMS macro?