View previous topic :: View next topic
|
Author |
Message |
saji123
New User
Joined: 15 Jul 2009 Posts: 19 Location: Chennai
|
|
|
|
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 |
|
|
rockish
Active User
Joined: 05 Jun 2009 Posts: 185 Location: Planet Earth
|
|
|
|
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 |
|
|
Back to top |
|
|
Bharath Bhat
Active User
Joined: 20 Mar 2008 Posts: 283 Location: chennai
|
|
|
|
No. You can only set an index. |
|
Back to top |
|
|
saji123
New User
Joined: 15 Jul 2009 Posts: 19 Location: Chennai
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
|