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

IF I mention stop run in CICS what happens?

2352


What is the use of intialize verb?

1221


Explain the configuration section of a cobol program with examples of syntax.

1168


What is the compute verb? How is it used?

1120


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

1189


Write a program to explain size error.

1178


what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

9070


What are declaratives and what are their uses in cobol?

1184


What are the various section in data division and briefly explain them.

1154


if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.

6544


How can we find that module can be called – whether DYNAMICALLY or STATICALLY?

1202


How you can read the file from bottom?

1133


Can a Search can be done on a table with or without Index?

1274


How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?

1118


example for sub strings ? and refernce modifications whit output pls

2298