If we want to see the eliminated duplicate record thru
SORT, how its output file will be managed

Answers were Sorted based on User's Feedback



If we want to see the eliminated duplicate record thru SORT, how its output file will be managed..

Answer / mahaveer

//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
/*

We can see the eliminated duplicate records in sortxsum

Is This Answer Correct ?    16 Yes 1 No

If we want to see the eliminated duplicate record thru SORT, how its output file will be managed..

Answer / chandrakant sinha

To remove duplicates we need to give :

SUM FIELDS = NONE

in SYSIN DD *

Is This Answer Correct ?    14 Yes 0 No

If we want to see the eliminated duplicate record thru SORT, how its output file will be managed..

Answer / atreyee

//STEP1 EXEC PGM=SYNCSORT
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR
//SORTIN DD DSN=SORT.IN,DISP=SHR
//SORTOUT DD DSN=SORT.OUT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=DISK,SPACE=(CYL,(1,10),RLSE),
//
// DCB=(*.SORTIN)
//SORTXSUM DD DSN=SORT.OUT.DUPLICATE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=DISK,
// SPACE=(CYL,(1,10),RLSE),
// DCB=(*.SORTIN)
//SYSIN DD *
//SYSOUT DD SYSOUT=*
SORT FIELDS=(1,5,CH,A)
SUM FIELDS=NONE,XSUM
//SYSPRINT DD SYSOUT=*

Is This Answer Correct ?    5 Yes 0 No

If we want to see the eliminated duplicate record thru SORT, how its output file will be managed..

Answer / subramanyam reddy

//sysin dd *
sortfields=(1,3,ch,a)
sumfields=none,xsum
/*
//
where 1 is starting postion
3 is length
'ch' means charactor
'a' assending

Is This Answer Correct ?    2 Yes 0 No

If we want to see the eliminated duplicate record thru SORT, how its output file will be managed..

Answer / devendra acharya

for eliminating duplicate record thru sort
we use
SORT FIELDS = SUM
in SYSIN DD*.

Is This Answer Correct ?    3 Yes 5 No

If we want to see the eliminated duplicate record thru SORT, how its output file will be managed..

Answer / devendra acharya

it can be happen by using
SORT FIELDS=COPY

Is This Answer Correct ?    2 Yes 11 No

Post New Answer

More JCL Interview Questions

I am getting the file from Unix to Mainframes for every 15 minutes. The mainframe job get abended with bad records coming from unix. I recovered that by deleting the bad data. I need permenant solution how to fix the issue? The record is getting characters in in first 9 positions which it should not. Please provide me the solution how to skip the records if it finds the charcters in the first 9 positions. K

3 Answers  


is there any way to execute more than one proc in the same exec statement at the same time..?

0 Answers  


i have a jcl calling proc which has 10 steps, i want to execute from step5 to step10, where can i code RESTART and COND parameter?

4 Answers   IBM,


List the different jcl statements that are not permitted in the procedures?

0 Answers  


Max. No of DD statements in a job ?

4 Answers   CSI,






can anyone explain me about sort in jcl with inrec and outrec ?

2 Answers   HCL,


a input file contains 1000 records, how to move the first 500 record into one out put file and how to move to second 500 records to anothere output file

6 Answers   ITC Infotech,


Is CPU time assigned to a JOB and JOBSTEP BOTH, by default ?

4 Answers   IBM,


What are the 4 fields in dd statement?

0 Answers  


What is GDG and what is the maximum limit of versions that can be created?

9 Answers   Convergys,


how you can access an uncataloged dataset in a JCL?

0 Answers  


how to split a file

4 Answers   IBM,


Categories