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 |
I have a variable account-number declared as comp-3, s9(10) comp-3 in a file. How do i find a particular account number say 123456 in that file?
I have one column say 'X' defined as VARCHAR Can anyone tell me What are the different ways to update this column thru COBOL-DB2 program?
What are the cobol coding sheets?
what is search and searchall?what is the diffrence between them?give an best example?
I have 2 dimensional array with having 100 elements. So how to find the 11th item in an array?
s9(18) comp-3:: What is the size of memory it takes internally?
study the following 01 A PIC 99V0 VALUE 5 01 B PIC 9V9 VALUE 6 01 C PIC 99V9 VALUE 2.5 01 D PIC 99 VALUE 3 COMPUTE A ROUNDED B C = A+B*C/D ON SIZE ERROR PERFORM PRINT-ERROR the comments of A.B.C after execution of the above statement are a.A=10 B=0 C=10 b.A=10 B=9.9 C=9.9 c.A=10 B=0 C=9.9 d.A=10 B=6 C=10
What are the various section in data division and briefly explain them.
i have mainprogram and subgram...if i compile mainprogram without stop run..what will u get in compilation time?
diffrence between z(2) and z9(2)
what is rediffine clause?in what situation it can use?give me real time example?
What are different file OPEN modes available in COBOL?