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
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
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
how to move the records from file to array table. give with code example
What rules are to be followed while using the corresponding options?
input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?
how do you reference the rrds file formats from cobol programs
What is the difference between structured cobol programming and object alternativelyiented cobol?
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue
What is cobol?
What is the difference between binary search and sequential search?
What is the Purpose of Pointer in the string?
Are you comfortable in cobol or jcl?
What is Pic 9v99 Indicates in COBOL?
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?