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

We can use PASS with permanent datasets also. THEN Which is the condition in which we may use PASS (instead of KEEP) with permanent data sets, while there is no need to specify UNIT and VOL for them like temporary data sets (in cas we use KEEP for permanent data sets) ?

1770


Explain how can an in-stream dataset be terminated?

703


write a jcl to execute a job by 7:00 am on jan 20,1986?

699


Is condition checking possible in jcl?

722


How can a fb file convert to vb file using sort program?

807






Explain the hierarchy levels in jcl?

1120


What are hierarchy levels in jcl?

958


what is the JCL statement consists of?

699


by using cond parameter maximum 8 cond can be coded in single cond means ?explain

978


Name the statement which can be used to send data to another mvs jes3 node?

605


How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length ----TRY

861


Explain how can the attributes of one sms dataset be copied to another dataset?

706


a set statement is used to define commonly used symbolic across job steps or procedures. It initializes the previous values in the symbolic names. It has to be defined before the first use of the symbolic names in the jcl. State whether true or false?

620


I HAVE A VB BLOCK WHICH IS USED AS INPUT IN COBOL CONATINING SOME RECORDS CAN I CHANGE THE FILE FROM VB TO FB?

2108


What is 'mounting' of volumes ? Is there anything that a programmer can do in it ? How to find currently mounted volume ?

1999