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

What is the use of DSNDB07 ?

1 Answers  


wht do u mean by internal reader in jcl ? wht is the use of internal reader ?

1 Answers   Syntel,


what are the symbolic parameters? why do we use symbolic parameters ?

2 Answers   IBM, TCS, UST, Xansa,


One of My Job is running in production, which contains five steps?i want to pass the input to FIFTH step while running is it possible? if how?

1 Answers   CTS,


WHAT WILL HAPPEN TO A FILE IF DISP=(MOD,DELETE,DELETE)

8 Answers   ADP,






The maximum number of in-stream procedure you can code in any JCL is ?

5 Answers  


what is XSUM in some fields= none, xsum ??

7 Answers   Xansa,


what JCL Procedures?

0 Answers  


Hi, Say I have 10 flat files and I want to copy all these 10 flat files to a GDG versions flat files (I have GDG base: FDWS01.TEST.RESTORE) in one shot. Can we do that in one shot using a JCL. May be by using IEBGENER. It's a bit urgent. So anyone's fast rely would be appreciated.. Thanks in advance.. 10 flat files ----------------------------------- FDWS01.SUB.RESTORE1 FDWS01.SUB.RESTORE2 FDWS01.SUB.RESTORE3 ; ; FDWS01.SUB.RESTORE10 TO GDG versions ----------------------- FDWS01.TEST.RESTORE.G0001V00 FDWS01.TEST.RESTORE.G0002V00 FDWS01.TEST.RESTORE.G0003V00 ; ; FDWS01.TEST.RESTORE.G0010V00

4 Answers  


When space is allocated for an output dataset, what units can be used?

0 Answers  


Explain concatenating datasets?

2 Answers   CTS,


Explain how can values be passed from the job stream to an executable program?

0 Answers  


Categories