BookmarkSubscribeRSS Feed
ervinodsingh
Obsidian | Level 7

Hi i have just started learning SAS programming. I found it quite different another programming languages while implementing my ideas. Somebody had suggested me learn macros, looping, and functions to implement my ideas. Please suggest me good material on the internet where I can learn SAS programming with examples. Thankyou

7 REPLIES 7
Kurt_Bremser
Super User

Do not start with macros before you have mastered the basic data step techniques, use of the most important functions (sort, means, tabulate, format, print, report, contents, datasets, transpose), and SQL. With the typical SAS courses, you start with the macro language no before at least three weeks of dealing with other aspects of SAS.

Cynthia_sas
SAS Super FREQ
Hi:
We recommend SAS skills to the level of Programming 1 and Programming 2 training before someone takes the SAS Macro Language class. I think that this recommendation is absolutely on point. The SAS Macro facility works best when you start with a working SAS program and in order to start with a working SAS program, a programmer really needs to have a solid foundation in basic SAS programming skills.

cynthia
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Hi,

 

There are many learning places out there:

http://support.sas.com/training/tutorial/

 

If you want to learn graphs, then this blog is a valuable resource:

http://blogs.sas.com/content/graphicallyspeaking/

 

I would certainly second @Kurt_Bremser's suggestion there.  Learn Base SAS thouroughly before moving onto advanced topics such as macro.  Macro is just a find and replce tool, but it can very quickly complicate you and make your code dreadful.  There is nothing you can do in macro which you cannot do in Base SAS.  

I would also suggest you look at different data models, transposed (data going across) and normalised (data going down), as these can again make your life a lot easier, something like reuducing your code just by moving to the other structure, then doing your processing and flipping back up.  

 

This forum is also a good learning place, even after 15 years I still look at some posts and think I didn't know that.  

 

And remember, if you can't think of something:
google search: SAS <mytopic>

Generally yields plenty of results.

 

Oh, finally, by other languages do you mean .net type OOP langauges, or something else?  SAS is a data based approach, so datasteps run over data observations like a loop, and procedures can do loops by using by processing - important to remember as its rare you would need to hardcode a loop in yourself.

ervinodsingh
Obsidian | Level 7

I mean R, Python, MATLAB etc. for Other languages,

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Ok, well R has dataset type convention, and Python has some sort of distionary/array type setup.  So should be similar in that regards, although I don't believe either is hard typed - i.e. in SAS you need to define column lengths/formats.

Reeza
Super User

If you find a specific topic you're having difficulties you can search at lexjansen.com for user written papers on the topic. 

For example based on your question I started thinking simulations, which means I'd refer you to the paper called Don't Be Loopy by David Cassell. Or Rick Wicklins book on simulation. 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 7 replies
  • 1672 views
  • 1 like
  • 6 in conversation