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
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
A dd statement consists of 4 fields. Name them?
Is automatic restart possible in jcl? If yes, how?
How jcl work to handle various input output file operations?
What are some jcl statements that are not allowed in procedures?
define cond parameter in jcl?
what is the JCL statement consists of?
what EXEC statement is and what is the syntax of EXEC statement used in JCL?
Describe the various parameters utilized in the creation of a gdg?
What is the difference between the positional and keyword parameters? Give examples.
Can I send output of job to my remote device careerride123?
What is the maximum length of a single line of jcl?
How can a stopped job be started again?
why should SYSIN DD * statement should not be included inside a PROCedure snippet??? please answer this.. i need to know.
Name what parameter directs the output of the job log dataset?