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 |
A maximum of 100 chars can be passed to Cobol through Parm in JCL, If we want to pass more than 100 Chars how we can do it ?
There are 5 steps in a Job. How to bypass the first step by making use of only COND Parameter and not using any Restart and IF/THEN/ELSE parameter?
if we want to use a gdg which is already created by some job, then how to use the reference of the last generation in a jcl?
What is the purpose of dd * statement in jcl?
in order to execute step2 a job after a return code of 8 in step1, what condition you will code in step2?
i want to restart frm step 2, previously i coded cond parameter on step2 wht happens at tht time ?
how do you create a dataset in a jcl with the same file organisation as that of another existing dataset?
Is there a way to check for an empty file in JCL other than using IEBCOMPR and the command PRINT COUNT(1)?
What is the function of //jcllib statement?
What is DISP= (NEW,PASS,DELETE)?
How different is the JCL executing a COBOL program? 1) if the program is using VB file as input. 2) if the program is using FB file as input.
suppose i have 10 job steps and i want to execute only step 6.How to write?