crisgugiu, The macro store is the most effective way to store your code and hide the code. However, if you want to save the code, you can do what I do so when I ship updates, I send over one sas7bcat file isntead of a zipped file of the code. There are two ways to store SAS code to a catalog. You can either store each data step in a SAS catalog (big pain), or you can load an entire program to a SAS catalog. Unlike storing SAS Macros to the macro catalog where the Macro catalog is set as a libref, set the catalog as a fileref (i.e., filename fileref "path"). There are two ways to do this: Write the program to the file: libname catlib "path-to-catalog"; filename catfile catalog "catlib.project"; data _null_; file catfile(filename.source); put "data newdata;"; put " set olddata;"; put " * some more datasteps;"; put "run;"; run; But, since I'm lazy and it's not as simple to test programs that way and make adjustments: libname catlib "path-to-catalog"; filename catfile catalog "catlib.project"; filename includes "my include library"; /* it's already set up, but for clarity, I've included it here */ data _null_; file catfile(filename.source); /* note the ".source" - need that so it can be used in an include */ infile includes(filename.sas); /* note - the ".sas" is needed where the OS requires it to work */ input; put _infile_; run; With the second step, filename should be the same for both the input and output so when you include it in code later on, your code doesn't break. So you know, I get a listing of all the files in the include library first, then use a macro to loop through the list and build my source catalog. Later, when you use the catalog, do the following: libname catlib "path-to-catalog"; filename catfile catalog "catlib.project"; %include catfile(filename); You can prevent the actual source code from being viewed in the process by creating a macro that stores the current options, sets options nosource nosource2;, then re-stores the options to what they were. If you want to go to the trouble. #
... View more