Syntax: CPORT Procedure


See: CPORT Procedure in the documentation for your operating environment.

PROC CPORT source-type = 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 >;

  • TRANTAB NAME= translation-table-name

    • < option(s) >;

PROC CPORT Statement

PROC CPORT source-type = libref < libref .> member-name < option(s) >;

To do this

Use this option

Identify the transport file

 

Specify the transport file to write to

FILE=

 

Direct the output from PROC CPORT to a tape

TAPE

Select files to export

 

Export copies of all data sets or catalog entries that have a modification date equal to or later than the date you specify

AFTER=

 

Exclude specified entry types from the transport file

EET=

 

Include specified entry types in the transport file

ET=

 

Specify whether to export all generations of a data set

GENERATION=

 

Specify that only data sets, only catalogs, or both, be moved when a library is exported

MEMTYPE=

Control the contents of the transport file

 

Suppress the conversion of displayed character data to transport format

ASIS

 

Control the exportation of integrity constraints

CONSTRAINT

 

Copy the created and modified date and time to the transport file

DATECOPY

 

Control the exportation of indexes with indexed SAS data sets

INDEX

 

Suppress the compression of binary zeros and blanks in the transport file

NOCOMPRESS

 

Write all alphabetic characters to the transport file in uppercase

OUTTYPE= UPCASE

 

Translate specified characters from one ASCII or EBCDIC value to another

TRANSLATE

Export SAS/AF PROGRAM and SCL entries without edit capability when you import them

NOEDIT

Specify that exported catalog entries contain compiled SCL code, but not the source code

NOSRC

Specify a libref associated with a SAS data library

OUTLIB=

Required Arguments

source-type = libref < libref. > member-name

  • identifies the type of file to export and specifies the catalog, SAS data set, or SAS data library to export.

    source-type

    • identifies the file(s) to export as a single catalog, as a single SAS data set, or as the members of a SAS data library. The source-type 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 to export. If source-type is CATALOG or DATA, you can specify both a libref and a member name. If the libref is omitted, PROC CPORT uses the default library as the libref , which is usually the WORK library. If the source-type argument is LIBRARY, specify only a libref . If you specify a library, PROC CPORT exports only data sets and catalogs from that library. You cannot export other types of files.

Options

AFTER= date

  • exports copies of all data sets or catalog entries that have a modification date later than or equal to the date you specify. The modification date is the most recent date when the contents of the data set or catalog entry changed. Specify date as a SAS date literal or as a numeric SAS date value.

    Tip: You can determine the modification date of a catalog entry by using the CATALOG procedure.

    Featured in: Example 5 on page 294.

ASIS

  • suppresses the conversion of displayed character data to transport format. Use this option when you move files that contain DBCS (double-byte character set) data from one operating environment to another if both operating environments use the same type of DBCS data.

    Interaction: The ASIS option invokes the NOCOMPRESS option.

    Interaction: You cannot use both the ASIS option and the OUTTYPE= options in the same PROC CPORT step.

CONSTRAINT=YES NO

  • controls the exportation of integrity constraints that have been defined on a data set. When you specify CONSTRAINT=YES, all types of integrity constraints are exported for a library; only general integrity constraints are exported for a single data set. When you specify CONTRAINT=NO, indexes created without integrity constraints are ported, but neither integrity constraints nor any indexes created with integrity constraints are ported. For more information on integrity constraints, see the section on SAS files in SAS Language Reference: Concepts .

    Alias: CON=

    Default: YES

    Interaction: You cannot specify both CONSTRAINT= and INDEX= in the same PROC CPORT step.

    Interaction: If you specify INDEX=NO, no integrity constraints are exported.

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 transport 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 transport file. If etype is a single entry type, then you can omit the parentheses. Separate multiple values with a space.

    Interaction: You cannot use both the EET= option and the ET= option in the same PROC CPORT step.

ET=( etype(s) )

  • includes specified entry types in the transport file. If etype is a single entry type, then you can omit the parentheses. Separate multiple values with a space.

    Interaction: You cannot use both the EET= option and the ET= option in the same PROC CPORT step.

FILE= fileref filename

  • specifies a previously defined fileref or the filename of the transport file to write to. If you omit the FILE= option, then PROC CPORT writes to the fileref SASCAT, if defined. If the fileref SASCAT is not defined, PROC CPORT writes to SASCAT.DAT in the current directory.

    Note: The behavior of PROC CPORT when SASCAT is undefined varies from one operating environment to another. For details, see the SAS documentation for your operating environment.

    Featured in: All examples.

GENERATION=YES NO

  • specifies whether to export all generations of a SAS data set. To export only the base generation of a data set, specify GENERATION=NO in the PROC CPORT statement. To export a specific generation number, use the GENNUM= data set option when you specify a data set in the PROC CPORT statement. For more information on generation data sets, see SAS Language Reference: Concepts .

    Note: PROC CIMPORT imports all generations of a data set that are present in the transport file. It deletes any previous generation set with the same name and replaces it with the imported generation set, even if the number of generations does not match.

    Alias: GEN=

    Default: YES for libraries; NO for single data sets

INDEX=YES NO

  • specifies whether to export indexes with indexed SAS data sets.

    Default: YES

    Interaction: You cannot specify both INDEX= and CONSTRAINT= in the same PROC CPORT step.

    Interaction: If you specify INDEX=NO, no integrity constraints are exported.

INTYPE= DBCS-type

  • specifies the type of DBCS data stored in the SAS files to be exported. Double-byte character set (DBCS) data uses up to two bytes for each character in the set. DBCS-type must be one of the following values:

    IBM HITAC

    FACOM

    for z/OS

    IBM

    for VSE

    DEC SJIS

    for OpenVMS

    PCIBM SJIS

    for OS/2

    Restriction The INTYPE= option is allowed only if SAS is built with Double-Byte Character Set (DBCS) extensions. Because these extensions require significant computing resources, there is a special distribution for those sites that require it. An error is reported if this option is used at a site for which DBCS extensions are not enabled.

    Default: If the INTYPE= option is not used, the DBCS type defaults to the value of the SAS system option DBCSTYPE=.

    Interaction: Use the INTYPE= option in conjunction with the OUTTYPE= option to change from one type of DBCS data to another.

    Interaction: The INTYPE= option invokes the NOCOMRPESS option.

    Interaction: You cannot use the INTYPE= option and the ASIS option in the same PROC CPORT step.

    Tip: You can set the value of the SAS system option DBCSTYPE= in your configuration file.

MEMTYPE= mtype

  • restricts the type of SAS file that PROC CPORT writes to the transport file. MEMTYPE= restricts processing to one member type. Values for mtype can be

    ALL

    • both catalogs and data sets

  • CATALOG CAT

    • catalogs

  • DATA DS

    • SAS data sets

  • Alias: MT=

    Default: ALL

    Featured in: Example 1 on page 290.

NOCOMPRESS

  • suppresses the compression of binary zeros and blanks in the transport file.

    Alias: NOCOMP

    Default: By default, PROC CPORT compresses binary zeros and blanks to conserve space.

    Interaction: The ASIS, INTYPE=, and OUTTYPE= options invoke the NOCOMPRESS option.

    Note: Compression of the transport file does not alter the flag in each catalog and data set that indicates whether the original file was compressed.

NOEDIT

  • exports SAS/AF PROGRAM and SCL entries without edit capability when you import them.

    The NOEDIT option produces the same results as when 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 or FSVIEW FORMULA entries.

    Alias: NEDIT

NOSRC

  • specifies that exported catalog entries contain compiled SCL code but not the source code.

    The NOSRC option produces the same results as when 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

OUTLIB= libref

  • specifies a libref associated with a SAS data library. If you specify the OUTLIB= option, PROC CIMPORT is invoked automatically to re-create the input data library, data set, or catalog in the specified library.

    Alias: OUT=

    Tip: Use the OUTLIB= option when you change SAS files from one DBCS type to another within the same operating environment if you want to keep the original data intact.

OUTTYPE=UPCASE

  • writes all displayed characters to the transport file and to the OUTLIB= file in uppercase.

    Interaction: The OUTTYPE= option invokes the NOCOMPRESS option.

TAPE

  • directs the output from PROC CPORT to a tape.

    Default: The output from PROC CPORT is sent to disk.

TRANSLATE=( translation-list )

  • translates specified characters from one ASCII or EBCDIC value to another. Each element of translation-list has the form

    • ASCII-value-1 TO ASCII-value-2

      EBCDIC-value-1 TO EBCDIC-value-2

  • You can use hexadecimal or decimal representation for ASCII values. If you use the hexadecimal representation, values must begin with a digit and end with an x. Use a leading zero if the hexadecimal value begins with an alphabetic character.

    For example, to translate all left brackets to left braces, specify the TRANSLATE= option as follows (for ASCII characters):

     translate=(5bx to 7bx) 

    The following example translates all left brackets to left braces and all right brackets to right braces:

     translate=(5bx to 7bx 5dx to 7dx) 

EXCLUDE Statement

Excludes specified files or entries from the transport file.

Tip: There is no limit to the number of EXCLUDE statements you can use in one invocation of PROC CPORT.

Interaction: You can use either EXCLUDE statements or SELECT statements in a PROC CPORT step, but not both.

EXCLUDE SAS file(s) catalog entry(s) </ MEMTYPE= mtype ></

  • ENTRYTYPE= entry-type >;

Required Arguments

SAS file(s) catalog entry(s)

  • specifies either the name(s) of one or more SAS files or the names of one or more catalog entries to be excluded from the transport file. Specify SAS filenames when you export a SAS data library; specify catalog entry names when you export 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.

Options

ENTRYTYPE= entry-type

  • specifies a single entry type for the catalog entries 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 export an individual SAS catalog.

    Alias: ETYPE=, ET=

MEMTYPE= mtype

  • specifies a single member type for the SAS file(s) listed in the EXCLUDE statement. Valid values are CATALOG or CAT, DATA, or ALL. If you do not specify the MEMTYPE= option in the EXCLUDE statement, then processing is restricted to those member types specified in the MEMTYPE= option in the PROC CPORT statement.

    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 file name 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 CPORT statement:

    Restriction: MEMTYPE= is valid only when you export a SAS data library.

    Restriction: If you specify a member type for MEMTYPE= in the PROC CPORT statement, it must agree with the member type that you specify for MEMTYPE= in the EXCLUDE statement.

    Alias: MTYPE=, MT=

    Default: If you do not specify MEMTYPE= in the PROC CPORT statement or in the EXCLUDE statement, the default is MEMTYPE=ALL.

SELECT Statement

Includes specified files or entries in the transport file.

Tip: There is no limit to the number of SELECT statements you can use in one invocation of PROC CPORT.

Interaction: You can use either EXCLUDE statements or SELECT statements in a PROC CPORT step, but not both.

Featured in: Example 2 on page 291

SELECT SAS file(s) catalog entry(s) </ MEMTYPE= mtype ></

  • ENTRYTYPE= entry-type >;

Required Arguments

SAS file(s) catalog entry(s)

  • specifies either the name(s) of one or more SAS files or the names of one or more catalog entries to be included in the transport file. Specify SAS filenames when you export a SAS data library; specify catalog entry names when you export 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.

Options

ENTRYTYPE= entry-type

  • specifies a single entry type for the catalog entries 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 export 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. If you do not specify the MEMTYPE= option in the SELECT statement, then processing is restricted to those member types specified in the MEMTYPE= option in the PROC CPORT statement.

    You can also specify the MEMTYPE= option, enclosed in parentheses, immediately after the name of a member. In parentheses, MEMTYPE= identifies the type of the member name 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 CPORT statement.

    Restriction: MEMTYPE= is valid only when you export a SAS data library.

    Restriction: If you specify a member type for MEMTYPE= in the PROC CPORT statement, it must agree with the member type that you specify for MEMTYPE= in the SELECT statement.

    Alias: MTYPE=, MT=

    Default: If you do not specify MEMTYPE= in the PROC CPORT statement or in the SELECT statement, the default is MEMTYPE=ALL.

TRANTAB Statement

Specifies translation tables for characters in catalog entries you export.

Tip: You can specify only one table for each TRANTAB statement, but there is no limit to the number of TRANTAB statements you can use in one invocation of PROC CPORT.

Featured in: Example 4 on page 293.

See: The TRANTAB Statement for the CPORT Procedure and the UPLOAD and DOWNLOAD Procedures in SAS National Language Support (NLS): User s Guide

TRANTAB NAME= translation-table-name

  • < option(s) >;




Base SAS 9.1.3 Procedures Guide (Vol. 1)
Base SAS 9.1 Procedures Guide, Volumes 1, 2, 3 and 4
ISBN: 1590472047
EAN: 2147483647
Year: 2004
Pages: 260

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