In this post, we will see how to resolve Use macro variable in macro function to filter data Question: I want to use a macro variable in a macro function to filter dataset based on date with a proc sql ...
In this post, we will see how to resolve SAS: Pass a variable’s value into a Macro Function Question: I’m relatively new to macro functions. I’m trying to build a function that, when supplied with numeric parameter “N”, will return ...
In this post, we will see how to resolve loop macro for dates to run a SAS query Question: I have a requirement to pull millions of data for more than 10,000 Ids at an event level for the last ...
In this post, we will see how to resolve How to extracting all values that contain part of particular number and then deleting them? Question: How do you extract all values containing part of a particular number and then delete ...
In this post, we will see how to resolve Transposing dataset by creating variables from substr with inconsistent pattern Question: I have a dataset that I need to transpose by a specific design that involves substring with inconsistent column pattern. ...
In this post, we will see how to resolve Using SAS macrovariables inside a SAS data step Question: I have a macrovariable &var_list which stores a list of integer variable names from the dataset have. Now I want to create ...
In this post, we will see how to resolve Is there a more efficient way to create a macro code with a global function to alter a column? Question: I have a column ID with both string and int values. ...
Question: I have to scan a target directory, and import every CSV file there into SAS. I am to use separated macros to fix names of those files (they are intentionaly problematic for SAS) and actually import them. I have ...
Question: I would like to convert the below macro into a loop so I can enter the start and end date in order to create weekly tables for that date range. Currently I have to run the macro multiple times ...
Question: I would like to drop the comma in the following list assigned to a macro variable : pop_freq_variabelen = nationaliteit_belg, urbanisatie_code, leeftijd1_code, ve_geslacht I have used the following SAS command : %let varlist_ = %sysfunc(compress(&pop_freq_variabelen,’,’)); I got the following ...