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 |
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
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 am going to Display the WS-VARX and WS- VARN?
What is IMPACT analysis?
What is file status 39 ?
what is the use of keep and pass in disp
What is SDSF?
Write a program that uses move corresponding.
What is Pic 9v99 Indicates in COBOL?
0 Answers SwanSoft Technologies,
what is the difference between occurs and occurs depending on? i dont think so there is the difference in storage..then why we should use occurs depending on?
What are decleratives in COBOL ?
Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.
select TURE Statement(s) aboUt eject statemenet in cobol? a)The eject statememnt must be the only statement on the line b.It causes the program to edit abnormally c. eject statement can be written in either area A or area B d. specifies that the next source statement is to be printed at Top of the next page e.The EJECTstatement has no effect on the compilation of the source program itself