Chapter Contents

Previous

Next
Using Spatial Data with SAS/GIS Software

How Statements Are Processed

The GIS procedure supports RUN-group processing. RUN-group processing enables you to invoke the procedure, then submit additional procedure statements without submitting the PROC statement again.

In other SAS procedures that do not support RUN-group processing, a RUN statement that follows a block of submitted statements terminates the procedure. With RUN-group processing, a RUN statement executes the preceding block of statements, but the procedure remains active. You can continue to submit additional statements for the active procedure without resubmitting the PROC statement. For example, the following code invokes the GIS procedure, assigns a default catalog, and identifies the current spatial entry:

proc gis catalog=mymaps.region;
   spatial norwest;

Note:   The SPATIAL, CATALOG, LATTICE, COPY, MOVE, and SYNC statements are immediate statements for the GIS procedure. That is, they are always processed immediately and do not require a RUN statement (although including a RUN statement does not do any harm).  [cautionend]

After you invoke the GIS procedure, suppose that you also want to define composites. You can submit additional GIS procedure statements to define the composites without submitting a new PROC statement, as shown in the following example:

   composite create state / 
      class=state
      var=(left=statel,right=stater);
   composite create county / 
      class=area
      var=(left=countyl,right=countyr);
   composite create lat / 
      class=y var=y;
   composite create lon / 
      class=x var=x;
run;
You can end RUN-group processing and terminate the GIS procedure by submitting a QUIT statement:
quit;
Submitting another PROC step, a DATA step, or an ENDSAS statement also ends RUN-group processing and terminates the GIS procedure.

Note:   Certain error conditions may also terminate the GIS procedure. If this occurs, a message is printed in the SAS log.  [cautionend]


Data Set Names

You can specify a data set by its complete two-level name as in libref.data-set. If you omit libref, the data set is assumed to be in the library specified in the CATALOG= option in the PROC GIS statement or in the catalog that was specified by the most recent CATALOG statement.

Note:   If a one-level catalog name was used in the CATALOG= option or CATALOG statement, or if no default catalog has been named, the default library is WORK, for example, WORK.data-set.  [cautionend]


Catalog Entry Names

You can specify a GIS catalog entry by its complete three-level name, libref.catalog.entry. If you use only the one-level entry, the entry is assumed to be in the catalog that is specified in the CATALOG= option in the PROC GIS statement or in the catalog specified by the most recent CATALOG statement.

Note:   If the libref was omitted from the CATALOG= option or catalog statement, the default library is WORK. If no default catalog has been declared, and a one-level entry name is used, an error is written to the log because of insufficient information to identify the entry.  [cautionend]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.