BookmarkSubscribeRSS Feed
grg_77
Calcite | Level 5

How do i create SAS format library with following attachments?

2 REPLIES 2
SAS_Cares
SAS Employee

Hi @grg_77 ! Thank you for using our SAS Communities. This Usage Note 23007: How can I permanently store and use formats that I have created?  may help you with your query as well as this paper here.

 

I hope it helps!

ballardw
Super User

You can run the the CREATE format files to place the formats in your system. Maybe. If you working in a server environment the admin may have restrictions on the options of addressing the formats library.

 

The other two files are only examples of associated the formats created with specific variables. As such they need to be associated with a data or proc step using a data set with those variables. This might be done by means of an %include statement to call the format assignment.

Data want;
    set have; /* or any other data set*/
   %include "c:\path\subfolder\Combined formats a180c.sas.sas";
run;

However the above will create variables in the data set if they do not exist. The include statement should include the complete path. Also if you are in a server environment the path needs to be available to the server executing your SAS code and may not read files from your computer's hard drive.