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
What is the LINKAGE SECTION used in COBOL?
What are the different data types in cobol?
What are various search techniques in cobol? Explain.
Explain about different table spaces.
what is s000 u4087 error? please give the all error codes in cobol,jcl.
What is the difference between goback, stop run and exit program in cobol?
what happens if parmparameter passes zero bytes to the program
What is the difference between perform … with test after and perform … with test before?
What is a report item?
What rules are followed by the search verb.
What is the difference between Global and External Variables?
Name some of the examples of COBOl 11?
What is the difference between binary search and sequential search?
Write a program that uses move corresponding.
How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that