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
How many sections are there in data division in COBOL?
What is the difference between a binary search and a sequential search what are the pertinent cobol?
What are the pertinent COBOL commands?
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
how do you reference the variable unblock file formats from cobol programs
Explain about different table spaces.
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
Have you used comp and comp-3 in your project? And how?
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
What are the different types of condition in cobol and write their forms.
I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?
How do you reference the following file formats from cobol programs?
What are various search techniques in cobol? Explain.
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
What are different data types in cobol?