IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Access variable named inside another variable


IBM Mainframe Forums -> COBOL Programming
Post new topic   This topic is locked: you cannot edit posts or make replies.
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Jan 04, 2013 3:46 pm
Reply with quote

You have asked this question elsewhere today.

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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jan 04, 2013 3:54 pm
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. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts How to access web services/website? Mainframe Interview Questions 4
No new posts Variable Output file name DFSORT/ICETOOL 8
No new posts access the last host command CLIST & REXX 2
Search our Forums:

Back to Top