Introduction
One of the tasks involved in proper documentation is selecting the derived
variables and associating them to the SAS programs. The SAS code segment and
associated comments can later be automatically captured with the %vardef
tool. The %vardef tool can be automated if the variable definition is done
in a standardized documentation style. The variable
selection makes it easy for standardization since it automates the process by marking the
SAS programs with the standardized documentation style.
This tool is found in the documentation portion of the study conduct area. It
consists of the following functions:
- Select the SAS Program
- Define the Start of the Definition
- Define the End of the Definition
- Enter Variable Definition Text (Optional)
- Select the SAS Data Set
- Select the Derived Variable
Select the SAS Program
The first dialog box which appears allows you to select the SAS program which
contains the derived variable.

Select one program from the list. There are three definition types:
- Variable Definition Text Selection - Selection of descriptive text which is
usually a SAS comment in the program describing how the variable is defined.
- Variable Definition Enter Text - Enter new descriptive text which is usually a
SAS comment in the program describing how the variable is defined.
- SAS Definition - Selection of SAS code segment which actually defines the
derived variable.
Select the definition type which is intended for the next selection.
Define the Start of the Definition
The next dialog box shows the entire SAS program. It supplies buttons which
can be selected to indicate the start of the definition.

Scroll if necessary before selecting the line items which mark the beginning of the
variable definition. Note that comments will be inserted before the selected line.
Define the End of the Definition
Select the end arrow button indicating the end of the definition.

Note that the program in the display is a partial view to show only the selected
section. The three dots indicate that there is more code which is not shown.
Enter Variable Definition Text (Optional)
The variable definition has two options. This includes selecting SAS
comments which already appear in the program or entering new text which will be inserted
into the program. The option to enter new variable definition text is available on
the first dialog box by selecting the radio button labeled "Variable Definition -
Enter Text". Once the starting position has been selected, a dialog box is
shown for new text entries as shown here:

Comments entered will be captured as the variable definition, and the same text will be
inserted into the SAS program as comments.
Select the SAS Data Set
Select the dataset which contains the derived variable of interest. Only
one dataset is allowed at a time.

Click on the next button after selection has been made.
Select the Derived Variable
The last step is to select the derived variable of interest. Note that
multiple variables can be selected at once. This applies if the definition block
pertains to more than one variable.

Click on the finish button once variables have been selected.
|