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
What is 'mounting' of volumes ? Is there anything that a programmer can do in it ? How to find currently mounted volume ?
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) ?
What is job control language?
I want to join to input files and write the matching fields on to an output file but i dont want the output file a sorted one
What is use of restart and how to use it?
Explain how can a stopped job be started again?
I HAVE A VB BLOCK WHICH IS USED AS INPUT IN COBOL CONATINING SOME RECORDS CAN I CHANGE THE FILE FROM VB TO FB?
how do you access an uncataloged dataset in a jcl?
What are hierarchy levels in jcl?
What is the purpose of dd * statement in jcl?
How do you create a temporary dataset?
List in order the hierarchical levels of jcl?
how to do automated restart when a job abends?
Can we use DISP=SHR in output file in JCL
What is one line to pass PARM from JCL to COBOL?