View previous topic :: View next topic
|
Author |
Message |
muthukumarapandian
New User
Joined: 08 Oct 2004 Posts: 42 Location: chennai, india
|
|
|
|
Hi,
Any one can tell me the comparision between usage is index and table with subscript as indexed item. |
|
Back to top |
|
|
mdtendulkar
Active User
Joined: 29 Jul 2003 Posts: 237 Location: USA
|
|
|
|
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 |
|
|
muthukumarapandian
New User
Joined: 08 Oct 2004 Posts: 42 Location: chennai, india
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
narena
New User
Joined: 16 Mar 2005 Posts: 18
|
|
|
|
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 |
|
|
|