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
aftermath09
Posts: 2
Joined: Wed May 30, 2012 8:02 pm
Skillset: COBOL
Referer: halfteck

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?

User avatar
prino
Posts: 641
Joined: Wed Mar 11, 2009 12:22 am
Skillset: PL/I - CICS - DB2 - IDMS - REXX - JCL, most in excess of three decades
Referer: Google
Location: Vilnius, Lithuania
Contact:

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


  • Similar Topics
    Replies
    Views
    Last post