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 |
What is MOD and when would you use it?
Can there be 2 job statements in a JCL? If yes what is the purpose of doing tha?
proc1,proc2,up to proc5 is there if i want to call proc1 and proc5how can u write the code
How to delete generations of gdg without deleting gdg base?
IN-STREAM DATA NOT ALLOWED IN PROC how can come out from this problem
What is 'mounting' of volumes ? Is there anything that a programmer can do in it ? How to find currently mounted volume ?
When should DISP=MOD is used?
in catalog procedure i have step1 dd dsn=filea dd dsn=fileb dd dsn=filec ur concatenaning all the files. but i need to override fileb with file 2 ? can anyone give the ans pls for ths
I have a dataset with record length 40 in production, due to some requirements it was changed to 80. Then how can we know the jobs which are effected by this change and how can we resolve it.
how to skip the steps in JCl
I have one GDG. Everyday One new version is being created.Now I want to split this created version in different files each having 1000 records. Here Problem is I don't know How many records will be there in new version of GDG? that's why I don't know How many Out files we need to use . Interesting??????????????
what is the Difference between SYSIN and PARM ?