IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

comparision between usage is index and table with subscript


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top