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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

I have mainpgm(abc) this is the only cobol pgm(non-db2).And this pgm calling subpgm name "acd" this also only cobol(non- Db)and this pgm calling some other subpgm this pgm has cobol-db2 pgm. 1) IF you calling static mode how to run and how to compile? 2) IF you calling dynamic mode how to run and how to compile? plz suggestion me.

1947


what happens when COND is coded in JOB statement and when COND is coded inside EXEC statement?

771


what is use of space parameter in dd statement?

750


why should SYSIN DD * statement should not be included inside a PROCedure snippet??? please answer this.. i need to know.

1943


WORKING-STORAGE SECTION. 01 GROSS-PAY. 05 BASIC-PAY PIC 9(5). 05 ALLOWENCES PIC 9(3). PROCEDURE DIVISION. MOVE 1000 TO BASIC-PAY. MOVE 250 TO ALLOWENCES. DISPLAY GROSS-PAY. STOP RUN. 77 W-A PIC 9(3)V99 VALUE 23.75 77 W-B PIC ZZ9V99 VLAUE 123.45 after the statement MOVE W-A TO W-B what will be W-B's value? a.123.75 b.b23.75 (where b indicates space) c.023.75 d.invalid move

852






I want my job (careerride) to be executed in 1 minute and 2 seconds. How do I do that?

705


What is the purpose of dd?

724


In job processing, what happens in conversion stage?

734


What are s0c1, s0c4, s0c5, s0c7 and socb?

697


Explain about ISPF/TSO Commands

1308


i want to store 20 digits . how will u do it in cobol ?

858


Can we use DISP=SHR in output file in JCL

951


How to pass the parameter in parm using linkage section ? (syntax)?

645


Explain in DD statement what is the use of DCB parameter?

652


Must tape dataset definitions include vol=ser specifications?

971