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


Please Help Members By Posting Answers For Below Questions

here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?

6830


How to print 10 to 1 if the input have only 10 digit number?

811


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

648


How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that

2732


What is a SSRANGE and NOSSRANGE?

820






2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic

2117


which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad

1024


What is the utilization of copybook in cobol? Could we utilize a similar copybook?

720


What are the pertinent COBOL commands?

2626


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...)

1931


) what is the difference between AID and HANDLE AID?

1637


What are declaratives and what are their uses in cobol?

714


What is the compute verb? How is it used?

661


What are literals?

632


What is the local-storage section?

681