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 INDEXED By clause

 
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:54 pm    Post subject: comparision between usage is index and INDEXED By clause
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

mdtendulkar

Active User


Joined: 29 Jul 2003
Posts: 238
Location: USA

PostPosted: Sat Feb 26, 2005 7:57 am    Post subject:
Reply with quote

Hi muthukumarapandian,

Index gives you the offset from the start position where as Subscript gives you the occurence of the item.

Please find this book for more details...search for keyword "INDEX" or "SUBSCRIPT"

COBOL Programming Guide

Hope this helps

Regards
Mayuresh
Back to top
View user's profile Send private message
muthukumarapandian

New User


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

PostPosted: Sat Feb 26, 2005 9:43 am    Post subject: Doubt on usage is index
Reply with quote

Hi,
What is the difference between usage is index and the subscript in a table declared as index.

Eg.,

01 A usage index

01 s.
02 F pic 9(3) occurs 2 times indexed by I.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

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

Hi M,

An index data item (as opposed to the table index) us generally used to save a table position pointer for later reference.

For example, you may want to compare 2 values in the table after you've determined they meet certain criteria. You can save the index of the 1st entry in the index data item, so when you find the 2nd you can use the index to reference that and the index data item to reference the 1st.
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:52 pm    Post subject:
Reply with quote

Hi Muthu,

01 A usage index

01 s.
02 F pic 9(3) occurs 2 times indexed by I.

In the above example if we want to store the Value of I we use the Variable A. Becz we cannot store the value of I in an ordinary variable. Ok.
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 Order BY AND Index Nileshkul DB2 2 Sat Dec 31, 2016 6:33 pm
No new posts Need help on SQL Dynamic WHERE Clause subratarec DB2 12 Sat Jul 16, 2016 3:11 pm
No new posts Several errors during building altern... Andi1982 JCL & VSAM 11 Wed Jul 06, 2016 7:39 pm
No new posts Drop building Alternate Index for a p... bhavin.mehta JCL & VSAM 6 Mon Jul 04, 2016 3:47 pm
No new posts VSAM Alternate Index in CICS jacobdng CICS 2 Fri May 06, 2016 1:41 pm


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