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
how to access the file from prodution from changeman tool and to submit a file to production
What is the difference between structured cobol programming and object alternativelyiented cobol?
What are the different open modes available in cobol?
What are the different rules to perform a Search?
How do define dynamic array in cobol.
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.
A table has two indexes defined. Which one will be used by the SEARCH?
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?
What is Pic 9v99 Indicates in COBOL?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this
When is inspect verb is used in cobol?