Return to Archive

SAS Tip of the Month
July 2008

Sometimes you need to set all variables of an observation to blank, as you do when you are creating a blank dataset (in the LOG you will see at message coming up that variables are initialized). The following example creates a dataset with zero observations and uses the CALL MISSING routine to avoid the “initialized variable” message appearing:

    7 data PopulationData2008;
    8    attrib year length=8 label='Year'
    9    population length=8 format=comma10.
   10    label='Population Count';
   11    call missing(of _ALL_);
   12    delete;
   13 run;

NOTE: The data set WORK.POPULATIONDATA2008 has 0 observations and 2 variables.

Updated July 1, 2008