Prev: Data Structure
Next: Glimmix
From: Aj on

Macro looks like


%macro a( x ,y ,z);
....

.....

%mend;

The input to the above macro should come from a notepad or txt file.
In which
the parameters are as below( with multiple rows)


Age,1,2
Gender,2,3
....
....
...
Location,15,76

How can I pass this to the sas code and execute all the rows as
without manual copy pasting
the parameters

%a(Age,1,2);
%a(Gender,2,3);
....
....
....
%a(Location,15,76);
From: Patrick on
In a data _null_ use a normal infile/input to read the data of the
text file into variables.

Then use "%call execute" to call the macro and pass the variable
values as parameters to the macro call.

But: Before you do all this try to find a solution where you don't
need a macro at all. It's often possible and better programming.

HTH
Patrick
 | 
Pages: 1
Prev: Data Structure
Next: Glimmix