Hello team,
I wonder if I want to refer to a variable name in SAS I can use this apporach:
libname + datasetname + variablename.
Please confirm it.
Regards,
blueblue
Where to you think you need to use this?
Show an example of how this is to be used.
My first instinct is "no" but I don't use EG for much.
The SAS/AF Screen Control Language uses multilevels but the third is typically property of an object.
For any procedure that is using a specific data set the libname and dataset name are moot once loaded.
Can you provide an example where you might do that? It's not specific to SAS Enterprise Guide, but I'm wondering what type of SAS code you have where that would be a useful construct. Since SAS procedures are already (often) scoped to a particular data set...
Thanks for the input:
Here is example:
Proc sql,
Create table as mytable
select libname.tablename,columnname
from libname.tablename
quit
regards,
blueblue
As you can see if you try, this is invalid syntax.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.