How do I get the name of a variable into a variable?



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

How do I get the name of a variable into a variable?

Postby aftermath09 » Mon Feb 11, 2019 9:55 am

Hi,

Is it possible to get the name of a variable into a variable?

Example:
VAR-1 PIC X(30) VALUE "ANYTHING".
VAR-2 PIC X(30) VALUE SPACES

How can I get "VAR-1" dynamically as value into VAR-2?
aftermath09
 
Posts: 2
Joined: Wed May 30, 2012 8:02 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How do I get the name of a variable into a variable?

Postby prino » Mon Feb 11, 2019 4:41 pm

You cannot. Period. Full stop. End of story!
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 635
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post