I've got a Process Flow in Enterprise Guide 5.1 that uses a number of Parameters. The Parameters are a mix of numbers and dates. I want to use a Code Node to produce a table that lists these parameters, one column for the parameter name and another for the entered value.
Can anyone point me in the right direction?
There is a view in SAS called VMACRO which has all the macro data in, so you could do (and not sure if EG uses same terminology):
data want; set sashelp.vmacro (where=(name in ("MVAR1","MVAR2"))); run;
The above takes MVAR1/2 macro variable information and creates a dataset of it. This has name and parameter.
There is a view in SAS called VMACRO which has all the macro data in, so you could do (and not sure if EG uses same terminology):
data want; set sashelp.vmacro (where=(name in ("MVAR1","MVAR2"))); run;
The above takes MVAR1/2 macro variable information and creates a dataset of it. This has name and parameter.
Hello, thanks for your help.
That code produces an empty table with the column headers, "scope", "name", "offset" and "value".
Is it looking just at Macros? I don't have any Macros, only parameters, or prompts as I've remembered they're called in version 5.1.
Ah, yes thats just macro values, I thought prompt values in EG are macro values? Anyways, there's likely to be another table in SASHELP library which holds the data, I don't have EG so can't tell you, but open an explorer window and have a look at the Vxxx tables in SASHELP.
Thanks, there's a VPROMPT in there, so I'll start from that....
VPROMPT looks right, columns are libname, memname, name, propmtname, id, text, type, length, promptype, dependentpid, description
But the table is blank. I've associated the rompts with the code node, so while running the code it asks for the prompts, the prompts also have default values which must be stored somewhere.
EG parameters are stored in sashelp.vmacro. SAS changes the names to be all upcase. The parameters must have been assigned to the program-node.
Thanks, yes I've found the prompts in VMACRO, so I know where they are now. The prompts are associated with the Code Node in it's properties too. Jus tneed to make it work now....
Got it to work now, thanks!
Quick follow-up question; how do I ammend the above code to specify which columns to include in the output?
Thanks
You can do it many ways, for instance adding keep to the dataset only keeps the specified variables:
data want; set sashelp.vmacro (where=(name in ("MVAR1","MVAR2")) keep=name); run;
Drop is the opposite. You could also do it in the report procedure etc.
Great, thanks!
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.