I am runing following code,
libname orionx XLSX "/home/aniketwagare0/test/ecprg193/lpar.xlsx"
libname outori "/home/aniketwagare0/test/output"
data outori.tetest
set orionx.lpar1
where Action Performed='111 Create an account' and Action Performed='109 Subscribe Email'
run
But i am getting following error,
Check your spelling. Make sure the variable you reference is the same. I will bet that there is no _ in the name of the variables (or a space either)
Your condition will never be true.
If one portion is true the other will not be true.
Perhaps you mean OR instead of AND?
You can also use IN
where actionPerformed in ('match1' , 'match2', 'match3');
This
ERROR: Variable Action_Performed is not on file ORIONX.lpar1.
tells the whole story. You mistyped the variable name.
Before working with Excel files through SAS, one should make sure that the header lines in the sheets (which are used to create variable names) adhere to SAS naming standards.
I'd rather import the Excel data into SAS (preferably by saving to a proper file format like csv from Excel) and deal with issues there.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.