Chapter Contents

Previous

Next
CPORT

CPORT



Writes SAS data sets and catalogs into a special format in a transport file

Language element: procedure
OpenVMS specifics: name and location of transport file; creating a transport file on tape


Syntax
Details
Examples
Example 1: Exporting Data Sets and Catalogs to Disk
Example 2: Exporting Data Sets and Catalogs to Tape
See Also

Syntax

PROC CPORT source-type=libref<.member-name> <option-list>;

Note:   This is a simplified version of the CPORT procedure syntax. For the complete syntax and its explanation, see the CPORT procedure in SAS Procedures Guide.  [cautionend]

libref
specifies the name and location of the file to be transported.


Details

If you do not use the FILE= option and have not defined the reserved fileref SASCAT, a file named SASCAT.DAT is created in your default directory.

The CPORT procedure defaults to writing to a file on disk. If you want to write to a file on tape, you must use the TAPE option in the PROC CPORT statement.

Note:   You do not need to define the fileref SASCAT to your tape drive. You can choose any fileref, or you can let the file default to SASCAT.DAT, as it does for disk access.  [cautionend]

You do not need to use the /BLOCKSIZE=8000 option in the DCL MOUNT command, although it is recommended.


Examples

Example 1: Exporting Data Sets and Catalogs to Disk

The following is an example of using PROC CPORT to export all the data sets and catalogs from a data library on disk:

libname newlib 'SAS-data-library';
filename tranfile 'transport-file';
proc cport library=newlib file=tranfile;
run;
PROC CPORT writes the file TRANFILE to disk. This file contains the data sets and catalogs in the SAS data library NEWLIB in transport format.

Example 2: Exporting Data Sets and Catalogs to Tape

CAUTION:
You must use an unlabeled tape when writing to tape with the CPORT procedure.   [cautionend]
The following is an example of using PROC CPORT to export all the data sets and catalogs in a data library on tape and then mount the tape onto the tape drive:
x 'alloc tape-drive sastape';
x 'mount/for sastape';
libname newlib 'SAS-data-library';
filename tranfile 'sastape';

proc cport library=newlib file=tranfile tape;
run;
PROC CPORT writes the file TRANFILE to tape. This file contains the data sets and catalogs in the SAS data library NEWLIB in transport format.

See Also


Chapter Contents

Previous

Next

Top of Page

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