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
 

 

Access variable named inside another variable

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Jitendra kushwah
Warnings : 1

New User


Joined: 22 Jul 2009
Posts: 3
Location: Delhi

PostPosted: Fri Jan 04, 2013 3:31 pm    Post subject: Access variable named inside another variable
Reply with quote

We were looking to implement following functionality with the help of COBOL code.

Consider following variables

Var1 PIC X(5)
Var2 PIC X(5)
Var3 PIC X(5)
Var4 PIC X(5)

We have a variable name as the content of another variable. For example Var1 contains ‘Var2’.
Now using Var1 we would like to move some data in Var2. We would like to execute something like

Move ‘abcd’ to Contentof(Var1)

The variable name inside Var1 may change on the run time and will be input from the CICS terminal. We were wondering would it be possible to achieve above stated functionality with Cobol code. It seems it would not be possible to compile link such dynamic piece of code but we still wanted to take other opinions if you feel its achievable.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7308

PostPosted: Fri Jan 04, 2013 3:46 pm    Post subject: Reply to: Access variable named inside another variable
Reply with quote

You have asked this question elsewhere today.

Topic locked.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Fri Jan 04, 2013 3:54 pm    Post subject: Reply to: Access variable named inside another variable
Reply with quote

not the first time the TS does it
official yellow card delivered icon_cool.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies.    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 Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts IMS DC screen Access sivasaras IMS DB/DC 3 Fri Nov 18, 2016 6:38 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 6 Thu Oct 27, 2016 10:20 am
No new posts RACF profile access vasanthz All Other Mainframe Topics 11 Fri Sep 23, 2016 5:51 am


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