I have a sequential file. How do I access a record in this
sequential file randomly in my program ?
Answer Posted / harish
YS WE CANT ACCESS FLAT FILE RANDOMLY
IF WE WANT TO ACCESS PARTICULAR RECORD
PROCEDURE DIVISION.
MOVE KEYFIELD VALUE TO W-S VARIABLE
PERFORN UNTIL W-FLAG = 'Y'
READ FILE1 AT END MOVE 'Y' TO W-FLAG
NOT AT END
IF KEY-FILE1 = WS-KEY-VARIABLE
MOVE--------
ELSE
MOVE 'Y' TO W-FLAG.
pls correct me if anything wrong
HARISH POOMGAME SHIVAPPA(hassan,karnataka)
NIIT TECHNOLOGY
KOLKATA
Is This Answer Correct ? | 0 Yes | 12 No |
Post New Answer View All Answers
Which mode is used to operate the sequential file?
Give some examples of command terminators?
A table has two indexes defined. Which one will be used by the SEARCH?
I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.
Write the code implementing the perform … varying.
how do you reference the ksds vsam file formats from cobol programs
Explain the configuration section of a cobol program with examples of syntax.
Describe the cobol database components?
What are the different rules for performing sort operation?
Are you comfortable in cobol or jcl?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?
What are all the divisions of a COBOL program?
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
What are 77 levels used for?