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 |
We can use PASS with permanent datasets also. THEN Which is the condition in which we may use PASS (instead of KEEP) with permanent data sets, while there is no need to specify UNIT and VOL for them like temporary data sets (in cas we use KEEP for permanent data sets) ?
What is GDG and what is the maximum limit of versions that can be created?
How to exclude the duplicate records from two concateded flat files (records from both files must be removed)?
In my job I have 6 steps. Step01,02,03...step06. after executing step02 i want to skip step03 and want to execute step04. and once step04 is done then I want to go back and execute step03. once step03 is completed I want execute step05, 06 and so on... can any one tell me how do i do that???
How can a stopped job be started again?
List the different jcl statements that are not permitted in the procedures?
In order to continue a job after a return code of 12 in step1, what the step2 exec statement include?
how can a gdg base be created in a jcl. What is the difference between empty and scratch parameter while defining/altering gdg base?
what r the types of job control statements?
write a jcl to execute a job by 7:00 am on jan 20,1986?
How do you check the syntax of a JCL without running it?
What are some jcl statements that are not allowed in procedures?