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
Explain dd statement in jcl?
Name the statement which can be used to send data to another mvs jes3 node?
what is a jcl?
can any one plzzzzzz tell the jcl code for creating ps using idcams
Why block size is multiple of lrecl in jcl?
What is catelog procedure and how many catelog procedure to use in one job?
I have 60 steps in the JCL and want to Execute Only First from PROC by overriding in JCL ?
I need exexution process for JCL programs
How does the jcl specify the job to os?
What is the difference between the positional and keyword parameters? Give examples.
Is it possible to code instream data in a PROC?
What is concatenating?
What do we mean by 'Virtual storage' for a dataset and for a JOBSTEP ? What is the significance of the following statement for a programmer 'Virtual storage results in program addresses being independent of the addresses that actually exist in a computer' ?
How to alter the parameters for the existing gdg?
what is the purpose of coding notify parameter in job statement?