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 ?

Answers were Sorted based on User's Feedback



i have a file which contains duplicates ? my requirement is to eliminate duplicates and these elmin..

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

i have a file which contains duplicates ? my requirement is to eliminate duplicates and these elmin..

Answer / vinay sonar

Please refer mainframe refresher by MUTTU

Is This Answer Correct ?    1 Yes 0 No

i have a file which contains duplicates ? my requirement is to eliminate duplicates and these elmin..

Answer / snehatechm

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

Post New Answer

More JCL Interview Questions

Immediate Job opening for mainframe professionals in Keane Bangalore. Please find the below details: Organization: Keane India Location: Bangalore Skill: COBOL, JCL,VSAM,DB2,CICS,IMS,REXX,CLIST Exp: 1 to 4 years only Employment Type: Permenant Employee Note: If you have attended keane interview in past 6 months please ignore this job opening. Please respond to email id keanemfjob@gmail.com OR keanemfjob@yahoo.in with your latest resume and following details, We will contact you within 24 hours: Total IT Exp: Exp in Mainframe: Current CTC: Expected CTC: Notice Period:

0 Answers   Keane India Ltd,


What is the difference between Sysin,Sysout,Sysdbout and Sysudump?

3 Answers  


What are the default system and catalog libraries in JCL?

2 Answers   Infosys,


My JCL contains four steps //STP1 A(+1), DISP = NEW //STP2 A(+2), DISP = NEW //STP3 A(+3), DISP = NEW //STP4 A(+1), DISP = OLD STP3 was abended and I want restart my JCL from STP3 onwards & what are the precaution I want to take & what are the changes I need to make. Pls let me know.

4 Answers   CTS,


i have 1000 records in input file and i want to sort it and the first 200 records to be placed in output file. how to do that??

14 Answers   L&T,


oza017.myorg.emp has 100 records ,oza018.myorg.staff has 200 records but 50 are the common records in both files copy all the common records into oza017.myorg.xyz dataset

3 Answers   Cognizant,


What dd statement is used to supply the name of a dataset?

0 Answers  


I HAVE A VB BLOCK WHICH IS USED AS INPUT IN COBOL CONATINING SOME RECORDS CAN I CHANGE THE FILE FROM VB TO FB?

0 Answers  


What is notcat 2 - gs?

0 Answers  


A maximum of 100 chars can be passed to Cobol through Parm in JCL, If we want to pass more than 100 Chars how we can do it ?

4 Answers   IBM,


Are all (i), (ii), (iii), (iv) of the below are VALID to reference a temporary dataset ? STEP2 DD1 DD DSN = &&TEMP STEP3 DD2 DD (i) DSN = TEMP (ii) DSN = *.TEMP (iii) DSN = *.STEP1.DD1 (iv) DSN = *.STEP1.DD1.ONE

8 Answers   IBM,


Hi, I have a requirement File A : I have 6 records out of which 4 are same. File B: I have 8 records out of 6 records are same. The 4 records in FILEA and 6 records in FILE B are same. If we substract we will get two records, I need these two records in output file This is because to remove the duplicates from the database. Through easytrieve we can compare but for that there should not duplicates, but in my file I have duplicates. Thanks in advance!!

2 Answers  


Categories