| IBM MAINFRAME HELP & SUPPORT FORUMS Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
|
| View previous topic :: View next topic |
| Author |
Message |
muthukumarapandian
Joined: 08 Oct 2004
Posts: 44
Location: chennai, india
|
| Posted: Fri Feb 25, 2005 7:54 pm Post subject: comparision between usage is index and INDEXED By clause |
|
|
Hi,
Any one can tell me the comparision between usage is index and table with subscript as indexed item. |
|
| Back to top |
|
mdtendulkar
Joined: 29 Jul 2003
Posts: 257
Location: USA
|
| Posted: Sat Feb 26, 2005 7:57 am Post subject: |
|
|
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
Joined: 08 Oct 2004
Posts: 44
Location: chennai, india
|
| Posted: Sat Feb 26, 2005 9:43 am Post subject: Doubt on usage is index |
|
|
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
Joined: 30 May 2003
Posts: 1508
|
| Posted: Sun Feb 27, 2005 1:34 am Post subject: |
|
|
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
Joined: 16 Mar 2005
Posts: 20
|
| Posted: Thu Mar 17, 2005 2:52 pm Post subject: |
|
|
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 |
|
| |
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM
|