MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Size and Field Definition of a Index in Cobol

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
Tom
Beginner


Joined: 15 Aug 2006
Posts: 2
Topics: 1
Location: Los Angeles

PostPosted: Tue Aug 15, 2006 6:30 pm    Post subject: Size and Field Definition of a Index in Cobol Reply with quote

What kind of field definition (size, type etc.) is created by the compiler for an index on a table?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Tue Aug 15, 2006 7:12 pm    Post subject: Reply with quote

Tom,

Index is a 4 byte Binary(Comp) item.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Tom
Beginner


Joined: 15 Aug 2006
Posts: 2
Topics: 1
Location: Los Angeles

PostPosted: Thu Aug 17, 2006 12:25 pm    Post subject: Reply with quote

Thanks Kolusu,

I just scanned some other posts on the subject of indexes vs. subscripts.

"Indexes are stored as a 4-byte binary number and pointed to in the variable portion of the TGT(Task Global Table) whereas subscripts are defined in the working-storage section and are stored according to their PIC and USAGE clauses (PIC S9(4) or S9( COMP)

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. "

What I'm wondering is if the only difference in efficiency is the arithmetic conversion of a subscript to a displacement value and then a common processing routine is executed, or there are actually two different processing routines (assembler instructions) one for a subscript and one for an index, where the index routine that is "called" is more optimized adding more efficiency.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group