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 of 100 records. How do I load the
records into a two dimensional array ?

Answer Posted / ameet

The answer for this is as below:

01 INPUT-REC.
02 REC-DETAIL OCCURS 100 TIMES INDEXED BY I.
03 REC-DATA PIC X(10 ) - assume

PROCEDURE DIVISION.
READ FILE(INPUT) INTO(WORK-REC) - assume length as 100
SET I TO 1.
PERFORM 1000-WRITE 100 TIMES
STOP RUN.
1000-SECTION.
MOVE WORK-REC TO REC-DATA(I).
SET I UP BY 1.
READ FILE(INPUT) INTO(WORK-REC).

Is This Answer Correct ?    2 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning

1041


How to use the same COBOL program in Batch and CICS on lines? explain with an example

2324


What is difference between static and dynamic call in cobol?

1294


Whats the difference between search & search ALL?

6349


Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.

2393


What are the different open modes available in cobol?

1142


What is the usage of comp fields in cobol?

1127


What is cobol?

1187


input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.

2155


What is the difference between external and global variables in COBOL?

1348


How to know whether the module is dynamical or statistical?

1076


how to access the file from prodution from changeman tool and to submit a file to production

7434


how do you reference the fixed unblock file formats from cobol programs

1169


What is comp-1 and comp-2?

1179


Write a program that uses move corresponding.

1068