Extract only those records from a PS file which are having word 'TEXT' in the records using COBOL? The word TEXT is not present in a particular position in all the records.
Answer Posted / divyakiruthiga
Step 1: Read the first record from the PS file into a ws-variable WK-ROW.
Step 2 :INSPECT WK-ROW TALLYING WK-TXT-COUNT FOR ALL 'TEXT'.
Step 3: If the WK-TXT-COUNT is greater than 0, then write the record to the output file.
Step 4: Initialize the WK-TXT-COUNT
Step 5: Continue the above process till end of file.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
i want a program using by if, evaluate , string, unstring, perform, occurs?
How do you reference the fixed block file formats from cobol programs
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.
Explain about different table spaces.
What is the difference between Call and a Link?
What is the difference between comp and comp-3?
What is the LINKAGE SECTION used in COBOL?
How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
I have a File that has duplicate records. I need only those records that occur more than thrice.?
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?
what happens if parmparameter passes zero bytes to the program
What is a SSRANGE and NOSSRANGE?
i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this