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

how do u link sub pgm to main pgm ?

2 Answers   TCS,


why mainframe we use not like java as frontend oracle as backend. or not word excel.In there also huge ammount data stored.

2 Answers   TCS,


Consider the following COBOL entries: 05 X PIC 99 VALUE 10. SUBTRACT 20 FROM X. The resultant value of X wil be

7 Answers   TCS,


which one is the best of com and com-3.using of real time ?

7 Answers   Cap Gemini,


If a sub program is called from mainprogram.I have opened cursor in main program and Fetch the result in subprogram ,Is it possible ?If yes please tell me the reason.

1 Answers  






What is the use of intialize verb?

0 Answers  


whats the difference between search and search all?

4 Answers   Patni,


how you read control card into array?

3 Answers   HCL,


Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks

0 Answers  


What is the significance of 'above the line' and 'below the line'?

2 Answers   Nokia,


a pic s9(4) comp b pic s9(4) comp-3 c ???????????????? d ???????????????? move a to c add a+B giving d. what is ur declaration for c,d?

4 Answers  


Explain fixed length record in cobol? with suitable example

1 Answers   IBM,


Categories