We are aware of eliminating the duplicate records from
outyput fiel using sort utility. Can we get the duplicate
records in to another file in the Same sort utility?

Answers were Sorted based on User's Feedback



We are aware of eliminating the duplicate records from outyput fiel using sort utility. Can we get..

Answer / sathya

we can get the duplicate records alone in the dataset using
sort utility.

//SORTTA EXEC
PGM=SORT
//SYSIN DD *
SORT FIELDS=(29,9,CH,A)
SUM FIELDS=NONE,XSUM
/*

//SORTIN DD DSN=…,DISP=SHR
//SORTOUT DD DSN=…
//SORTXSUM DD DSN=…
//SYSOUT DD
SYSOUT=*
//
The XSUM control statement is used to create
The output file with the duplicate records alone.

Is This Answer Correct ?    4 Yes 0 No

We are aware of eliminating the duplicate records from outyput fiel using sort utility. Can we get..

Answer / rajoo

Yes. Please check the sample job step below:

//STEP025 EXEC
PGM=SORT
00000450
//SORTIN DD
DISP=SHR,
00000460
//
DSN=PFC2.CP000000.GLOB.FFB.C22300D6.G0003V00
00000470
//SORTOUT DD DCB=
(BLKSIZE=0,DSORG=PS,LRECL=16,RECFM=FB),
00000480
// DISP=
(NEW,CATLG, 00000490
//
DELETE),
00000500
//
DSN=DFC2.VENP33Z.GLOB.FFB.C22300D6.SORTED2,
00000510
// SPACE=(CYL,
(100, 00000520
//
100),RLSE),
00000530
//
UNIT=SYSDA
00000540
//SORTXSUM DD DCB=
(BLKSIZE=0,DSORG=PS,LRECL=410,RECFM=FB), 00000480
// DISP=
(NEW,CATLG, 00000490
//
DELETE),
00000500
//
DSN=DFC2.VENP33Z.GLOB.FFB.C22300D6.XSUM,
00000510
// SPACE=(CYL,
(100, 00000520
//
100),RLSE),
00000530
//
UNIT=SYSDA
00000540
//SYSIN DD
*
00000550
SORT FIELDS=
(1,14,CH,A)
00000560
SUM
FIELDS=NONE,XSUM
00000570
/*
00000590
//SYSOUT DD SYSOUT=*

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More JCL Interview Questions

//S10 EXEC PGM=ICETOOL //TOOLMSG DD SYSOUT=* //DFSMSG DD SYSOUT=* //CON DD DSN=VAR.INPUT1,DISP=SHR // DD DSN=VAR.INPUT2,DISP=SHR //OUT DD DSN=VAR.OUTPUT,DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(5,5)),UNIT=SYSDA //TOOLIN DD * * Splice the needed data from the two VB files together SPLICE FROM(CON) TO(OUT) ON(5,5,CH) WITHALL - WITH(12,5) WITH(22,20) VLENMAX /*

0 Answers  


What is the use of symbol // in jcl?

0 Answers  


I had 100 steps in jcl i want to execute first 10 steps only?

6 Answers   IBM,


What does IEBGENER do?

10 Answers   BirlaSoft,


what happens if job falls in loop ? how to resolve it ?

3 Answers   Patni,






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?

6 Answers   IBM,


shall we concordinate two different length dataset in to a new date set.

6 Answers  


If I defined space as TRK(10,10) for the one file and lrecl = 4K then tell me how many record will vsam file will contain. will it 1,2,3,4,5 or how many,

3 Answers   IBM,


can we copy a file from fixed block to variable block and vice versa ....asap

1 Answers  


While using SORT FILES =NONE,XSUM I am getting error "ICE172A E XSUM IS NOT SUPPORTED - USE ICETOOL SELECT IF APPROPRIATE"..I want to write duplicate records a a serparte file..how i can do tht?

3 Answers   Steria,


How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length ----TRY

0 Answers  


How are datasets concatenated?

3 Answers   CitiGroup,


Categories