Actuarial Outpost

Actuarial Outpost (
-   Software & Technology (
-   -   Simple SAS Questions (

ACCtuary 12-18-2006 07:07 AM

Simple SAS Questions
Tom - can we make this a sticky?

I just wanted people to know where they can find some answers to simple
SAS questions. Not that I mind helping, but there are so many places to search for SAS answers.

One issue is that there's so much help that new users tend to get overwhelmed early.

Getting Started from Scratch

If you're not working for a company, and wish to learn SAS, I would suggest plunking down the $125 ($100 if you buy it on sale) and buying the SAS learning edition. It's full featured enough to learn from - data sets are limited to 1500 observations, yet the system includes some good add-ons (SAS/STAT, SAS/QC, SAS/ETS) so you can learn beyond the base package. It even comes with its own book.

Resources from the SAS Institute (needs updating, as they have reorganized. These links are not guaranteed to work, but I will update them in late May)

To get quick answers, I would try in this order:

Examples of SAS Code : Definitely check this out if you've read the documentation and you want to see how the code is actually used. You can cut and paste right into your own code.

SAS Documentation - In addition to being a reference manual, there is also a "Concepts" manual here that deserves a full reading. - Main SAS Support Page

And don't forget live help. If your company has licensed SAS, support should be available.

Outside Resources

The SAS-L list (registration required to post, none to browse)

These should get you past most beginner issues.

:clap:Update! 7/22/08 :clap:

There is an online forum that seems to be well populated at

There is not, however, any reef there.

Intermediate Questions

The websites from various SAS user groups have their proceedings online. Many SAS Questions concern the reading of data in various formats. The INPUT statement has many options, and requires some patience to master.

Here's a Beginner's Guide to the Input Statement

that answers many questions that have been asked on actuarialoutpost.

Do a search at SAS Global Forum Online Proceedings to find other topics of interest.

Of course, the SAS user community has a culture of being helpful, so you'll probably get your question answered even if you didn't RTFM (read the manual).

SAS Users Groups

If you use SAS reasonably frequently - or your SAS usage will extend across several projects, consider supporting your local and regional SAS Users Groups. A Google search of "SAS User Group" should turn up the ones appropriate for your area.


Always include the version of SAS you are using with any question that you ask anybody in the broader SAS community. Even if it's the same one you asked about two weeks prior ;-)

Update! 1/1/08 :clap: - Has links to many regional SAS papers - The website of an experienced SAS consultant.

Get a Date!

Q: Why is 1/1/60 the zero point for SAS Dates?

Some good resources for SAS Dates:

Tom 12-19-2006 02:43 PM


Originally Posted by ACCtuary (Post 1886761)
Tom - can we make this a sticky?

You bet?

Thanks for the good info :tup:

1695814 12-30-2006 06:51 PM

:tup: Thanks, ACCtuary! TTIA! :tup:

jandoval 03-04-2007 01:23 AM

This whole site is pretty good for people starting out with sas:

This portion is especially good for absolute beginners:

ACCtuary 06-08-2007 01:30 PM

I need to have a section on importing to and exporting from Excel. The issue is that this area is changing really fast. It varies greatly depending on what SAS products you have licensed. At the most recent SAS Global Forum, somebody outlined a .NET based approach to Excel that seems promising.

I'm not sure how far along it is in development, but soon you will be able to talk to SAS via pull down menus in Excel, again assuming your company isn't cheap and buys the requried licenses.

Actuarialsuck 01-28-2008 11:25 AM

SAS Question
I'm not sure if this question makes sense but here goes.

Assuming I have a dataset that lists Member ID as well as 2 columns for Member Start Date and Member End Date, however those 2 columns are not really the Start and End dates. For every month the Member is active, it will list the starting and end date of that month. So for example (eliminating days), for a member active for the first 3 months in 2007 it would say:

Member Start Date End Date
1 200701 200701
1 200702 200702
1 200703 200703

What I want to create is a table with the "true" start and end dates so for that Member, the output should be

Member Start Date End Date
1 200701 200703

Thank you for any help

Esteban 01-28-2008 11:44 AM

It is a fairly easy thing do. Other variations would certainly do the trick.


proc sort data=...;
by Member_ID Start_Date;

data ...;
set ...;
by Member_ID Start_Date;

retain True_Start_Date;  *to keep first Start_Date;
if first.Member_ID then True_Start_Date=Start_Date;

if last.Member_ID;  *to keep only the last record for each member_id;
drop Start_Date End_Date;

Actuarialsuck 01-28-2008 04:22 PM

Thank you very much Esteban

T-roy 01-28-2008 04:54 PM

I also have "The Little SAS Book" by Delwiche and Slaughter. It is nice to have this as a reference, although it is kinda vague and pretty basic.

Reflection 04-21-2008 08:18 AM

I have what should be a simple question...

In the past, I've always had a version of SAS running locally on my PC. So if I needed to transfer a file from my hard drive, that was simple, I could even use the drop-down menus. Now I am running SAS on a server. I'd like to transfer a table in Access over to the server - is there any good way to do this in SAS?


All times are GMT -4. The time now is 01:26 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

Page generated in 0.15761 seconds with 9 queries