BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
paulrockliffe
Obsidian | Level 7

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?

1 ACCEPTED SOLUTION

Accepted Solutions
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

View solution in original post

11 REPLIES 11
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

paulrockliffe
Obsidian | Level 7

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.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

paulrockliffe
Obsidian | Level 7

Thanks, there's a VPROMPT in there, so I'll start from that....

paulrockliffe
Obsidian | Level 7

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.  

andreas_lds
Jade | Level 19

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.

paulrockliffe
Obsidian | Level 7

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....

paulrockliffe
Obsidian | Level 7

Got it to work now, thanks!

paulrockliffe
Obsidian | Level 7

Quick follow-up question; how do I ammend the above code to specify which columns to include in the output?

 

Thanks

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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. 

paulrockliffe
Obsidian | Level 7

Great, thanks!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 11 replies
  • 1500 views
  • 3 likes
  • 3 in conversation