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

about subscript and index


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

New User


Joined: 15 Oct 2005
Posts: 13
Location: chennai

PostPosted: Tue Dec 06, 2005 1:54 pm
Reply with quote

hi its san here
can anybody explain about the subcript and index detaily???
Back to top
View user's profile Send private message
iknow

Active User


Joined: 22 Aug 2005
Posts: 411
Location: Colarado, US

PostPosted: Tue Dec 06, 2005 2:04 pm
Reply with quote

Hi tomrsan,

I suggest you to search our forum first before you post.

Subscript
Subscript represents occurrence # of the Table Entry. Subscript can be represented explicitly and implicitly. Explicitly means thru occurrence # of the table entry; implicitly means thru a data name. That data name should be defined as an independent item in the W-S Section. The most efficient definition of Subscript is Full-Word binary.

INDEX
Index is assigned to specific table thru INDEXED BY clause. Internally is represented by Index Register which is Full-Word binary. Specific index name can be used to reference a field from the table to which that index is assigned to index represents displacement value of the table entry from the beginning of the table.

Difference between subscript and Index

[list=]A subscript is a working storage data definition item, typically a PIC (999) where a value must be moved to the subscript and then incremented or decremented by ADD TO and SUBTRACT FROM statements. An index is a register item that exists outside the program's working storage. You SET an index to a value and SET it UP BY value and DOWN BY value.

Index represent displacement value of the table entry from the beginning of the table, subscript - occurrence # of the table entry. To calculate the displacement of the table entry from its beginning when subscript is used takes 16 additional instructions from the system because of that the usage of the index is more efficient.[/list]

Please use the search option in our forum to get more details.

hope this helps.
Back to top
View user's profile Send private message
i413678
Currently Banned

Active User


Joined: 19 Feb 2005
Posts: 112
Location: chennai

PostPosted: Mon Jan 02, 2006 8:50 pm
Reply with quote

Hi,

Subscript can be changed by move and any arithematic verbs.

Index can only be changed by using set,search and perform.

Let me know if u know any......

Cheers...........................

pavan
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 Cobol file using index COBOL Programming 2
No new posts Finding faulty logic Subscript out of... COBOL Programming 5
No new posts DL/I status code AK for GU call using... IMS DB/DC 1
No new posts Add column to existing records using ... JCL & VSAM 2
No new posts choice of clustering index DB2 3
Search our Forums:

Back to Top