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 |
if we have a job consist of two steps and each step calling a proc having 10 steps each then how many steps are counted only 2 or 22(10+10+1+1)? can we have more than 255 steps in a single job?
what if any ,is the syntax error in the following piece of code 01 B PIC A(7) 02 C PIC 9(4) ........ IF(B NUMERIC) ADD 10 TO C a.the condition in the if statement is wrong b.noting is wrong c.because C is initialised.ADD 10 TO C is wrong d.both B and C shoud have same size.
Given a input file with duplicates how to remove the duplicate records from the file using JCL?
6 Answers CDS, Convergys, TCS,
a jcl has 2 steps. How to code the jcl such that if step1 abends, then step2 runs. Else, job terminates with step1?
what is “Cond= even” and “Cond=only”?
At what stage, operator can change the class and priority of a submitted job?
what is the purpose of coding notify parameter in job statement?
what is d/f b/w sysout & sysprint
how many max steps can we use in a job? pls answer to my question
How can you execute a COBOL program via SYSIN in JCL?
What is the meaning of the following declaration : DCB=BLKSIZE=, What is the difference between above declaration & not specifying DCB at all for a output file?
can anyone explain me about sort in jcl with inrec and outrec ?