i have n records in one file and in this file there is some
fields and i want to count that how many sharma in my file
so plz give the coding that how we read sharma ?
Answer Posted / mr. cooooool
HI...........
PLZZZZZZ USE DIS LOGIC.
PROCEDURE DIVISION.
OPEN INPUT FILE1.
PERFORM READ-PARA UNTIL EOF = 'D'.
DISPLAY COUNT.
CLOSE FILE1.
STOP RUN.
READ-PARA.
READ FILE1
AT END
MOVE 'D' TO EOF
NOT AT END
PERFORM INSPECT-PARA
END-READ.
INSPECT-PARA.
INSPECT NAME TALLYING COUNT FOR ALL 'SHARMA'.
COUNT IS A WORKING-STORAGE VARIABLE WHICH WILL COUNT THE
OCCURENCE OF 'SHARMA'.
THANKS
REGARDS
RAVINDRA BISHT
| Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
What is inspect in cobol ?
What are declaratives and what are their uses in cobol?
How many sections are there in data division in COBOL?
Why occurs cannot be used in 01 level in COBOL?
What are the different rules to perform a Search?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
What is the difference between comp and comp-3?
What do you understand by psb and acb?
Define cobol?
What is rmode(any) ?
Differentiate between structured cobol programming and object-oriented cobol programming.
What is a scope terminator give example?
What is rmode(24)
how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)