Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Regarding Index Variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Regarding Index Variable
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    Post subject: Re: Regarding Index Variable
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Confusion b/w index and subscript Deepak kumar25 Mainframe Interview Questions 7 Thu Aug 31, 2017 6:50 am
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us