So I would like to use this routine to list all the variables with their type and lengths. But how can I get an array of all the variable names?This message has been edited. Last edited by: <Kathryn Henning>,
7.7.03, Windows HTML, Excel, PDF,
December 03, 2013, 11:17 AM
Mighty Max
1. Store output of -? & into hold file 2. Read hold file and store variable names in array
This only will get variable names if they are 9 char or less. I am trying to get people out of the habit of using terrible variable names that are short but confusing. So this won't work for me. Obviously WF has the list stored in memory somewhere. Anyone know of another option that will work for variable names of any length?
7.7.03, Windows HTML, Excel, PDF,
December 03, 2013, 02:45 PM
StevenTCramer
But thanks Tom and Max as it does work for capturing what is dumped to the output in a "array".
7.7.03, Windows HTML, Excel, PDF,
December 04, 2013, 10:44 AM
njsden
Try using the following when "capturing" the list of variables to see if it helps:
-? & SAVEPRINT
It will give you not only each &variable's full name and value, but also how they got their values (via a -SET or -DEFAULT for instance).
Both & and && variables are listed with a non-truncated name and specifying how each of them got its value (-SET / -DEFAULT).This message has been edited. Last edited by: njsden,
when I use -? & SAVEPRINT I get less variables than when I use -? &;
In one case I get 55 the other 22.
So I now can get the fullname I just dont' get all. Any ideas?
7.7.03, Windows HTML, Excel, PDF,
December 06, 2013, 09:34 AM
njsden
Are you only interested in your application variables (the ones you control) or also internal ones such as &YYMD, &LINES, etc.?
I think SAVEPRINT excludes the latter from consideration so you'll have to pick which version (-? & vs. -? & SAVEPRINT) gives you the best bang for the buck given your reporting needs, or perhaps come up with your own technique to read both sets and merge the results somehow which is obviously not so straightforward due to truncated variables names.