Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 8117
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 Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us