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

Regarding Index Variable


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nal_satish

New User


Joined: 20 Jun 2005
Posts: 26
Location: Hyderabad

PostPosted: Fri Sep 30, 2005 12:27 pm
Reply with quote

Hi ,

Regarding INDEX variable used in occurs clause

05 Var1 occurs 5 times indexed by N
06 var2 pic x(2) ----------> First


05 Var3 occurs 5 times
06 Var4 pic x(2) ----------->Second


Can the INDEX variable declared In First can be used in the Second Declaration
can it be used if picture clause is Different ????

Can some one help me out regarding this
Back to top
View user's profile Send private message
ikumar

New User


Joined: 02 Aug 2005
Posts: 81

PostPosted: Fri Sep 30, 2005 12:56 pm
Reply with quote

I think, you can use this index N to index another table only if
1) if the number of elements are same from both the tables.
2) If the variables/elements have the same length.

If you have same length i think picture clause might not be a problem. like, instead of x(2) u can have 9(2)...But not sure....have to check it out....

Correct me if i m wrong...
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Variable Output file name DFSORT/ICETOOL 8
No new posts Cobol file using index COBOL Programming 2
No new posts Moving Or setting POINTER to another ... COBOL Programming 2
No new posts parsing variable length/position data... DFSORT/ICETOOL 5
Search our Forums:

Back to Top