See: CIMPORT Procedure in the documentation for your operating environment.
PROC CIMPORT destination = libref < libref .> member- name < option(s) >;
EXCLUDE SAS file(s) catalog entry(s) </ MEMTYPE= mtype ></
ENTRYTYPE= entry-type >;
SELECT SAS file(s) catalog entry(s) </ MEMTYPE= mtype ></
ENTRYTYPE= entry-type >;
PROC CIMPORT destination = libref < libref .> member-name < option(s) >;
To do this | Use this option | |
---|---|---|
Identify the input transport file | ||
Specify a previously defined fileref or the filename of the transport file to read | INFILE= | |
Read the input transport file from a tape | TAPE | |
Select files to import | ||
Exclude specified entry types from the import process | EET= | |
Specify entry types to import | ET= | |
Control the contents of the transport file | ||
Import a SAS file without changing the created and modified date and time | DATECOPY | |
Specify whether to extend by 1 byte the length of short numerics (less than 8 bytes) when you import them | EXTENDSN= | |
Specify that only data sets, only catalogs, or both, be moved when a library is imported | MEMTYPE= | |
Enable access to a locked catalog | FORCE | |
Create a new catalog for the imported transport file, and delete any existing catalog with the same name | NEW | |
Import SAS/AF PROGRAM and SCL entries without edit capability | NOEDIT | |
Suppress the importing of source code for SAS/AF entries that contain compiled SCL code | NOSRC |
destination = libref < libref. > member-name
identifies the type of file to import and specifies the specific catalog, SAS data set, or SAS data library to import.
destination
identifies the file or files in the transport file as a single catalog, as a single SAS data set, or as the members of a SAS data library. The destination argument can be one of the following:
CATALOG CAT C
DATA DS D
LIBRARY LIB L
libref < libref. > member-name
specifies the specific catalog, SAS data set, or SAS data library as the destination of the transport file. If the destination argument is CATALOG or DATA, you can specify both a libref and a member name. If the libref is omitted, PROC CIMPORT uses the default library as the libref , which is usually the WORK library. If the destination argument is LIBRARY, specify only a libref .
DATECOPY
copies the SAS internal date and time when the SAS file was created and the date and time when it was last modified to the resulting destination file. Note that the operating environment date and time are not preserved.
Restriction: DATECOPY can be used only when the destination file uses the V8 or V9 engine.
Tip: You can alter the file creation date and time with the DTC= option on the MODIFY statement MODIFY Statement on page 344 in a PROC DATASETS step.
EET=( etype(s) )
excludes specified entry types from the import process. If the etype is a single entry type, then you can omit the parentheses. Separate multiple values with spaces.
Interaction: You cannot specify both the EET= option and the ET= option in the same PROC CIMPORT step.
ET=( etype(s) )
specifies the entry types to import. If the etype is a single entry type, then you can omit the parentheses. Separate multiple values with spaces.
Interaction: You cannot specify both the EET= option and the ET= option in the same PROC CIMPORT step.
EXTENDSN=YES NO
specifies whether to extend by 1 byte the length of short numerics (fewer than 8 bytes) when you import them. You can avoid a loss of precision when you transport a short numeric in IBM format to IEEE format if you extend its length. You cannot extend the length of an 8-byte short numeric.
Default: YES
Restriction: This option applies only to data sets.
Tip: Do not store fractions as short numerics.
FORCE
enables access to a locked catalog. By default, PROC CIMPORT locks the catalog that it is updating to prevent other users from accessing the catalog while it is being updated. The FORCE option overrides this lock, which allows other users to access the catalog while it is being imported, or allows you to import a catalog that is currently being accessed by other users.
CAUTION:
The FORCE option can lead to unpredictable results. The FORCE option allows multiple users to access the same catalog entry simultaneously .
INFILE= fileref filename
specifies a previously defined fileref or the filename of the transport file to read. If you omit the INFILE= option, then PROC CIMPORT attempts to read from a transport file with the fileref SASCAT. If a fileref SASCAT does not exist, then PROC CIMPORT attempts to read from a file named SASCAT.DAT.
Alias: FILE=
Featured in: Example 1 on page 220.
MEMTYPE= mtype
specifies that only data sets, only catalogs, or both, be moved when a SAS library is imported. Values for mtype can be
ALL
both catalogs and data sets
CATALOG CAT
catalogs
DATA DS
SAS data sets
NEW
creates a new catalog to contain the contents of the imported transport file when the destination you specify has the same name as an existing catalog. NEW deletes any existing catalog with the same name as the one you specify as a destination for the import. If you do not specify NEW, and the destination you specify has the same name as an existing catalog, PROC CIMPORT appends the imported transport file to the existing catalog.
NOEDIT
imports SAS/AF PROGRAM and SCL entries without edit capability.
You obtain the same results if you create a new catalog to contain SCL code by using the MERGE statement with the NOEDIT option in the BUILD procedure of SAS/AF software.
Note: The NOEDIT option affects only SAS/AF PROGRAM and SCL entries. It does not affect FSEDIT SCREEN and FSVIEW FORMULA entries.
Alias: NEDIT
NOSRC
suppresses the importing of source code for SAS/AF entries that contain compiled SCL code.
You obtain the same results if you create a new catalog to contain SCL code by using the MERGE statement with the NOSOURCE option in the BUILD procedure of SAS/AF software.
Alias: NSRC
Interaction: PROC CIMPORT ignores the NOSRC option if you use it with an entry type other than FRAME, PROGRAM, or SCL.
TAPE
reads the input transport file from a tape.
Default: PROC CIMPORT reads from disk.
Excludes specified files or entries from the import process.
Tip: There is no limit to the number of EXCLUDE statements you can use in one invocation of PROC CIMPORT.
Interaction: You can use either EXCLUDE statements or SELECT statements in a PROC CIMPORT step, but not both.
EXCLUDE SAS file(s) catalog entry(s) </ MEMTYPE= mtype ></ ENTRYTYPE= entry-type >;
SAS file(s) catalog entry(s)
specifies either the name(s) of one or more SAS files or the name(s) of one or more catalog entries to be excluded from the import process. Specify SAS filenames if you import a data library; specify catalog entry names if you import an individual SAS catalog. Separate multiple filenames or entry names with a space. You can use shortcuts to list many like-named files in the EXCLUDE statement. For more information, see Shortcuts for Specifying Lists of Variable Names on page 24.
ENTRYTYPE= entry-type
specifies a single entry type for the catalog entry(s) listed in the EXCLUDE statement. See SAS Language Reference: Concepts for a complete list of catalog entry types.
Restriction: ENTRYTYPE= is valid only when you import an individual SAS catalog.
Alias: ETYPE=, ET=
MEMTYPE= mtype
specifies a single member type for the SAS file(s) listed in the EXCLUDE statement. Values for mtype can be
ALL
both catalogs and data sets
CATALOG
catalogs
DATA
SAS data sets.
You can also specify the MEMTYPE= option, enclosed in parentheses, immediately after the name of a file. In parentheses, MEMTYPE= identifies the type of the filename that just precedes it. When you use this form of the option, it overrides the MEMTYPE= option that follows the slash in the EXCLUDE statement, but it must match the MEMTYPE= option in the PROC CIMPORT statement.
Restriction: MEMTYPE= is valid only when you import a SAS data library.
Alias: MTYPE=, MT=
Default: ALL
Specifies individual files or entries to import.
Tip: There is no limit to the number of SELECT statements you can use in one invocation of PROC CIMPORT.
Interaction: You can use either EXCLUDE statements or SELECT statements in a PROC CIMPORT step, but not both.
Featured in: Example 2 on page 221
SELECT SAS file(s) catalog entry(s) </ MEMTYPE= mtype ></ ENTRYTYPE= entry-type >;
SAS file(s) catalog entry(s)
specifies either the name(s) of one or more SAS files or the name(s) of one or more catalog entries to import. Specify SAS filenames if you import a data library; specify catalog entry names if you import an individual SAS catalog. Separate multiple filenames or entry names with a space. You can use shortcuts to list many like-named files in the SELECT statement. For more information, see Shortcuts for Specifying Lists of Variable Names on page 24.
ENTRYTYPE= entry-type
specifies a single entry type for the catalog entry(s) listed in the SELECT statement. See SAS Language Reference: Concepts for a complete list of catalog entry types.
Restriction: ENTRYTYPE= is valid only when you import an individual SAS catalog.
Alias: ETYPE=, ET=
MEMTYPE= mtype
specifies a single member type for the SAS file(s) listed in the SELECT statement. Valid values are CATALOG or CAT, DATA, or ALL.
You can also specify the MEMTYPE= option, enclosed in parentheses, immediately after the name of a file. In parentheses, MEMTYPE= identifies the type of the filename that just precedes it. When you use this form of the option, it overrides the MEMTYPE= option that follows the slash in the SELECT statement, but it must match the MEMTYPE= option in the PROC CIMPORT statement.
Restriction: MEMTYPE= is valid only when you import a SAS data library.
Alias: MTYPE=, MT=
Default: ALL