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
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 |
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 |
what is the JCL statement consists of?
Is it possible to left uncode disp? If yes, how?
There are two input sorting files and there is a need to create one sort out file which contains data of both input files. What is the sort card for this. Write a sample JCL for this using a control card?
wht r different types of sort fields in jcl ?
What does the keyword DCB mean and what are some of the keywords associated with it?
My requirement is : How to populate a empty PS/flat file with ONLY spaces in the first line. You should not use any input dataset to do this. I'm not sure whether you may use any utility for this purpose?
How to release the Output HELD by using HOLD = YES on DD statement ?
can anyone explain me about sort in jcl with inrec and outrec ?
Give the syntax of job specifying jcl statement.
I found in one of the jcl, gdg version being mentioned as : abc.def.ghi(-0) Can anyone tell me how referring the version as (-0) is different from referring it as (0)
what is JCLLIB and PROCLIB in jcl and their syntax
How to ALTER the name of a GDG ?