Return to Archive

SAS Tip of the Month
September 2006

The last few months have been very busy, finishing off projects for clients, talking a well-deserved break and learning a few new things with SAS and another software package called 'R'. Over the coming months I will pass on some of my new knowledge that I have found useful. Before anyone asks me if I am looking at doing something other than SAS, the answer is no. In my 20 plus years of using SAS I have learnt some of its strengths and weaknesses therefore it is interesting to learn about other software packages and see how they may fill some of the gaps.

This month starts with a very useful SAS option, FORMCHAR. This SAS option sets the characters to be used to build tabular output outlines and dividers for procedures such as the CALENDAR, FREQ, PLOT, REPORT and TABULATE procedures. Its' syntax is:

FORMCHAR = "string";

where the string is a set of 11 characters that set the following:

    Position  Description
    ------------------------
       1      vertical bar
       2      horizontal bar
       3      upper left
       4      upper middle
       5      upper right
       6      middle left
       7      middle middle
       8      middle right
       9      lower left
       10     lower middle
       11     lower right

Positions 3 to 11 are used mainly in drawing boxes. The default string has changed over the years from release to release but a good basic string is

    FORMCHAR = "|----|+|---";

The default string can also be set using hex values as the following example illustrates:

    FORMCHAR = "82838485868788898A8B8C"x;
________________________________
Updated September 1, 2006