Posts

SAS® Programming Guidelines

This paper presents a set of programming guidelines and conventions that can be considered in developing code to ensure that it is clear, efficient, transferable and maintainable. These are not hard and fast rules but they are generally accepted good programming practices. These techniques can be used in all types of SAS® programs, on all platforms, by beginners and experts alike. SAS ® PROGRAM EFFICIENCY FOR BEGINNERS Guidelines for Coding of SAS® Programs

David Franklin's SAS Tips

2009 November - Looping the loop with DO loops October - The Use and Abuse of the NODUPKEY option in the SORT Procedure September - Comparing all datasets in one directory against all the datasets in a second dataset, using CALL EXECUTE August - Selecting data for a particular month July - I am missing a '0' in front of my day value, can SAS still read it okay? (or can SAS read a text date of '6JUN2009' correctly) June - Prefixing a value with '+' or '-' May - Why use dataset variable labels? April - More on using a FORMAT to merge data March - Delete all datasets in a library, except ... February - Getting rid of the message "NOTE: BASE data set does not exist. DATA file is being copied to BASE file." January - SUM(OF variables) 2008 December - Making a copy of a SAS dataset, Part 2 November - How would I set only character or numeric variables of an observation to missing? October - Making a copy of a SAS dataset, ...

How to do a many-to-many merge in SAS without using SQL;

A many-to-many match-merge is more complicated. When we try to do many-to-many merge that means both the data sets have multiple occurrences of BY variable values. Simple match-merge the two data sets using the BY statement is never OK… Because when we do, we get the following note in the log. "NOTE: MERGE statement has more than one data set with repeats of BY values." SAS Programmer always tries to avoid this message in the log file….because this message means that the resulting data set is probably not what we expected. Don’t be afraid that there is no way… you can do many-to-many merge using data step. A well known SAS Expert David Franklin points out a way to do many-to-many merge Many Thanks David! (Read his original post here ) NS8PO19P The Fundamentals of MERGE

Get Ready for the Big Day

Image
Assessing SAS® Skill Level during the Interviewing Process Interviewing and assessing SAS Programmers SAS Technical Interview Questions SAS® Interview or “How to Get a Second Date Tips for Effectively Interviewing SAS Programming Candidates HIRE Power in the Pharmaceutical What’s a “Senior” SAS® Position? Hiring the Best SAS Programmers Quizzes and Solutions (source: http://www2.umdnj.edu ) by Ron Cody http://www2.umdnj.edu/codyweb/biocomputing/quizzes.html SAS Proficiency Test by Judy Loren Evaluating Sample Code for an Interview Assessing SAS Skill Level during the Interviewing Process

You can get the SAS Code back even If you haven’t saved it

Image
If you happen to be one of the unlucky programmers who lost the SAS code … because you didn’t save it. There is solution for that…. SAS System automatically takes the backup of the SAS code for every 10 minutes (default); Just look in the following location: C:\Documents and Settings\Programmer Name\Application Data\SAS\EnhancedEditor\ Note: Replace “ Programmer Name ” with your login user id of the System you are using; If you go the specified location above, you will see a copy of the unsaved version of the SAS code. It will be quick if you search files with the extension name ‘.$AS’ (extension for auto-saved SAS codes) If you want, you can also change the 10-minute time interval for Auto save…. Go to… Tools ► Options ► Preferences ► Edit. In the preferences dialog box, make sure to the change the time under Autosave every …. And click on OK ...

SAS OnlineTutor®: Advanced SAS® | StudySAS Blog

SAS OnlineTutor®: Advanced SAS®

tod8. and picture formats: How Can I Find a Time Format that Does Not Remove the Leading Zero e.g. Time5

How Can I Find a Time Format that Does Not Remove the Leading Zero e.g. Time5 (output printed as 09:36 instead of 9:36)? I have found an intersting solution to this problem in http://www.sas.com/ ; direct link (Suggested by Stephen Hoar, Lloyds TSB) There is currently no time format that puts leading zeros automatically in time values. But there are a number of ways of achieving this, below are some examples. Example 1: Create your own custom format using the following syntax. Then format your data values using the user defined format. proc format ; picture military other = '%0H:%0M:%0S' ( datatype =time) ; run ; data test; x= ' 9:36't ; format x military8. ; put x=; run ; x=09:36:00 Example 2: You can also use the TODw.d format which does write leading zeros, but the original value must be a SAS datetime value. To convert your time values to datetime values use the DHMS function. In the DHMS function insert the value: 0 date, 0 hours, 0 minutes, and then...