Previous Page | Next Page

The GREMOVE Procedure

BY Statement


Lists the variable or variables that identify the new unit areas.
Requirements: At least one variable is required.
See also: BY Statement.
Featured in: Removing State Boundaries from U.S. Map.


Syntax

BY <DESCENDING>variable-l
<...<DESCENDING>variable-n>
<NOTSORTED>;


Required Arguments

variable(s)

identifies one or more variables in the input map data set that define the new unit areas. Variable(s) can be either numeric or character.

The BY variables in the input map data set become the ID variables for the output map data set.


Options

DESCENDING

indicates that the input map data set is sorted in descending order. By default, the GREMOVE procedure expects all BY-variable values to appear in ascending order.

This option affects only the variable that immediately follows the option.

NOTSORTED

indicates that observations with the same BY-variable values are to be grouped as they are encountered without regard for whether the values are in alphabetical or numerical order. NOTSORTED can appear anywhere in the BY statement. It affects all of the variables that are specified in the statement. NOTSORTED overrides DESCENDING if both appear in the same BY statement.


Ordering Observations

To sort the input map data set, use the SORT procedure in Base SAS, for example

/* arrange the observations in desired order */
proc sort data=mapdata out=mapsort;
   by state;
run;
   /* remove the county boundaries              */
proc gremove data=mapsort out=newmap;
   by state;
   id county;
run;

Notice that the GREMOVE procedure uses the same BY statement as the SORT procedure.

See the Base SAS Procedures Guide for further information on the SORT procedure.

Note:   If an observation is encountered for which the BY-variable value is out of the proper order, the GREMOVE procedure stops and issues an error message.  [cautionend]

Previous Page | Next Page | Top of Page