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

Answers were Sorted based on User's Feedback



Can anybody give me example of subscript and index..

Answer / 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

Can anybody give me example of subscript and index..

Answer / arya

number of occurences are called subscript.............


number of dispositional position are called index...........

Is This Answer Correct ?    1 Yes 3 No

Can anybody give me example of subscript and index..

Answer / krishna

Subscript means occuresses, it can declared in WS-section
index means displacement,need not be declared

Is This Answer Correct ?    1 Yes 5 No

Can anybody give me example of subscript and index..

Answer / pandu

Subscript is sequential reading Index is direct reading of
perticular position of record

Is This Answer Correct ?    0 Yes 5 No

Can anybody give me example of subscript and index..

Answer / mahii

index is no of occurance we can find data exactly

subscript is displacement mainli its is used in arrays to
load the data

Is This Answer Correct ?    1 Yes 9 No

Post New Answer

More COBOL Interview Questions

I hv ten records in ps file and i hv say some 15 records in vsam file .i hv empno and age in ps file n empno,empname,dept n desig in vsam file. i hv 2 read the ps file n check wid matching empno in vsam file and then insert all fields from ps and vsam into db2 table....plz help in writin the procedure division

1 Answers  


can we print comp 3 stmts how ?

3 Answers   Accenture, TCS,


Hi all, I have a following requirement to write the cobol program. I have to load the 129 variables from input sequential file which are in excel sheet to the cobol inernal table. and after loading into table i have to compare this data with the business file. here compare means controlling the data whether the format(numeric,alpha) is same in the business file and in the table??? i have the same data in input and business file. could anyone please give me any idea of the logic?// i have all the 129 different variables(129rows,1 column)is there .

4 Answers   IBM, Syntel, TCS,


What are different file OPEN modes available in COBOL?

4 Answers   Sun Life,


What are the pertinent COBOL

0 Answers   IBM,


what is the difference between PA & PF keys?

1 Answers   IBM,


File status must be checked both while opening and reading the file or only while reading the file?

2 Answers  


I have a sequential file. How do I access a record in this sequential file randomly in my program ?

8 Answers   CGI, Xansa,


WORKING-STORAGE SECTION. 01 VAR1 COMP-2 VALUE 0. PROCEDURE DIVISION. MOVE 10.2115 TO VAR1. DISPLAY 'VAR1 =' VAR1. GOBACK. 10.2115 is stored as .10211499999999996E 02 in OS VS Cobol 10.2115 is stored as .10211500000000000E 02 in ecobol. Any reason why?

3 Answers   TCS,


how to access vsam files in cobol and how to differentiate that this is ESDS file

1 Answers   EDS,


How to remove 2 duplicate records and copy only one using job control language?

0 Answers  


i want all ERRORS codes in COBOL ,JCL,VSAM ,DB2,CICS

4 Answers   Infosys,


Categories