BookmarkSubscribeRSS Feed
Andres_Fuentes1
Calcite | Level 5

Hello, good morning everyone, I have a query. I would like to do the following: when running a process the user has to enter a variable or parameter (numeric) that SAS requests, and this is saved in a table with a single record. 

Like That

Andres_Fuentes1_1-1628174324637.png

 

 

and Results 

Andres_Fuentes1_2-1628174351072.png

 

Thanks

 

 

 

2 REPLIES 2
andreas_lds
Jade | Level 19

A parameter is a macro-variable, all macro-variables are also stored in sashelp.vmacro, so if your parameters all start with a common prefix you can do:

data work.Parameter;
   set sashelp.vmacro;
   where Name =: 'PAR_';

   keep name value;
run;

proc transpose data=work.Parameter out=work.want(drop= _name_ _label_);
   var value;
   id name;
run;

If your parameter don't have a common prefix, adjust the where-statement  to your needs.

 

EDIT: proc transpose got lost during copy/paste.