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 |
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:
What is the difference between Sysin,Sysout,Sysdbout and Sysudump?
What are the default system and catalog libraries in JCL?
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.
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??
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
What dd statement is used to supply the name of a dataset?
I HAVE A VB BLOCK WHICH IS USED AS INPUT IN COBOL CONATINING SOME RECORDS CAN I CHANGE THE FILE FROM VB TO FB?
What is notcat 2 - gs?
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 ?
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
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!!