How to read a 100 record from a file through cobol?

Answers were Sorted based on User's Feedback



How to read a 100 record from a file through cobol?..

Answer / rajesh k

using arrays we can read 100 records from a file.

Is This Answer Correct ?    5 Yes 2 No

How to read a 100 record from a file through cobol?..

Answer / y@$w@nth

I. I think ur asking how to read 100th record????
here is the syntax

a. MOVE 100 to rec-key

READ in-file KEY IS rec-key
END-READ.

In the above we followed random reading from a VSAM(KSDS) File

b.For sequential file if u need to read 100Th record then we
need to write a perform statement that will run 100 times
then read statement will execute 100 times then after
termination of perform statement we will have 100th record.

II.If ur asking about u need to read 100 records and store
them in a place go and read the all 100 records and store
each record in a table(array).

Let me know if any other...
Y@$W@nth...
Cheers....

Is This Answer Correct ?    3 Yes 2 No

Post New Answer

More COBOL Interview Questions

Explain how to differentiate call by context by comparing it to other calls?

1 Answers  


we can use set true for condition names.. similarly can we code set to false in cobol pgm? will it work?

1 Answers  


. How do we cast a variable in COBOL

1 Answers   HSBC,


What is the purpose of Identification Division?

1 Answers  


There is a variable with value 19446. Requirement is to convert it to 194.46. I tried it by doing divide by 100 and my receiving field data type is 9(03)v99. But the output is 194. I am not getting the decimal value. Could anyone pls let me know how to get this done?

2 Answers  


Minimum how many Number of Paragraphs are there in ID- Divison?

7 Answers   IBM,


What is report-item?

1 Answers   IBM,


what do you mean by copybook? and what is the difference between the copybook which we are using in working storage and procedure division.

3 Answers   HCL, TCS,


can I copy book which contain db2 statment in procedure divion?

2 Answers   Bank Of America,


Can JUSTIFIED be used for all the data types?

3 Answers  


What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'. 01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'. What will happen I want Display WS-VARX and WS-VARN?

3 Answers   Xansa,


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

1 Answers  


Categories