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
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 |
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 |
Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks
how many bytes does s9(7)COMP-3 field occupies?
What is Redefines clause?
s9(18) comp-3:: What is the size of memory it takes internally?
after udatingg first 110 rows, my job abends. now how do i change my cobol program so that when i restart the Job it will start updating from 111th row ( i.e in next run I di=ont want to update those 110 rows which are already been updated in the first run before job abend)
How To move a value to an array using move verb?
which is faster either static call or dynamic call ? and specify the reasons for it ? reply fast
In CICS/VSAM every file that is accessed should be defined in FCT. we have CICS READ, WRITE, BROWSE commands for VSAM files. How does it work with DB2 tables. It know it has to do with the plan. Please expain with examples.
What is the LINKAGE SECTION used in COBOL?
how do you reference the rrds file formats from cobol programs
what are the control characters used in reports
how can we get current dat and time thru cobol pgm