View previous topic :: View next topic
|
Author |
Message |
ursprasanna Warnings : 2 New User
Joined: 15 May 2006 Posts: 20 Location: chennai
|
|
|
|
Hi ,
In occurs clause we use Indexed variable , but this index variable is not declared any where in the working storage section of the pgm.
But in USAGE we have a clause called " INDEXED " . what does it mean.
This index has been mention that it dosent have any picture clause.
Is this index the same one which we use in occurs clause index or some thing different .
Please clarify me.
Thanks,
Prasanna Subramnaiam. |
|
Back to top |
|
|
kolappan
New User
Joined: 26 May 2006 Posts: 5
|
|
|
|
hi,
USAGE IS INDEX represents an index data item which is Full-Word binary and is used to save the value of the index. That Index Data Item can be set to the value of the Index thru the SET statement, ex. SET WS-IND-SAVE-FLD TO ITEM-IND. Index data item is not directly related to any table
The USAGE IS INDEX clause is used to provide an optimized table subscript. When a table is the target of a SEARCH statement it must have an associated index item.
SET LetterPos TO LetterIdx
MOVE LetterPos TO PrnPos
DISPLAY LetterIn, " is in position ", PrnPos
Here letteridx and letterln is indexed by variable and table name
Letterpos is usage index variable
Prnpos is working storage section variable |
|
Back to top |
|
|
|