Examples of Data Transfer Services (DTS) |
Purpose |
When you include the INCAT= and OUTCAT= options in the PROC UPLOAD or PROC DOWNLOAD statement, you can specify which entry types to transfer by using the ENTRYTYPE= option in one of the following statements:
If you omit the ENTRYTYPE= option and also omit the SELECT and EXCLUDE statements, all catalog entries are transferred.
Programs |
Example 3.1: Using the ENTRYTYPE= Option in the PROC UPLOAD Statement |
This example uploads all SLIST catalog entries from the CAT catalog in the library LOCLIB on the client and stores them in the catalog UPCAT in the library REMLIB on the server:
proc upload incat=loclib.cat outcat=remlib.upcat entrytype=slist; run;
Example 3.2: Using the ENTRYTYPE= Option in the EXCLUDE Statement in PROC DOWNLOAD |
This example downloads all catalog entries that are in the catalog REMOTE.MAIN_FORMATS on the server, except the format entries XYZ and GRADES. It then stores them in the catalog LOCAL.SECONDARY_FORMATS on the client:
libname local 'work' $loglib=yes; rsubmit; libname remote 'work' $loglib=yes; proc format lib=remote.main_formats; value grades 1='one'; value aformat 1='one'; value xyz 1='one'; run; endrsubmit; options nocstatus; proc download incat=remote.main_formats outcat=local.secondary_formats; exclude xyz grades / entrytype=format; run; endrsubmit;
Example 3.3: Using the ENTRYTYPE= Option in the SELECT Statement in PROC UPLOAD |
If the default library is WORK, this example uploads the FORMAT catalog entries XYZ and ABC, the INFMT catalog entry GRADES, and the SCL entries A and B that are in the WORK.LOCFMT catalog on the client. It then stores them in the WORK.REMFMT catalog on the server:
proc format lib=work.locfmt; invalue grades 'one'=1; value abc 1='one'; value xyz 1='one'; run; rsubmit; proc upload incat=locfmt outcat=remfmt; select xyz.format grades abc (et=format) / et=infmt; select a b / et=scl; run;
Example 3.4: Using the ENTRYTYPE= Option in Two SELECT Statements in PROC DOWNLOAD |
This example maintains the original ordering and grouping when transferring catalog entries that contain graphics output. Assume that you have a catalog named FINANCE that has two entries that contain graphics output, INCOME and EXPENSE. You want to download the two catalog entries that contain graphics output in the order in which they are stored on the server; that is, you want INCOME to appear before EXPENSE, not alphabetically as the DOWNLOAD procedure would normally transfer them.
In addition, you have some catalog entries that are grouped by the name GROUP1, and you want to preserve the grouping when the entries are downloaded. Remotely submit the following program to transfer these entries in the order that you specify in the first SELECT statement and in the group that you specify in the second SELECT statement:
options nocstatus; rsubmit; %setup(supio); proc catalog cat=permdata.testcat; copy out=work.finance et=grseg; run; quit; proc catalog cat=work.finance; change G3D= income /et=grseg; change GPLOT=expense/et=grseg; change TEMPLATE=GROUP1/et=grseg; run; quit; libname rhost 'work' $loglib=yes; endrsubmit; libname rhost 'work' $loglib=yes; rsubmit;proc download incat=rhost.finance outcat=lhost.finance; select income expense et=grseg; select group1.grseg; run;
Example 3.5: Using Long Member Names in Catalog Transfers |
This example uses PROC UPLOAD to transfer entire catalogs by using both the INCAT= and OUTCAT= options:
rsubmit; proc upload incat=loclib.monthlysalary outcat=monthlyupdate; run; proc upload incat=loclib.employeedata outcat=remlib.cat; run; proc upload incat=sasuser.base outcat = remlib.basecatalog; run; endrsubmit;
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.