BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
gphunt
Fluorite | Level 6

I'm looking for a macro called %list_attrib which paper D13-2009 claims is in this community.  The macro basically lists all the variables within a SAS dataset with their attributes in the form of an attrib statement.  Neither I nor SAS TS can find it.  Does anyone know where it might be?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

I don't see any reference to this site as the source in the paper, can you clarify where exactly it states that?

 

I found nothing super relevant except these which seem slight variations on what you need.

 

https://github.com/scottbass/SAS/blob/master/Macro/attrib.sas

 

http://www.datasavantconsulting.com/roland/Spectre/utilmacros/dsattrib.sas

 


@gphunt wrote:

I'm looking for a macro called %list_attrib which paper D13-2009 claims is in this community.  The macro basically lists all the variables within a SAS dataset with their attributes in the form of an attrib statement.  Neither I nor SAS TS can find it.  Does anyone know where it might be?

Thanks.


 

 

 

 

View solution in original post

3 REPLIES 3
Reeza
Super User

I don't see any reference to this site as the source in the paper, can you clarify where exactly it states that?

 

I found nothing super relevant except these which seem slight variations on what you need.

 

https://github.com/scottbass/SAS/blob/master/Macro/attrib.sas

 

http://www.datasavantconsulting.com/roland/Spectre/utilmacros/dsattrib.sas

 


@gphunt wrote:

I'm looking for a macro called %list_attrib which paper D13-2009 claims is in this community.  The macro basically lists all the variables within a SAS dataset with their attributes in the form of an attrib statement.  Neither I nor SAS TS can find it.  Does anyone know where it might be?

Thanks.


 

 

 

 

gphunt
Fluorite | Level 6

Thanks, Reeza.  This will get me what I'm looking for.

Best,

Gary

ChrisNZ
Tourmaline | Level 20

Note that if you use that attrib statement to create  a data set with the same structure, you can simply run the line:

data NEW:
  if 0 then set OLD;
run;

to copy the variables (and their attributes) from OLD to NEW.

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 536 views
  • 0 likes
  • 3 in conversation