Documentation Style

 

Introduction
The goal of SAS programming documentation is to communicate the pertinent information in a concise and accessible manner.   This is accomplished by delivering the documentation in a form that allows the reviewer to navigate to the portion which pertains to the derivation of a specific variable within a SAS dataset. 

The Trialex documentation tools will automate the creation of this documentation if certain standard commenting styles are established.  The system will automatically capture the comments and organize them in a hyperlinked document.  The following will describe the standard commenting style.

Style Specification

%*<Variable Definition: data.variable>*;
   ... /* comments */
%*</Variable Definition: data.variable>*;
%*<SAS Definition: data.variable>*;
   ... sas code
%*</SAS Definition: data.variable>*;
Where Represents...
Variable Definition This section refers to SAS comments.  This pertains to a variable specified in the data.variable parameter.
SAS Definition This section refers to SAS code.  This pertains to a variable specified in the var parameter.
data.variable This pertains to a SAS variable which is expressed by a two level dot notation.  The item proceeding the dot refers to the dataset name.   The item following the dot is the variable name.

Details
The comments styles defined in this section is used by the Trialex System to systematically document all programs.  Since an algorithm is applied to parse the information, it is crucial that the information entered is precise.  The following are some recommendations that may help in editing these comments.

  • Definitions (SAS or Variable) cannot overlap on top of one another -- use the multiple variable definition for the same block.
  • The beginning and the end of the strings recognized by the Trialex system are critical (i.e. ">*;").
  • Sometimes the creation of derived variables may be scattered in different sections of the program and may include several data and proc steps. In these cases, the same Variable and SAS definitions can be repeated for these multiple sections. The Trialex system will take these blocks of code or derivations and automatically regroup them with hyperlinks.

 

Example

%* <Variable Definition: a_ptinfo.ptid> *;

/* 
   This variable is defined by blah, blah
   blah, blah...                          
*/

%* </Variable Definition: a_ptinfo.ptid> *;

 

%* <SAS Definition: a_ptinfo.ptid> *;

   data a_ptinfo;
      set warehouse.ptid;
      ptid = put(pt,best.);
   run;

%* </SAS Definition: a_ptinfo.ptid> *;
 
     Meta-Xceed Inc.© 2007