Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Is condition checking possible in jcl?

1220


What is the function of the dd avgrec keyword in sms datasets?

1351


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?

2302


what is a jcl?

1141


What is the purpose of the dd keylen parameter?

1231


Explain the function of a dd statement?

1219


Explain how can values be passed from the job stream to an executable program?

1241


how would you create a temporary dataset? And where will you use them?

1422


Name what parameter directs the output of the job log dataset?

1063


What is the purpose of dd?

1261


What is job control language?

1107


What do you understand by the term “keyword” with respect to jcl and what is the opposite of the term?

1151


which utility is used to sort a file in jcl?

1239


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.

2636


When space is allocated for an output dataset, what units can be used?

1277