Questions tagged [sas-macro]

A metaprogramming language used in the SAS suite to modify normal SAS code at run-time.

SAS Macro language offers more flexibility for programming SAS code. SAS code written with SAS Macro will be compiled before execution. SAS Macro language uses % for calling SAS macro functions and for calling and defining macros, e.g.:

%macro temp;
  %put %sysfunc(date());
%mend;
%temp;

Variables are used with &, e.g.:

%let my_var = "Hello World";
%put &my_var.;

More about

1265 questions
-3
votes
0 answers

how to convert this SAS Code contains an Array function to sql server code

I want to convert this SAS code to an sql server code, but I can't, I don't know how I can make Array function in sql server you can help me please? %macro NAL(dat_obs); data TAB; set TAB; by exer_sin num_sin num_vic descending dat_oper…
nadal
  • 5
  • 3
-3
votes
1 answer

TYPES OF GLOBAL MACRO VARIABLES IN SAS

Can we call GLOBAL MACRO variables which is created by % let, % do , callsymput, sql into clause , macro parameters, please tell me.
-3
votes
2 answers

sas macro code to check missing dates

If the input date is given below then the date output should be as given I want sas macro code to check missing date in the inputs 1.-MMM-YYYY = 01-MMM-YYYY --YYYY = 01-JAN-YYYY DD--YYYY = DD-JAN-YYYY DD-MMM- = DD-MMM-0000
Apache11
  • 189
  • 11
-3
votes
1 answer

How to import 100 csv files from each of the 1000 folders

I have 1000 folders in a directory named folder1, folder10, folder 25, .......folder10200. Each of these 1000 folders contain 100 csv files with names as file1, file2, ..... file100 The task I need to achieve is create a single dataset with derived…
-4
votes
1 answer

How to convert SAS codes to SAS macros?

Would you convert these SAS codes to short MACRO as SC changes as 1 to 6? if SC=1 and u_rep =1 and ((co1*(Daily**2))+(co_dem_1*daily)+(int_1))>99.7 then exp_val =1; Else if SC=1 and u_rep =1 and …
niloya
  • 1
  • 1
1 2 3
84
85