Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Geetin all variable name in an REXX

Status
Not open for further replies.

zostechhelp

Technical User
Sep 3, 2008
5
CH
The theme is to get all used variable names on a current rexx script on z/OS System. Does somebody know ho to do that?
 

The compiler would certainly know. Can you compile it?


Frank Clarke
--Is it time for another Boston Tea Party?
 
Yes, I would be able to compile it. But I do not thinks i will get the variable nam out of them. I need the names at run time and varaiable name are dynamicli created that is why i would like to get defined variables. Furtheron I would like to use it on Control S/A and there is no compiled REXX allowed. I fact, I am just looking in programmers manual if there is an control block is available pointing to variablen struktur where I may get it for.
 

I have heard rumors of a (probably assembler) routine which does this. Possibly re-ask on MVSHELP ?


Frank Clarke
--Is it time for another Boston Tea Party?
 
All,

I used to have a program "header.rex" that auto built the header for a file, including doc of all external calls, all functions, all subroutines, all calls/signals and all vars.

Had all that on 9-Track tape from MF world, and can't find a machine to read it, plus too old now, probably demagged some.

Started just last night rewriting in .php so would work on both .rex and .php files.

Will post some as I go and we can make it collaborative.

YMR
 
In the current REXX-Script you can only check if a symbol has already been used as a name of a variable, e.g.:
Code:
foo = ''

say checkvar('foo')
say checkvar('bar')
exit

/*  Functions/Procedures   */
checkvar:
parse arg name
retval = name 'is not a defined variable'
if SYMBOL(name) = 'VAR' then
  retval = name 'is a variable !'
return retval
The above script results in:
Code:
foo is a variable !
bar is not a defined variable
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top