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.