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: 8280
Location: Dubuque, Iowa, 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 Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts Need inputs on DB2 tablespace/table r... ashek15 DB2 3 Sat Mar 24, 2018 11:49 pm
No new posts COBOL declaration for table Poha Eater DB2 3 Mon Feb 26, 2018 6:58 pm
No new posts load and delete table through JCL wit... ram_vizag JCL & VSAM 9 Thu Feb 01, 2018 12:47 am
No new posts Unloading DB2 table in CSV format alo... grvtomar COBOL Programming 7 Sun Jan 28, 2018 2:05 am

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