i have a file which contains duplicates ? my requirement is to
eliminate duplicates and these elminated duplicates should be
moved to another file can any code this using sort ?
Answers were Sorted based on User's Feedback
Answer / prabudha jain
//SORTXSUM DD DSN=datasetname,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(CYL,(1,4),RLSE),
// DCB=(RECFM=FBM,LERCL=80,BLKSIZE=800)
.
.
//SYSIN DD *
SORT FIELDS=(1,3,CH,A)
SUM FIELDS=NONE,XSUM
/*
1. SORT FIELDS=(1,3,CH,A) - Input file will be sorted
depending upon the key specified above 1,3,CH,A.
2. SUM FIELDS=NONE,XSUM - NONE means it will eliminate
duplicates.XSUM option will copy all records eliminated in
sort process will copy to another dataset defined in
SORTXSUM stelp
| Is This Answer Correct ? | 12 Yes | 1 No |
But which duplicate record will be found in SORTXSUM.
Will it have last duplicate record or first duplicate
record.
e,g 123acvvbbnm
123bbbbbbbb
123rkrjrjjr
which record will be found in sortxsum
| Is This Answer Correct ? | 0 Yes | 0 No |
how can you check if a file is empty using jcl?
Hi, can we call catalog( say myproc } proc n times in jcl if so how please explain Thanks in advance
How to read records in reverse order in flat file?
Which is the most widely used batch performance monitor for DB2?
What is the use of IEBGENER ?
In your JCL, run the even numbered steps if date is even and run odd numbered steps if date is odd . Where do you generate the date ??in cobol or JCL ??
which parameter is used to check the syntax of a jcl without executing it?
How to alter the parameters for the existing gdg?
How many types we can give input to JCL
I have a COBOL program that ACCEPTs some input data. How do you code the JCL statement for this?
What is the function of //jcllib statement?
My JCL have five steps & I created new versions of GDG in first step through fourth step & fifth step I was refered Step one GDG version. My JCL got abend at 4th step and how I can restart my JCL Please let me know the answers. //STEP1 EXEC GDG1(+1) DISP=(NEW) //STEP2 EXEC GDG1(+2) DISP=(NEW) //STEP3 EXEC GDG1(+3) DISP=(NEW) //STEP4 EXEC GDG1(+4) DISP=(NEW) //STEP5 EXEC GDG1(+1) DISP=(OLD)
11 Answers HCL, IBM, L&T, TCS,