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...


How do u initialize an array?

Answers were Sorted based on User's Feedback



How do u initialize an array?..

Answer / snehatechm

array can be initiazed by INITIALIZE verb or by moving the
values to the elements of a table.
if u initialise an array with INITIALIZE verb your
alphanumeric fields will be stored with space and numeric
fields with '0'.

Is This Answer Correct ?    9 Yes 3 No

How do u initialize an array?..

Answer / nagaraj

You can initialize an array in several ways based on the
values in the array.

If you know the values in the array already, then you can
do it through REDEFINE clause. I will give an example here.

05 MONTHS-VAL PIC X(36)
VALUE 'JanFebMarAprMayJunJulAugSepOctNovDec'.
05 MONTHS REDEFINE MONTHS-VAL PIC X(3)OCCURS 12 TIMES.

If you want to initialize at run time based on the user
input, then you can pass the values via ACCEPT statement
(online) /SYSIN DD statement (batch) and initialize the
COBOL array.

If you want to initialize with default values then you can
do it using INITIALIZE verb but be careful doing so.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More COBOL Interview Questions

What is the difference between structured cobol programming and object alternativelyiented cobol?

0 Answers  


what are the limitations of Inline Perform?

3 Answers   Zensar,


What COBOL construct is the COBOL II EVALUATE meant to replace?

1 Answers  


Can we use goto statement in inline_perform ?

5 Answers   IBM,


I have a sequential file of 100 records. How do I load the records into a two dimensional array ?

3 Answers   IBM, Xansa,


when COMP-3 is preferrable?

3 Answers   Patni,


what is soc7 abend?how u can trace it?

4 Answers   Accenture,


If there are two copybooks which have same variables and we are using both the copybooks in our program. will there be an error and if i move values to the variable which copybook varibales gets the values i move in.

3 Answers   CTS,


What is the difference between a binary search and a sequential search?

10 Answers  


1.give the details about WHEN OTHER. 2. how many form are available in evaluate.

0 Answers   IBM,


How do you set a return code to the JCL from a COBOL program?

4 Answers  


can we display comp-3 variables. if we want to display what we have to do . give me one example

6 Answers   CGI, Deloitte,


Categories