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
 
INTERNAL TABLE

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: INTERNAL TABLE
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    Post subject:
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    Post subject:
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    Post subject:
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: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Fri Sep 11, 2009 4:50 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts PC (UTF-8) -> z/OS (EBCDIC) -> ... prino All Other Mainframe Topics 4 Fri Sep 01, 2017 1:47 am

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