BookmarkSubscribeRSS Feed
Chikku
Calcite | Level 5

Hi All,

Can anyone help me in answering the below queries regarding the SOURCE entry in a SAS catalog:-

1)How to write a program to save macro definition in a SOURCE entry in a SAS catalog.

2)What are the advantages or situations for saving the macros in SOURCE entry.

Please let me know your thoughts.

kind regards,

Karthik.

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Hi,

1) SAS(R) 9.2 Language Reference: Dictionary, Fourth Edition

2) Personally I don't see any.  Catalogs are proprietary SAS format, hence not open source.  Secondly they are not necessarily portable (32bit -> 64 bit recently for instance).  I suppoae you could argue that you can keep all your macros in one place, and keep them from be easily decoded, however I have yet to see that many macros that have a) worth, b) something that can't be done in straight code.  As for your global tool macros, your probably better off leaving them in text files so you can include them in your version control system, and easily edit/see what is happening.  Just my opinion though.

SASKiwi
PROC Star

I agree with RW9. One of the few advantages of SAS catalogs is that they can be set to read-only with a password so your macros or other SAS programs stored there cannot be changed.

It is much easier to interact with SAS catalogs in SAS Display Manager. For example the SAVE command will allow you to save a SAS program directly into a SAS catalog as SOURCE. You can also double click on a catalog SOURCE entry to view its contents.

If you don't have Display Manager and ony EG then you can't even see a catalog or list catalog entries unless you install the view catalog custom task. This task only allows you to list and delete entries not to view SOURCE entries.

jakarman
Barite | Level 11

1/ You can make a catalog accessible by refering to by a filename. With the dms approach you can as easily include those and export/import those as the same as it where the OS-file system.  SAS(R) 9.4 Statements: Reference, Third Edition  (filename catalog).

2/ SAS catalogs are belonging to the SAS proprierty structure types. They are getting the advantages and disadvantages of those.

As you have to manage formats FCMP and other types it could makes sense to use them in the same approach (release management and versioning) .

Versioning tools are often abused for release management with deployment and instead of simplifying the work getting it almost unworkable.

You will find a lot of SAS solutions being using catalogs. With the deployment of SAS catalogs make it less clear where and what of it is used.   
They behave different as OS dedicate type ones. Avoiding those loopholes.   

Storing macros in source code in catalogs will prevent you from upper/lowercases (only lowercase works) at the Unix level. In the classic mainframe (MVS) you are limited to a 8.8.8 PDS member naming where SAS catalogs do not have that limitation. Within a SAS/connect session you can use those remote connected (RLS) libraries transparently when in native format. Otherwise (foreign) they are readable  

---->-- ja karman --<-----

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 1611 views
  • 0 likes
  • 4 in conversation