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

what is " USAGE INDEX " mean ??


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ursprasanna
Warnings : 2

New User


Joined: 15 May 2006
Posts: 20
Location: chennai

PostPosted: Mon Jun 05, 2006 10:39 am
Reply with quote

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
View user's profile Send private message
kolappan

New User


Joined: 26 May 2006
Posts: 5

PostPosted: Mon Jun 05, 2006 11:31 am
Reply with quote

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
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 PuTTY - "User is not a surrogate... IBM Tools 5
No new posts Cobol file using index COBOL Programming 2
No new posts Newbie Stuck on "Duplicate Datas... TSO/ISPF 5
No new posts STEM usage in REXX CLIST & REXX 14
No new posts z/OS Modules Usage report using SMF 42 DFSORT/ICETOOL 2
Search our Forums:

Back to Top