How to find the number of duplicates in a file using Sort?
Answer Posted / abhijit saha
Hope this JCL explains your query
//COUNTDUP JOB ,'COUNT DUPLICT',
// MSGCLASS=Q,CLASS=D,
// NOTIFY=&SYSUID
//STEP010 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=ABCXYZ.UTIL.TEST,DISP=SHR
//RPT DD SYSOUT=*
//TOOLIN DD *
OCCUR FROM(IN) LIST(RPT) NOHEADER BLANK -
ON(1,2,CH) ON(VALCNT,U04)
/*
INPUT: ABCXYZ.UTIL.TEST
AB
AB
AB
DC
DC
PQ
PQ
Output:
AB 3
DC 2
PQ 2
| Is This Answer Correct ? | 17 Yes | 10 No |
Post New Answer View All Answers
//S10 EXEC PGM=ICETOOL //TOOLMSG DD SYSOUT=* //DFSMSG DD SYSOUT=* //CON DD DSN=VAR.INPUT1,DISP=SHR // DD DSN=VAR.INPUT2,DISP=SHR //OUT DD DSN=VAR.OUTPUT,DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(5,5)),UNIT=SYSDA //TOOLIN DD * * Splice the needed data from the two VB files together SPLICE FROM(CON) TO(OUT) ON(5,5,CH) WITHALL - WITH(12,5) WITH(22,20) VLENMAX /*
What is the use of symbol // in jcl?
How to execute 2nd and 4th steps among 5 steps in jcl proc?
List the different jcl statements that are not permitted in the procedures?
What are the 4 fields in dd statement?
what happens when COND is coded in JOB statement and when COND is coded inside EXEC statement?
whats the diff bw the evaluate also and and?
what is the JCL statement consists of?
List the various advantages of using jcl language?
what JCL Procedures?
what operation is performed by job statement?
how to compare two datasets without using superce because output is limited to 133 bytes
What is multithreading in jcl?
Are there any set of rules for the names of the steps used in a job?
what are JCLLIB and STEPLIB in JCL?