Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


I have a sequential file. How do I access a record in this
sequential file randomly in my program ?

Answers were Sorted based on User's Feedback



I have a sequential file. How do I access a record in this sequential file randomly in my program ..

Answer / srinivas.d

you cannot randomly acces in sequential files..

Is This Answer Correct ?    9 Yes 3 No

I have a sequential file. How do I access a record in this sequential file randomly in my program ..

Answer / guest

Harish ,

What is "KEY-FILE1" ?
Anyhow - you are still reading file sequentially ? arnn't
you ?

Is This Answer Correct ?    4 Yes 0 No

I have a sequential file. How do I access a record in this sequential file randomly in my program ..

Answer / sruthi

we can do that by using tables means arrays concept.
we can use search all for that

Is This Answer Correct ?    3 Yes 0 No

I have a sequential file. How do I access a record in this sequential file randomly in my program ..

Answer / jack

Read seq. file and store it in tables means arrays.
We can use 'seach all' for random access.

Is This Answer Correct ?    2 Yes 0 No

I have a sequential file. How do I access a record in this sequential file randomly in my program ..

Answer / mohan

Guys, i suppose that we need to use Arrays concept along
with Subscript or Index concept to access a record in a
sequential file.

Is This Answer Correct ?    2 Yes 0 No

I have a sequential file. How do I access a record in this sequential file randomly in my program ..

Answer / santhosh

write a temporary index file defining unique key, move the
sequential file to that temp index file and access the temp.
index file randomly

Is This Answer Correct ?    1 Yes 0 No

I have a sequential file. How do I access a record in this sequential file randomly in my program ..

Answer / lu

Hi Guys,
when you say "sequential" it means you have to read from 1
to 9999...Never say sequential file and read randomly !!!!!
use read util the field you want....
Perform 100-read until ws-field = 'yes'.......

Is This Answer Correct ?    0 Yes 2 No

I have a sequential file. How do I access a record in this sequential file randomly in my program ..

Answer / 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

More COBOL Interview Questions

SIGN TRAILING SEPARATE field occupy ?

3 Answers  


what is sysncpoint?

1 Answers   IBM,


what is lrec=f,what is difference between f,fb,v,vb?what is default value?how do we came to know that records are in f,fb,v,vb?

2 Answers   IBM, Wipro,


what is Reentrancy and Quasi-reentrancy?

1 Answers  


01 A pic 9(100) find record length of it

6 Answers   TCS,


How do pass the values to the parameters in cobol

2 Answers  


how do you reference the variable block file formats from cobol programs

0 Answers  


what is search and searchall?what is the diffrence between them?give an best example?

3 Answers   BirlaSoft,


What is an in line PERFORM? When would you use it? Anything else to say about it?

4 Answers  


When we code these comp,comp1,comp-2,comp-3 and comp4 values. I know the differnece.I mean when we will prefer if it is new program.Explain in detail with memory examples. Thanks in advance.

1 Answers   CTS,


What is the maximum length of a field you can define using COMP-3?

4 Answers   Complex System, Infosys,


What are INPUT PROCEDURE and OUTPUT PROCEDURE?

0 Answers  


Categories