Data Transfer Services Tips
Tips for Using PROC DOWNLOAD and PROC UPLOAD
-
To execute the DOWNLOAD and UPLOAD
procedures in the server session, you must use the RSUBMIT command.
-
The rate at which files are transferred
varies according to these factors:
-
the size and number of files that
are being transferred
-
the processing load on the server
-
the communication access method
that is being used
-
the network configuration
The Transfer Status
window keeps you informed of the progress of the transfer.
For details, see Transfer Status Window.
-
You cannot transfer a SAS data
set to an external file by using the DATA= or the INLIB= option.
-
You cannot transfer an external
file to a SAS data set by using the OUT= option.
-
To transfer a text file whose record
length is greater than 132 bytes, you must specify the LRECL= option
in the FILENAME statement at both the client and the server. If you
omit the LRECL= option, a data truncation error is reported. For
details about the LRECL= option,
see the FILENAME statement Statements under z/OS in SAS Companion for z/OS.
-
If PROC DOWNLOAD or PROC UPLOAD
successfully completes the file transfer, the macro variable SYSINFO
is set to 0. If the file transfer is not successfully completed, the
macro variable SYSINFO is set to a value greater than 0. You can pass
the value of the SYSINFO macro variable back to the client by using
the %SYSRPUT statement.
For details, see %SYSRPUT Statement.
-
Statements that define librefs
and filerefs in the client session must be executed in the client
session by using the SUBMIT command.
-
Statements that define librefs
or filerefs in the server session must be executed in the server session
by using the RSUBMIT command or the RSUBMIT statement. Therefore,
if librefs or filerefs are defined before the PROC statement, these
statements can be executed along with PROC DOWNLOAD or PROC UPLOAD.
Tips for Using PROC DOWNLOAD Only
-
When
downloading variable block records to a client from a server that
is running under the
z/OS environment, you must specify RECFM=U in
the server FILENAME statement that points to the variable block record.
For details about options
in the FILENAME statement, see FILENAME Statement: z/OS in SAS Companion for z/OS.
For example, if the
file you are downloading is called MYFILE, you would use:
rsubmit;
filename
myfile 'vb.block.record' recfm=u;
proc download infile=myfile
outfile='c:\vb.rec' binary;
run;
endrsubmit;
After the client's Log window shows
the number of bytes that are transferred, you would issue the following
client FILENAME statement by using the RECFM= and LRECL= options,
where the value of LRECL= is the number of bytes that were transferred:
filename myfile 'c:\vb.rec' recfm=s370vb
lrecl=xxxx;
The MYFILE fileref
would then be used for subsequent access to the file.
Tips for UPLOAD Only
-
If you upload an external file to a server file that
is defined with a fixed (F) record format, all records in the file
are padded with blanks to the logical record length.
Copyright © SAS Institute Inc. All rights reserved.