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 ?

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


Please Help Members By Posting Answers For Below Questions

What rules are followed by the search verb.

1123


What is the difference between PIC 9.99 and PIC9v99?

1342


) what is the difference between AID and HANDLE AID?

2159


What is a SSRANGE and NOSSRANGE?

1475


i need a small 3d program using inline and outline.

2216


Write a program to enter and display the names of students in a class using the occurs clause.

1213


what is amode(24), amode(31), rmode(24) and rmode(any)?

1154


Which mode is used to operate the sequential file?

1208


In COBOL programming, what is PERFORM? What is VARYING?

1152


Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.

5750


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

1330


Why did you choose to work with ibm mainframe cobol programming?

1115


What are the different data types in cobol?

1450


When is inspect verb is used in cobol?

1258


What rules are to be followed while using the corresponding options?

1077