How to find the number of duplicates in a file using Sort?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / prachi
In order to copy eliminated duplicates into another file
using sort is as below:
//SORTXSUM DD DSN=----
:
:
:
:
//SYSIN DD *
SORT FIELDS = copy
SUM FIELDS =NONE,XSUM
/*
//
| Is This Answer Correct ? | 7 Yes | 4 No |
Answer / divya reddy
we can sort it simply by using a command called" DF-sort"
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sudha
//
//
//
//sysin dd *
sort fields=(1,4,ch,a)
sum fields=none/all
/*
for avoiding duplicates
| Is This Answer Correct ? | 1 Yes | 2 No |
Explain about User Information
What is the differentiation between TRK,cyl, and Bytes... how they can be connected??
Explain the function of dd name parameter with a 2 part structure; audit.report?
Explain about LMFREE�free data set from its association with data ID
Name a few IBM utility programs, and explain its function.
IF WE GIVE COND on step3 then, What does the following mean ? And Just adding to that, All the below COND are VALID as per the specifications. (i) COND = (8,LT,step1,step2) ---(AND/OR ?) (ii) COND = (8,LT,step1,step2, ONLY), (iii) COND = (8,LT,step1,ONLY) will it execute only if this condition is true or only if step1 ABENDS ? (iv) COND = (8,LT,step1,step2,EVEN), (v) COND = (8,LT,step1,EVEN) ?
Hi, can any one tell about " How do u eliminate the duplicates "
Please explain with syntax and an example, the Inrec fields and Outrec build in sort.
In jcl i have 255 steps. In 255 step i declared proc. In proc i have 20 steps this job is executable or not? why?
what does mvs stand for?
What are steplib and joblib? What for they are used?
what is force complete