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 |
I have multiple jobs ( JCLs with several JOB cards ) in a member. What happens if I submit it?
Which storage devices are grouped under DASD and SYSDA ?
How system will identify whether user wants to create PS or PDS? If answer is SPACE parameter then why we need to pass ps or po as dataset organisation while creation
What is the function of the dd dcb keyword?
can we copy a file from fixed block to variable block and vice versa ....asap
wht r s722,s822,s122 and s222 abends pls reply fast
Wrete a JCL to compare two files and mached records move to onc file & un mached rows wants to another file?
13 Answers CGI, DSRC, IBM,
What do you do if you do not want to keep all the space allocated to a dataset?
when GDG version number get changed ? bcz always Generations only increasing.
which utility is used to sort a file in jcl?
There is a procedure in A.B.PROCS(PROC1) (member name is PROC1) //PROCA... There is a call to a procedure PROCA from a JOB. //STEP01 EXEC PROCA ... Here "PROCA" in JOB refers to the actual PROC name or the member name of the PDS where this PROCA is stored.
How to find the length of variable length copybook using fileaid ??