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 |
file status 00 is checked after opening the file or reading the file
how to resolve the file status 47.......
What is SSRANGE, NOSSRANGE ?
how we rectify soc4 and soc7 error in project(need real time answer)? please reply
a pic s9(4) comp b pic s9(4) comp-3 c ???????????????? d ???????????????? move a to c add a+B giving d. what is ur declaration for c,d?
HELLO FRIENDS, THIS IS JANARDHAN.GADIRAJU, I FACED ONE INTERESTING QUESTION IN COBOL, THAT IS WHAT ARE THE VALUES WE CAN SEE IN HIGHVALUES AND LOWVALUES, CAN U PLEASE GIVE ME THE ANSWER
What are the different rules for performing sort operation?
The order of precedence of arithmetic operators in an expression can be overridden with the use of (a) [] (b) () (c) {} (d) Any of the above
COMP field occupy ?
Determine the total no of bytes in the following. 01 rec1. 02 a pic x(6) 02 b redefines a. 03 c occus 6 times pic 9. 02 d occurs 6 times pic 9. 03 e pic x(5) 03 f pic 999.
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
what happens if parmparameter passes zero bytes to the program