- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, there's a VPROMPT in there, so I'll start from that....
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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....
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Got it to work now, thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Quick follow-up question; how do I ammend the above code to specify which columns to include in the output?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Great, thanks!