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 are the rules employed while naming the steps in a job?
which parameter is used to check the syntax of a jcl without executing it?
How can the disposition of sysout datasets be set for an entire jobstream?
Explain the function of //cntl statement?
What is the function of job statement in jcl?
Explain the function of the steplib dd statement?
what is a jcl?
What is one line to pass PARM from JCL to COBOL?
Is condition checking possible in jcl? If yes, how?
have in 100 records in a file i want to read first 3 records and skip next 3 records and agan i want to read 3 records and again i want to skip 3 records... run a loop from record one to 10 evaluate i/3 if comes even then skip else write to output file
what is the resolution for sb37 error
Brief description of inline procedure of jcl.
What happens if both JOBLIB & STEPLIB is specified ?
what is the purpose of coding notify parameter in job statement?
What are the 2 types of parameters in dd statement?