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 ?
Answer Posted / 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 |
Post New Answer View All Answers
Is condition checking possible in jcl?
What is the function of the dd avgrec keyword in sms datasets?
What is the job entry system used in your project? based on what criteria the sequence of jobs are picked if priority is not mentioned in the job card?
what is a jcl?
What is the purpose of the dd keylen parameter?
Explain the function of a dd statement?
Explain how can values be passed from the job stream to an executable program?
how would you create a temporary dataset? And where will you use them?
Name what parameter directs the output of the job log dataset?
What is the purpose of dd?
What is job control language?
What do you understand by the term “keyword” with respect to jcl and what is the opposite of the term?
which utility is used to sort a file in jcl?
I have mainpgm(abc) this is the only cobol pgm(non-db2).And this pgm calling subpgm name "acd" this also only cobol(non- Db)and this pgm calling some other subpgm this pgm has cobol-db2 pgm. 1) IF you calling static mode how to run and how to compile? 2) IF you calling dynamic mode how to run and how to compile? plz suggestion me.
When space is allocated for an output dataset, what units can be used?