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
I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?
Why did you choose to work with ibm mainframe cobol programming?
Explain about different table spaces.
How do get the result of your program directly on your pc?
Which is not true about evaluate statement
How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
When is inspect verb is used in cobol?
Difference between cobol and cobol-ii?
Which Search verb is equivalent to PERFORM…VARYING?
Define cobol?
How you can characterize tables in cobol?
What is the difference between binary search and sequential search?
how to move the records from file to array table. give with code example
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?