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 |
waht is inspect verb? where it can be in real time?
What are declaratives and what are their uses in cobol?
Explain how to differentiate call by context by comparing it to other calls?
when iam reading a flat file which has 100 records through cobol program when iam reading 50th records it gets abends .. so when i run the program again it should read from 50th record .where it got abened ? how it is possible
What is a SSRANGE and NOSSRANGE?
What is SSRANGE, NOSSRANGE ?
TYPES OF SORTINGS. which is more prefarable.
How to declare if emp-name = AAAAA""BBB in working-storage section. After display emp-name should print like AAAAA""BB
have in 100 records in a file i want to move only matched records to one output_file1 and nonmathed records are moved to another output_file2 ... any one can provide logic code
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
What is the usage of comp fields in cobol?
01 x pic s9(8) comp. How will the following value be internally allocated '18787'