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

INTERNAL TABLE


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

New User


Joined: 15 Jul 2009
Posts: 19
Location: Chennai

PostPosted: Fri Sep 11, 2009 11:16 am
Reply with quote

Hi,
Can i move a particular value in a variable to the index of a internal table
Fo ex: Can i do
Code:
Set Var to 3
Move Var to ws-eqrf-sub,
   where sub is the index fo an internal table
01 ws-eqrfn-table.
01 filler redefines ws-eqrfn-table.
   03 table-entries  occurs 100
                                  indexed by ws-eqrf-sub.
       05 value1                    pic x(2).
       05 value2                    pic x(2).
Back to top
View user's profile Send private message
rockish

Active User


Joined: 05 Jun 2009
Posts: 185
Location: Planet Earth

PostPosted: Fri Sep 11, 2009 11:50 am
Reply with quote

Quote:
Just a small piece of advice :

Your question is pretty much straight forward that it might not take more than 5 minutes to test and see !!!!!

The best way of learning is always to search and find ourself. Because it is only then we wont forget it easily icon_wink.gif
Back to top
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Fri Sep 11, 2009 1:10 pm
Reply with quote

No. You can only set an index.
Back to top
View user's profile Send private message
saji123

New User


Joined: 15 Jul 2009
Posts: 19
Location: Chennai

PostPosted: Fri Sep 11, 2009 1:13 pm
Reply with quote

Thank you
I got it. Yes we can only set the index, in this case i can set the index with the desired variable, hope i am correct.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Sep 11, 2009 4:50 pm
Reply with quote

Quote:
I got it. Yes we can only set the index, in this case i can set the index with the desired variable, hope i am correct.
Why hope? Why not read the manual (link at the top of the page)? Specifically, the COBOL Language Reference manual, section 6.2.33.1 on Format 1 for the SET statement gives the rules so you can know for sure.
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 Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top