04-28-2017 06:54 AM
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
04-28-2017 06:57 AM
SAS provides a free e-learning course, which is definitely worth checking out
04-28-2017 07:07 AM
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.
04-28-2017 08:40 AM
04-28-2017 08:35 AM
There are many learning places out there:
If you want to learn graphs, then this blog is a valuable resource:
I would certainly second @KurtBremser'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.
05-02-2017 07:50 AM
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.
04-28-2017 09:41 AM
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.