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

What is a report item?

741


How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

3720


HOw can I get the negative sign while deduct high value from low value

1792


What is the difference between goback, stop run and exit program in cobol?

932


What is the default value(s) for an initialize and what keyword allows for an override of the default?

697






How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?

649


What is the use of intialize verb?

750


What are various search techniques in cobol? Explain.

650


How do you differentiate between cobol and cobol-ii?

658


Write a program that uses move corresponding.

673


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

676


Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

825


How can we find that module can be called – whether DYNAMICALLY or STATICALLY?

714


i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?

897


how do you define single dimensional array and multidimensional array in your cobol?

678