Skip to content

Sample SAS File Documentation

/*!
 *    This sample file illustrates the recommended comment blocks 
 *    that can be used in a SAS file.
 *    <p>
 *    This file does not have any useful implementation. So, don't 
 *    bother executing it.
 *
 *    @author         Choon-Chern Lim (Mike)
 *    @created        01/01/2085
 */

/**
 *    General utility file. Used for sending email.
 */
%include "c:\sas\utility.sas";

/**
 *    Common setup such as filename, options, etc...
 */
%include "c:\sas\setup.sas";

/**
 *    This is "mydatabase" MS SQL Server database.
 */
libname mssql oledb bcp=yes provider=sqloledb dsn='myserver' 
        properties=("Integrated Security"=SSPI 
                    "Persist Security Info"=True
                    "Initial Catalog"=mydatabase) schema=dbo access=readonly;

/**
 *    Data storage for project M1304.
 */
libname proj "c:\project\m1304\data";

/**
 *    Displays hello world in the console
 */
%macro helloWorld;
   ... some implementation
%mend;

/**
 *    Displays goodbye world in the console.
 *  
 *    @param  name    Person to say goodbye to.
 */
%macro goodbyeWorld(name=);
   ... some implementation
%mend;

/**
 *    Sends a welcome email to a specified person.
 *    
 *    @param  name    Person to say welcome to.
 *    @return 1 if successful, 0 otherwise.
 */
%macro welcomeBack(name=);
   ... some implementation
%mend;
%d bloggers like this: