How to read a 100 record from a file through cobol?
Answers were Sorted based on User's Feedback
Answer / rajesh k
using arrays we can read 100 records from a file.
| Is This Answer Correct ? | 5 Yes | 2 No |
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 |
what is MSGLEVEL?
hi dudes.....can any one help me..... what is SET TO TRUE all about,anyway?
1.give the details about WHEN OTHER. 2. how many form are available in evaluate.
can u give result for the fallowing example... 05 a pic 9(2) 05 b redifines a pic x(2). move 'xy' to b. display a,b.
I am sending values a and b with pic x(10) and pic x(10) by using call statement. In linkage section, I am receiving values with pic x(10) and pic x(11). Will my program fail? will it be compile error or run time abend?
In A cobol program , we can use COPY Statement in FILE- SECTION / WORKING-STORAGE SECTION / ENVIRONMENT DIVIION basically what is the difference
I try to use some column names in my cobol progorm but these column not in db2 table ..when do i get error ..while bind time or runtime?
HI THIS IS ANIL. HOW TO PASS A RECORDS OF A FILE(PS OR PDS) TO AN ARRAY?
how do you reference the rrds file formats from cobol programs
Which Search verb is equivalent to PERFORM…VARYING?
Can a REDEFINES clause be used along with an OCCURS clause? if yes, 01 WS-TABLE. 03 WS-TABLE-EL OCCURS 5 TIMES PIC X(1) VALUE 'A'. 03 WS-EX REDEFINES WS-TABLE-EL PIC X(5). What can you expect? if no,why?
how many bytes do SPPPP999 will store?