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?
Answer Posted / 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 View All Answers
Is their any limit for data sets?
How does the jcl specify the job to os?
State the uses of syspring, sysin, sort fields, sum fields and dummy.
What is the purpose of dd?
what is the compile process of cobol program expalin with code
What are the 4 fields in dd statement?
What is the purpose of dd dummy statement?
I had Records in file Like this Company Code IBM 2 IBM 1 IBM 4 WIPRO 3 WIPRO 2 WIPRO 9 TCS 4 TCS 6 TCS 3 i want the record of every company with highest code How can i do that?
What is the significance of addrspc parameter in the exec statement?
If a (+1) generation dataset is created in the first step of a job, how can it be referenced in later steps of the same job for input?
in order to execute step2 a job after a return code of 8 in step1, what condition you will code in step2?
What are the difference between jcl and jes?
What is the use of disp parameter?
is there any way to execute more than one proc in the same exec statement at the same time..?
How to run cobol program using jcl?