Procedure Syntax


Requirements: The name and location of an output data set and the complete path for the input data file.

Reminder: The single quotes surrounding field identifiers are optional when the field identifiers follow the SAS naming convention. Single quotes are required for field identifiers that are non-standard SAS names. When field identifiers placed in single quotes are non-standard SAS names, the field identifiers are converted to a standard SAS name in the traditional map data set. For more information about the standard SAS naming convention, see names in the SAS Language in SAS Language Reference: Concepts . For more information on how invalid field identifiers placed in single quotes are renamed , see the SAS System option VALIDVARNAME in SAS/ACCESS for Relational Databases: Reference .

PROC MAPIMPORT

  • <OUT= traditional-map-data-set

  • <DATAFILE= path-to- shapefile

  • <CONTENTS>;

  • <CREATE_ID_>;

  • <SELECT < > field-identifier-1 < ><...< > field-identifier-n < >>>;

  • <EXCLUDE < > field-identifier-1 < ><...< > field-identifier-n < >>>;

  • <RENAME < > field-identifier-1 < >= SAS-variable-name-1 <...< > field-identifier-

  • n < >= SAS-variable-name-n >>;

PROC MAPIMPORT Statement

Identifies the input ESRI SHAPEFILE and converts this map into a SAS/GRAPH traditional map data set.

Requirements: The name and location of an output data set and the complete path for the input data file.

PROC MAPIMPORT

  • OUT= traditional-map-data-set

  • DATAFILE= path-to-shapefile

  • <CONTENTS>;

  • <CREATE_ID_>;

  • <SELECT < > field-identifier-1 < ><...< > field-identifier-n < >>>;

  • <EXCLUDE < > field-identifier-1 < ><...< > field-identifier-n < >>>;

  • <RENAME < > field-identifier-1 < >= SAS-variable-name-1 <...< > field-identifier-

  • n < >= SAS-variable-name-n >>;

Required Arguments

OUT= traditional-map-data-set

  • specifies the name of the traditional map data set created.

DATAFILE= path-to-shapefile

  • specifies the path and filename of the shapefile that is read and processed .

Note: By default, all of the fields in a shapefile are included in the traditional map data set. To only include specific fields in the traditional map data set, use the SELECT statement. To exclude specific fields from being in the traditional map data set, use the EXCLUDE statement .

Optional Argument

CONTENTS

  • displays information about the SHAPEFILE, including field identifier names and types.

CREATE_ID_

  • creates a map ID variable named _ID_ with a unique value for each polygon in the map. This variable will be created automatically if the .dbf file is missing.

Optional Statements

SELECT field-identifier-n

  • selects only the specified fields in the SHAPEFILE to be included in the traditional map data set.

EXCLUDE field-identifier-n

  • excludes the specified fields in the SHAPEFILE from being in the traditional map data set.

RENAME field-identifier-n= SAS-variable-name-1

  • renames the specified fields in the traditional map data set. By default the field identifiers in the SHAPEFILE will be the SAS variable names in the traditional map data set.

Note: Field identifiers that are invalid SAS variable names must be placed in single quotes. A field identifier placed in single quotes will be automatically renamed to a valid SAS variable name using the SELECT or EXCLUDE statement. To change the field identifier to a specific valid SAS variable name, use the RENAME statement.




SAS.GRAPH 9.1 Reference, Volumes I and II
SAS.GRAPH 9.1 Reference, Volumes I and II
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 342

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net