how can we fetch 3 records in cobol pgm any coding pls ?
Answer Posted / santhosh
Read the file and validate the things, once the all the
things are done for the record keep the count of it in an
working storage variable. Everytime when u try to read the
next record check for the count of WS variable, when it
reaches the count of 3 then terminate ur program.
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
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 program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......
What is the difference between perform … with test after and perform … with test before?
What is a scope terminator give example?
What is amode(31)
Write a cobol program making use of the redefine clause.
What is rmode(any) ?
Why did you choose to work with ibm mainframe cobol programming?
how to access the file from prodution from changeman tool and to submit a file to production
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
IF I mention stop run in CICS what happens?
Difference between array and sub-script ?
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?
What is the local-storage section?
What do you understand by psb and acb?