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 

Index variable

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


Joined: 23 Feb 2005
Posts: 87
Topics: 33

PostPosted: Thu Feb 24, 2005 7:06 am    Post subject: Index variable Reply with quote

03 TEST-KEY.

05 TK-BYTE OCCURS 40 PIC X(01) indexed by A.



03 TEST-KEY1.

05 TK-BYTE1 OCCURS 40 PIC X(01) indexed by A.



can same variable be used as a index for two tables???????
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Feb 24, 2005 8:49 am    Post subject: Reply with quote

mainframemouli,


Yes you can use the same index for 2 different tables. change your definition to the following

Code:

01 TEST-KEY.                                       
   05 TK-BYTE-TBL OCCURS 40 TIMES INDEXED BY A.     
      10 TK-BYTE PIC X(01).                         
                                                   
01 TEST-KEY1.                                       
   05 TK-BYTE-TBL1 OCCURS 40 TIMES INDEXED BY A.   
      10 TK-BYTE1  PIC X(01).                       


Hope this helps...

Cheers

kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

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


Joined: 02 Dec 2002
Posts: 19
Topics: 7
Location: Chennai, India

PostPosted: Wed Mar 22, 2006 3:08 pm    Post subject: Reply with quote

Kolusu,
Will there be any performance degradation using same index for 2 different tables. As far as I know, indexes are usually used as special registers to store displacement from base address of a table. In case of 2 tables using same index, how is displacement calculated? At run time?

Cheers,
Subzero
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Mar 22, 2006 4:20 pm    Post subject: Reply with quote

Quote:

Kolusu,
Will there be any performance degradation using same index for 2 different tables


Subzero,

I really cannot tell about the performance issue. You may need to do some stress test and see if there is any performance degradation.

Kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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