Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Learn SAS Programming

Learn SAS programming, SAS slides, SAS tutorials, SAS certification, SAS Sample Code, SAS Macro examples,SAS video tutorials, SAS ebooks, SAS tutorials, SAS tips and Techniques, Base SAS and Advanced SAS certification, SAS interview Questions and answers, Proc SQL, SAS syntax, Advanced SAS, Quick links, SAS Documentation, SAS Addin to Microsoft office, Oracle, ODS HTML, ODS< Clinical trials, Financial Industry, Q & A, SAS Resumes, SAS Blogs,,

  • Inicia sesión para ver los comentarios

Learn SAS Programming

  1. 1. What is SAS?<br />The SAS BI SoftwareThe SAS BI System is an integrated suite of software for enterprise-wide information delivery... Applications of the SAS System include executive information systems; data entry, retrieval, and management; report writing and graphics; statistical and mathematical analysis; business planning, forecasting, and decision support; operations research and project management; statistical quality improvement; computer performance evaluation; and applications development.<br />Read more @ <br /> Introduction to SAS<br />Read more @ <br />What is SAS system? <br /> The SAS System known well as Statistical Analysis System, is one of the most widely used, flexible data processing, reporting and analyses tools. SAS is a set of solutions for enterprise-wide business users as well as a powerful fourth-generation programming language for performing tasks or analyses in a variety of realms such as these: -<br />Analytic Intelligence General Data Mining and Statistical Analysis Forecasting & Econometrics Operations Research<br />Read more @ <br /> SAS Books Recommended for industry application<br />These books coupled with SUGI Papers will give you the impetus/basics to learn and explore more on the Internet.1. Professional SAS Programmer's Pocket Reference - Rick Aster       This book would be a must for any SAS Professional I guess.....It's a quick handy book for Syntax and  options......2. SAS Certification Prep Guide: Base Programming - SAS Institute      This book is a Prep Guide for BaseSAS....I would suggest you to read the whole book before you attempt the exam in addition to the SAS Online tutor, as it covers some uncovered syllabus on the latter....3. Cody's Data Cleaning Techniques Using SAS Software - Ron Cody       This book is an excellent source of examples of SAS in real-world applications....<br />Read more @<br /> <br /> Base SAS tutorials (Slides) for the Beginners !!! ...<br />Here are some links to learning Base SAS...SAS Slides 1 : Introduction to SAS <br />Read more @ <br /> Advanced SAS tutorials (Slides) for Beginners !!!<br />Here are some links to learning Advanced SAS Programming...SAS Macros - to learn Macro Programming in SAS.SAS Slides 12 : Macros <br />Read more @ <br /> Quick links to SAS Statements in SAS Documentation...<br />Here are some links to SAS statements and its options in the SAS Documentation...SAS OptionsSAS StatementsSAS ProceduresSAS FunctionsSAS Simple STATs<br />Read more @ <br /> Base SAS tutorials (Slides) for the Beginners !!! ...<br />SAS Slides 7 : Match Merging with Datastep <br />Read more @ <br /> SAS macro to Create / Remove a PC Directory...<br />Here's a SAS macro to Create and Remove a PC Directory... Often we ignore Notes and warning in the SAS log when we try to create/remove a directory that does/doesn't exist...This macro first checks for the existence of the directory and then create/delete it or else put a message to the SAS log...try it out :-) /* Macro to Create a directory */<br />%macro CheckandCreateDir(dir); <br />   options noxwait; <br />   %local rc fileref ; <br />   %let rc = %sysfunc(filename(fileref,&dir)) ;    <br />   %if %sysfunc(fexist(&fileref)) %then <br />      %put The directory " &dir" already exists ; <br />   %else <br />     %do ; <br />         %sysexec mkdir " &dir" ; <br />         %if &sysrc eq 0 %then %put The directory &dir has been created. ; <br />Read more @ <br />Ways to Count the Number of Obs in a dataset and pass it into a macro variable...<br />Well...there are many ways of getting the observation count into a macro variable...but there a few pros and cons in those methods...1. using sql with count(*)..  eg.         proc sql;              select count(*) into :macvar             from dsn;         quit; pros: simple to understand and develop cons: you need to read the dataset in its entirety which requires processing power here...2. datastep  eg.        data new;          set old nobs=num;          call symputx('macvar',num);       run;<br />Read more @ <br />SAS macro to split dataset by the number of Observations specified<br />Suppose there was a large dataset....This SAS macro program splits the dataset by the number of observations mentioned...macro name%split(DatasetName, No ofobservation to split by)/* creating a dataset with 100000 observations*/<br />data dsn;<br />do i=1 to 100000;<br />output;<br />end;<br />run;<br />%macro split(dsn,splitby);<br />data _null_;<br />set &dsn nobs=num;<br />Read more @ <br /> SAS Programming Efficiencies<br />The purpose of this document is to provide tips for improving the efficiency of your SAS programs. It suggests coding techniques, provides guidelines for their use, and compares examples of acceptable and improved ways to accomplish the same task. Most of the tips are limited to DATA step applications.   Efficiency   For the purpose of this discussion, efficiency will be defined simply as obtaining more results from fewer computer resources. When you submit a SAS program, the computer must:  <br />load the required software into memory  <br />compile the program  <br />Read more @ <br /> SAS macro to reorder dataset variables in alphabetic order...<br />How do you reorder variables in a dataset...I get this many a times.... <br />Here's a macro for you to achieve it...For example I've used a dataset sashelp.flags and created some more variables with variety of variables with names upper / lower cases and _'s to demonstrate the reorder macro....   Please try this macro for yourself and let me know your suggestions....<br /> <br />/* Example dataset with variety of variable names */ <br /> <br />data flags; <br />set sashelp.flags; <br />a=2; <br />b=4; <br />Read more @ <br /> SAS Interview Questions and Answers found on the Internet...<br />Here are some more links for SAS Interview Questions and Answers found on the Internet...<br />Read more @ <br />SAS Interview Questions and Answers(1)<br />What SAS statements would you code to read an external raw data file to a DATA step?<br />We use SAS statements – <br />FILENAME – to specify the location of the file<br />INFILE - Identifies an external file to read with an INPUT statement<br />INPUT – to specify the variables that the data is identified with. <br />Read more @ <br /> SAS Interview Questions and Answers(2)<br />If you're not wanting any SAS output from a data step, how would you code the data statement to prevent SAS from producing a set?<br />Data _null_;<br /> <br /> _NULL_ - specifies that SAS does not create a data set when it executes the DATA step. <br /> <br />Data _null_ is majorly used in<br /> <br />creating quick macro variables with call symput routine <br />eg.  <br />          Data _null_;<br />             Set somedata;<br />             Call symput(‘macvar’,dsnvariable);<br />         Run;<br />Creating a Custom Report <br />Eg. <br />Read more @ <br /> Advanced Macro Topics<br />A document that discusses Advanced Macro topics<br />Read more @ <br /> SAS Instructor's Programming Tip - Combining Data ...<br />Read more @ <br /> Opening SAS Data Files - A video tutorial<br />Read more @ <br /> SAS Add-in to Microsoft Office<br />SAS Add-In for Microsoft Office enables business users to trans-parently leverage the power of SAS data access, reporting and analytics directly from Microsoft Office via integrated menus and toolbars.SAS Add-in to Microsoft Office Video Tutorial 1SAS Add-in to Microsoft Office Video Tutorial 2A document that discusses SAS Add-in to Microsoft Office<br />Read more @ <br /> <br />SAS Certification Preparation Guide for SAS 9<br />SAS Certification Preparation Guide <br />Read more @ <br /> SAS Publishing - SAS 9.1 Programming I & II Course...<br />Sas Publishing - Sas 9.1 Programming I Essentials Course Notes (2005) <br />Read more @ <br />Use SAS function Propcase() to streamline Google Contacts<br />You might think I am crazy...but I have been using this macro for a long time to fix some contacts in my Google Contacts...I get a little irritated when I can't find a particular person by I wrote this macro...This macro takes for Input a .csv file that is exported from Google Contacts and outputs a file that is ready to be imported to Google Contacts....often I wanted to have Names in the proper case...Try it yourself and let me know if it needs any tweaks...Propcase in SAS Documentation.<br />%macro organizeGoogleContacts(infile,outfile);<br />/*Import your contacts into SAS */ <br />data googlegroups;<br />infile " &infile" dlm=',' dsd lrecl=32767 firstobs=2;<br />Read more @ <br /> SAS Macro to Create a delimited text file from a SAS dataset...<br />A document that discusses SAS Macro to Create a delimited text file from a SAS data set.. <br />options mprint;<br /> <br />data one;<br />  input id name :$20. amount ;<br />  date=today();<br />  format amount dollar10.2 <br />           date mmddyy10.;<br />  label id=" Customer ID Number" ;<br />datalines;<br />1 Grant   57.23<br />2 Michael 45.68<br />3 Tammy   53.21<br />;<br />Read more @ <br /> How can I create a CSV file with ODS?<br />A document that discusses How can I create a CSV file with ODS? <br />/* example 1: Release 8.1 */ <br />   ods xml body='c: est est.csv' type=csv;<br />   proc print data=sashelp.class;<br />   run;<br />   ods xml close;<br />Read more @ <br />Use a Microsoft Excel file to create a user-defined format<br />A document that discusses Use a Microsoft Excel file to create a user-defined format /*Create an Excel spreadsheet for the example. */ <br />filename test 'c: estfmt.csv';<br />proc export data=sashelp.class outfile=test<br />  dbms=csv replace;<br />run;<br />Read more @ <br />SAS Macro to split a dataset into multiple datasets vertically with a common primary key<br />This macro splits a dataset to multiple datasets vertically with a common primary key. For eg, a dataset has 400 fields and 20,000 records. If we can split the dataset into two, with 200 fields and 20,000 records in each dataset with a common field like loan number as primary key would be helpful to load the details for analysis.<br /> <br />/**<br />To be called like this...<br />%splitdsnverticallykey(dsn,varperdsn,keyvars=);<br />eg. %splitdsnverticallykey(sashelp.vtable,4,keyvars=memname libname);<br /> <br />Where -----------<br /> <br />dsn - libname.datasetname to be split<br />varperdsn - How many vars per dsn excluding the key variables<br />keyvars - specify the primary key variables<br />*/ <br />Read more @ <br /> SAS Certification Base SAS Practice Exam<br />SAS BASE Programming Exam <br />Read more @ <br /> SAS Certification Advanced SAS Practice Exam<br />Sample Advanced SAS Exam <br />Read more @ <br /> Other interesting SAS Blogs for references...<br />Here are some other interesting SAS Blogs for references...<br />Read more @ <br />SAS Macro that reads the filenames available at a particular directory on any FTP server (i.e. Windows Network Drive/Unix/Mainframe)<br />Here's a macro that reads the filenames available at a particular directory on any FTP server (i.e. Windows Network Drive/Unix/Mainframe)...<br />For Windows network drives we use the Filename Pipe Statement<br />For Mainframe and Unix we use the FileName FTP protocol statement.<br />For further reference please refer to Filename statements in SAS Documentation.<br />First we need to create 2 Excel files <br />ServerList.xls – 3 columns with servertype | host | sourcedir<br />Read more @<br />