I have a File that has duplicate records. I need only those records that occur more than
thrice.?

Answer Posted / supreethi

Code:
//*******************************************************
//STEP001 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD *
AAAAAAAAA
VVVVVVVVV
GGGGGGGG
AAAAAAAAA
HHHHHHHHH
AAAAAAAAA
GGGGGGGG
VVVVVVVVV
/*
//TMP1 DD DSN=&&TEMP1,DISP=(MOD,PASS),SPACE=(TRK,(5,5)),UNIT=SYSDA
//OCCUR1 DD SYSOUT=*
//OCCUR2 DD SYSOUT=*
//OCCUR3 DD SYSOUT=*
//TOOLIN DD *
OCCUR FROM(IN1) LIST(OCCUR1) EQUAL(1)-
ON(1,9,CH) ON(VALCNT,N04)
OCCUR FROM(IN1) LIST(OCCUR2) EQUAL(2)-
ON(1,9,CH) ON(VALCNT,N04)
OCCUR FROM(IN1) LIST(OCCUR3) EQUAL(3)-
ON(1,9,CH) ON(VALCNT,N04)
/*


OCCUR1 contains:

Code:
---+----1----+----2----+
(1,9,CH) VALUE COUNT
HHHHHHHHH 1

OCCUR2 contains:

Code:
---+----1----+----2----+
(1,9,CH) VALUE COUNT
GGGGGGGG 2
VVVVVVVVV 2

OCCUR3 conatains:

Code:
---+----1----+----2----+
(1,9,CH) VALUE COUNT
AAAAAAAAA 3

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?

1948


how to convert the recors form vsam file to db2 table tru file aid

2750


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

1796


Why occurs cannot be used in 01 level in COBOL?

707


What is difference between static and dynamic call in cobol?

767






Name the divisions, which are available in a cobol program?

675


IF I mention stop run in CICS what happens?

1886


What is an in line perform? When would you use it? Anything else you wish to say about it.

639


What is the difference between binary search and sequential search?

634


how to access the file from prodution from changeman tool and to submit a file to production

6666


What is the problem of ordered sequential files access?

690


Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks

2324


What are the pertinent COBOL commands?

2617


When is inspect verb is used in cobol?

669


How to know whether the module is dynamical or statistical?

649