Chapter Contents |
Previous |
Next |
SAS/CONNECT User's Guide |
PROC
UPLOAD<data-set-option(s)>
|
CONSTRAINT=NO |
DATA=local-SAS-data-set |
EXTENDSN=NO |
INDEX=NO |
OUT=OUT=remote-SAS-data-set |
TRANIN= |
TRANNET= |
TRANOUT= |
V6TRANSPORT |
ENTRYTYPE=etype |
EXTENDSN=NO |
INCAT=local-SAS-catalog |
OUTCAT=remote-SAS-catalog |
CONSTRAINT=NO |
EXTENDSN=NO |
GEN=YES |
INDEX=NO |
INLIB=local-SAS-library |
MEMTYPE=(mtype-list) |
OUTLIB=remote-SAS-library |
V6TRANSPORT |
BINARY |
INFILE=local-file-identifier |
OUTFILE=remote-file-identifier |
PROC UPLOAD Statement Options |
The following options can be used with the PROC UPLOAD statement. They are shown in alphabetical order.
This option is valid for transferring data sets, catalogs, and libraries. Its use results in data sets or catalog entries being transferred only if they have been modified on or after the specified date.
Note: This option is available in Releases 6.09E, 6.11
TS040, and later.
For example, the following statement causes the transfer of any data sets or catalog entries in the library ACCTS only if they have been modified on or after December 30, 1995.
proc upload inlib=accts outlib=accts after='30dec95'd status=no;
If your local session is using an earlier release of SAS that does not support this option, PROC UPLOAD produces the following message:
Warning: AFTER= option not supported by earlier release; option will be ignored.
Note: However, if the local host is running Release
6.11 TS020 or Release 6.08 TS415 through Release 6.08 TS430, the option is
ignored, but no warning is displayed.
The BINARY option prevents record delimiters from being inserted at each remote host record. In addition, if the remote host uses a different method of data representation, the BINARY option prevents any data translation such as conversion from ASCII to EBCDIC. See The BINARY Option for more information.
Note: By default, integrity constraints
are re-created when you upload a SAS library or when you upload a single SAS
data set and omit the OUT= option. If you specify the OUT= option with the
DATA= option, the integrity constraints are not re-created.
If you specify the name of a data view in the DATA= option, the materialized data is uploaded to the remote host, not the view definition.
If you do not use the DATA=, INCAT=, or INFILE= option, the last SAS data set that was created on the local host during your SAS session is uploaded.
If you use the DATA= option, you must either use the OUT= option or omit all other options.
Using the DATA= option, SAS/CONNECT supports the transfer of long-named members for data set transfers, as long as the host supports long member names.
In Version 6 style translation, translation occurs twice for every transmission. The data is translated from local to transport format, and then the receiving host translates from transport format to local format. Two translations occur for all data that is transferred.
When both the local host and the remote host are Version 7 or Version 8, the translation rules have changed. First, no translation occurs if both the remote and local hosts have the same machine representations. This prevents any unnecessary translation from occurring. If translation is needed, the receiving host translates the data directly into its native representation. So, when both the local and remote hosts are running Version 7 or Version 8, the data is translated only one time when translation is necessary and is not translated when both hosts have the same machine architecture.
INCAT=libref._ALL_ |
If you specify this form for the INCAT= option, you must specify the same form for the OUTCAT= option.
You can transfer catalogs with entries that contain graphics output as well as other catalog entries.
Using the INCAT= option, SAS/CONNECT supports the transfer of long-named members for catalog transfers, as long as the host supports long member names.
The following examples illustrate some valid pairs of these options:
INLIB= OUTLIB= |
INLIB= OUT= |
IN= OUT= |
IN= OUTDD= |
INDD= OUTDD= |
INDD= OUTLIB= |
If you specify the OUT= option with the DATA= option, the index is not re-created. To create an index for the output data set, use the INDEX= data set option in the data set name that you specify in the OUT= option to define the index. The INDEX= data set option is described in SAS Language Reference: Dictionary.
You must define the fileref before specifying the PROC UPLOAD statement. Refer to the SAS documentation for your local host for more information about this use of filerefs.
The following example demonstrates how to use a wildcard to transfer (upload) all files that have the extension .sas and are located in a directory on a remote UNIX host to a folder on a local PC.
filename locref 'c:\'; rsubmit; filename fref '/local/programs'; proc upload infile=locref('*.sas') outfile=fref; run; endrsubmit;
If you use the INFILE= option, you must also use the OUTFILE= option.
Using the OUT= option, SAS/CONNECT supports the transfer of long-named members for data set transfers, as long as the host supports long member names.
The OUT= option is a valid form of the OUTLIB= option. The UPLOAD procedure determines how to interpret the meaning of the OUT= option as follows:
For example, if the USER= option is set to MYLIB, the following statement uploads the data set A from the library MYLIB on the local host to the library MYLIB on the remote host:
proc upload data=a out=a; run;
For example, the following statement uploads the last data set that was created on the local host to the data set MYDATA in the library MYLIB on the remote host (assuming USER=MYLIB).
proc upload out=mydata; run;
For example, the following statement uploads all of the data sets and catalogs that are in the library A on the local host to the library RMTLIB on the remote host.
proc upload inlib=a out=rmtlib; run;
See Default Naming Conventions for Uploaded Data Sets for information about the effect of omitting the OUT= option.
OUTCAT=libref._ALL_ |
If you specify this form for the OUTCAT= option, you must specify the same form for the INCAT= option.
If you use the OUTCAT= option, you must also use the INCAT= option.
Using the OUTCAT= option, SAS/CONNECT supports the transfer of long-named members for catalog transfers, as long as the host supports long member names.
Note: If a wildcard (*) is used in the INFILE= option,
then OUTFILE=fileref should point to an aggregate storage location
such as a directory.
If you use the OUTFILE= option, you must also use the INFILE= option.
Note: The OUT= form of this option is the same as the
OUT= option that is used to specify a SAS data set. When you use this option,
the UPLOAD procedure determines whether the input option was DATA= or INLIB=
and processes the uploaded objects appropriately.
The OUTLIB= option must be used with the INLIB= option, but you can use any form of the OUTLIB= option with any form of the INLIB= option. Refer to the description of the INLIB= option for examples that illustrate some valid pairs of these options.
For example, you used FTP to transfer a data set from a UNIX machine to your local PC, and now you want to transfer the data set for use on a VAX. The data set is not in the native PC format (your local host), so the default translation table will not work. Using the TRANIN= option with PROC UPLOAD, you can specify a translation table that transfers the data from UNIX to the VAX.
The translation will take place on the local host before the data is transferred to the remote host. This option is equivalent to using the TRANTAB= data set option on the input data set.
Note: This option is only valid for data set transfers
between two Version 7 or Version 8 sessions and when the transfer is between
two hosts that have different machine architectures, which makes translation
necessary.
Note: This option is only valid for data set transfers
between two Version 7 or Version 8 sessions and when the transfer is between
two hosts that have different machine architectures, which makes translation
necessary.
For example, you are using a PC and would like to transfer a data set to a UNIX machine, and the OUTREP=VAX_VMS data set option is specified in a DATA statement. Using the TRANOUT= option with PROC UPLOAD, you can specify a translation table that transfers the data set from your local PC to the UNIX machine in a VAX format.
Note: This option is only valid for data set transfers
between two Version 7 or Version 8 sessions and when the transfer is between
two hosts that have different machine architectures, which makes translation
necessary.
When V6TRANSPORT is specified, the default behavior is to promote the length of numerics that are less than 8 bytes. The EXTENDSN=NO option may be used with the V6TRANSPORT option to prevent the lengths from being promoted.
When transferring files from Version 7 or Version 8 to Version 6, SAS/CONNECT checks that the files are Version 6 compliant. If the files are not Version 6 compliant, an error message is issued and the transfer is terminated. For example, a data set from a Version 7 or Version 8 session that contains a variable with a long name will not transfer because Version 6 does not support long variable names.
Data set and variable names are truncated if they exceed the Version 6 maximum. A warning message is issued about the truncation, but the transfer will continue.
In Version 6, the value of a character variable has a maximum length of 200. For Version 7 or Version 8, this maximum has been increased to 32K. Therefore, a Version 7 or Version 8 variable value that has a length greater than 200 will transfer to a Version 6 variable, but the value will be truncated to 200. A warning message is issued about the truncation, but the transfer will continue.
Default Naming Conventions for Uploaded Data Sets |
For example, suppose you submit the following statement:
libname orders local-host-SAS-data-library;
When you remote submit the following statements, the data set ORDERS.QTR1 is uploaded to ORDERS.QTR1 on the remote host.
/*******************************************/ /* The libref ORDERS is defined on both */ /* hosts. */ /*******************************************/ libname orders remote-host-SAS-data-library; proc upload data=orders.qtr1; run;
The data set retains the same data set name that it had on the local host. For example, if you remote submit the following statement, the data set is uploaded to WORK.QTR2 on the remote host.
/*******************************************/ /* The libref ORDERS is defined only on */ /* the local host. */ /*******************************************/ proc upload data=orders.qtr2; run;
For example, suppose you submit the following statements:
libname orders local-host-SAS-data-library; options user=orders;
If you remote submit the following statements, the data set ORDERS.QTR1 is uploaded to ORDERS.QTR1 on the remote host.
/*******************************************/ /* The libref ORDERS is defined on both */ /* hosts. */ /*******************************************/ libname orders remote-host-SAS-data-library; libname remote remote-host-SAS-data-library; /************************************/ /* This option has no effect in */ /* this case. */ /************************************/ options user=remote; proc upload data=qtr1; run;
For example, suppose you submit these statements:
libname orders local-host-SAS-data-library; options user=orders;
When you remote submit the following statements, the data set ORDERS.QTR1 is uploaded to REMOTE.QTR1 on the remote host.
/*******************************************/ /* The libref ORDERS is defined only on */ /* the remote host. */ /*******************************************/ libname remote remote-host-SAS-data-library; options user=remote; proc upload data=qtr1; run;
proc upload; run;the last data set that was created on the local host during the SAS session is uploaded to the remote host.
The naming conventions on the remote host follow one of the rules described above, based on how the last data set that was created was named.
Data Set Options and Attributes for the UPLOAD Statement |
In addition, when you upload SAS data sets by using the DATA= option (omitting the OUT= option) or the INLIB= and OUTLIB= options, or if you omit all of these options, the following characteristics are inherited by the uploaded data set.
Note: The following list of
characteristics shows the SAS data set option (in parenthesis) that was used
to create the characteristic for the original data set. You do not have to
specify the option to have it inherited when the data set is uploaded.
Note: The index for an uploaded
SAS data set is re-created on the remote host; not copied from the local host.
To prevent the re-creation of the index, you can specify the INDEX=NO option
in the PROC UPLOAD statement, as described in PROC UPLOAD Statement Options.
If you specify the OUT= option when uploading a single data set, only the following characteristics are inherited by the uploaded data set:
The following example illustrates the use of the DATA= option and the INDEX=NO option. The example also shows the use of the KEEP= SAS data set option. Note that because no OUT= option is specified, the uploaded data set inherits the characteristics of the input data set except the index (because the INDEX=NO option is specified).
proc upload data=study(keep=age score1 score2) index=no; run;
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.