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



We are aware of eliminating the duplicate records from outyput fiel using sort utility. Can we get..

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

We are aware of eliminating the duplicate records from outyput fiel using sort utility. Can we get..

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

Post New Answer

More JCL Interview Questions

How are GDGs concatenated?

1 Answers  


what is A-MODE and R-MODE?

2 Answers  


What is the purpose and meaning of the TIME keyword and what JCL statement is it associated with?

1 Answers  


Are all (i), (ii), (iii), (iv) of the below are VALID to reference a temporary dataset ? STEP2 DD1 DD DSN = &&TEMP STEP3 DD2 DD (i) DSN = TEMP (ii) DSN = *.TEMP (iii) DSN = *.STEP1.DD1 (iv) DSN = *.STEP1.DD1.ONE

8 Answers   IBM,


Mainframes gets a text file that contains the name of the file. Now using JCL i want to locate that file name in the mainframe system and perform further processing. Please tell how to proceed

0 Answers  






I need to compare two VSAm files. In input VSAM file some fields are updating and the updated feilds are coming into the output file. now i need to compare these two files with respect to a perticular field. Please suggest a suitable JCL code me.

2 Answers   Cognizant, Wipro,


Is there any command to check wether the ps file is in sorted order?

4 Answers  


Explain the function of //jcllib statement?

0 Answers  


can we write a proc with in a proc

4 Answers   IBM,


what is pupose and meaning of the REGION keyword and what jcl statement is it associated with?

1 Answers  


Is it possible to code instream data in a PROC?

0 Answers  


One dataset is creating in the step1 with LRECL of 133 and the same dataset is used in the next step in DISP=SHR mode, but while scanning the JCL the following error is thrwon. Please verify the below JCL $/SEPP030.PROVIDER DD DSN=Z1225BT.F5750PG9.F5910PRV.QC#A6868 //ERRORRPT DD DSN=F5910&ST&IN..F5910EPP.ERRORRPT.P&CYCDATE, --ERRORRPT DD DSN=F5910PG.F5910EPP.ERRORRPT.P, // DISP=&DISNCD,UNIT=&DELQ, -- DISP= (NEW,CATLG,DELETE),UNIT=DELQ, // SPACE=(TRK, (30,15),RLSE), // DCB=&DCB2 -- DCB= (PPG.METMODEL,BLKSIZE=0,LRECL=133,RECFM=FB) $/SEPP030.ERRORRPT DD DSN=Z1225BT.F5910EPP.ERRORRPT.AOUTPUT //SEPP040 EXEC PGM=FILEAID,COND= (0002,EQ,SEPP030) //SYSPRINT DD SYSOUT=* //SYSLIST DD SYSOUT=* //DD01 DD DSN=SYSCMN.PROD.CCLIB (F5910EP1),DISP=SHR $/SEPP040.DD01 DD DSN=Z1225BT.TEST.CCLIB (F5910EP1) E1 - DSS20791E - DATA SET 'Z1225BT.F5910EPP.ERRORRPT.AOUTPUT' HAS AN LRECL OF 133 COULD NOT BE OPENED BECAUSE THE CODED LRECL WAS 80. // DD DSN=F5910&ST&IN..F5910EPP.ERRORRPT.P&CYCDATE, -- DD DSN=F5910PG.F5910EPP.ERRORRPT.P, // DISP=SHR $/ DD DSN=Z1225BT.F5910EPP.ERRORRPT.AOUTPUT please find the error code in the above mentioned lines and please suggest me about the error and the solution for that.

3 Answers   Cognizant,


Categories