Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

comparision between usage is index and table with subscript

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
muthukumarapandian

New User


Joined: 08 Oct 2004
Posts: 42
Location: chennai, india

PostPosted: Fri Feb 25, 2005 7:56 pm    Post subject: comparision between usage is index and table with subscript
Reply with quote

Hi,
Any one can tell me the comparision between usage is index and table with subscript as indexed item.
Back to top
View user's profile Send private message

priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Sun Feb 27, 2005 1:54 am    Post subject: Re
Reply with quote

Hi,

Usage is Index and INDEXED BY variables both are same.
Back to top
View user's profile Send private message
sinusam

New User


Joined: 06 Jan 2004
Posts: 18

PostPosted: Mon Feb 28, 2005 1:25 am    Post subject: USAGE IS INDEX vs. INDEXED BY
Reply with quote

Hi,
They are actually different.

A Variable defined with
USAGE IS INDEX - is called as
INDEX DATA ITEM


A variable declared with
INDEXED BY - is called as
INDEX NAME


The Index data item is a 4 byte elementary item (not necessarily connected with any table) that can be used to save INDEX NAME values for future reference.

A SET statement can be used to set the INDEX VALUE to an INDEX DATA ITEM.

INDEX NAMES are always associated with its Table.

While coding them please check the manuals for the rules of Comparing INDEX VALUEs and INDEX DATA ITEMs, and also movement of data between the two.

So, please be in alert when using INDEX VALUEs and INDEX DATA ITEMs.


Regards,
Sinu Sam
Back to top
View user's profile Send private message
muthukumarapandian

New User


Joined: 08 Oct 2004
Posts: 42
Location: chennai, india

PostPosted: Tue Mar 01, 2005 9:31 am    Post subject:
Reply with quote

Hi,

Then what is the use of that usage in index.
Back to top
View user's profile Send private message
narena

New User


Joined: 16 Mar 2005
Posts: 18

PostPosted: Thu Mar 17, 2005 2:36 pm    Post subject:
Reply with quote

Hi,

If we declare a var with Usage Index, it will be used to store the value of the Indexed Variable. We define an array with indexed by clause & a var, which is called indexed variable.

The value of this indexed variable cannt be stored in Ordinary Variable. So we define a Var with Usage Index.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts )SEL and )ENDSEL usage cvnlynn TSO/ISPF 4 Thu Jun 15, 2017 1:15 am
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm
No new posts Need inputs on Space requirement and... ashek15 IMS DB/DC 0 Sat Apr 01, 2017 8:26 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us