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 perform … with test after and perform … with test before?
How do u write test cases?
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
State the various causes of s0c1, s0c5 and s0c7.
i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com
Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.
Which Search verb is equivalent to PERFORM…VARYING?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?
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 to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that
Are you comfortable in cobol or jcl?
What are the pertinent COBOL
What is rmode(any) ?
What is difference between static and dynamic call in cobol?