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


Please Help Members By Posting Answers For Below Questions

write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc

710


How can you get the ksds file records into your cobol program?

644


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

2730


What is the difference between Call and a Link?

699


What are the pertinent COBOL

2045






Can you please let me know the centre name of INS certification in Kolkata.

1715


Describe the cobol database components?

680


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1906


In COBOL programming, what is PERFORM? What is VARYING?

670


How do you get the data to code the BMS macro?

1476


In COBOL, what is the different between index and subscript?

759


What is comp-1 and comp-2?

764


IF I mention stop run in CICS what happens?

1896


What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?

679


how to convert the recors form vsam file to db2 table tru file aid

2763