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

Can anybody give me example of subscript and index

Answer Posted / billyboyo

In IBM Cobol there are two methods of accessing elements in
a table (array). By subscript, which you explicitly define
in the Data Division or by index, which is implicitly
defined by the compiler.

01 subscript-for-table COMP PIC S9(4).

If you want the 20th item, set the above to 20 and use
field-looked-for (subscript-for-table).

An index is the displacement of an item from the start of a
table. For a subscript, the displacement, which is needed
to find the item, is calculated at run time (from the
subscript and the length of the data item(s)). So an index
is faster, but is generally considered more complex to use.
Some features, like SEARCH ALL, require the use of an INDEX.

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com

2169


What are the different rules for performing sort operation?

1154


explain sorting techniques in cobol program?

1141


How do get the result of your program directly on your pc?

2293


What rules are followed by the search verb.

1042


How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?

2393


What are various search techniques in cobol? Explain.

1024


Write a cobol program making use of the redefine clause.

1119


how do you define single dimensional array and multidimensional array in your cobol?

1042


example for sub strings ? and refernce modifications whit output pls

2264


What is the difference between Global and External Variables?

1284


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

1229


What is amode(24)?

1185


Differentiate between structured cobol programming and object-oriented cobol programming.

1073


What kind of error is trapped by on size error option?

1171