Previous Page | Next Page

Examples of Data Transfer Services (DTS)

Example 11. DTS: Downloading a Partitioned Data Set from z/OS


Purpose

This example shows how to download all members of a partitioned data set. Suppose you need to download a collection of SAS programs from a z/OS server to your client. The SAS programs are members of one partitioned data set named MFHOST.SAS.PROGRAMS. You can copy all the programs from the partitioned data set to the client by using a single DOWNLOAD procedure. An asterisk (*) wildcard character is specified in the DOWNLOAD procedure to transfer all members of the data set.


Program

%let hostn=2;
signon s390deva script='!sasroot\tst\m900\rlink\testsrc\scrmvs.sas';
rsubmit;
   data _null_;
     file 'sastnd.rlink.testpdsr(a)';
     put 'data a; x=1; run;';
   run;
   data _null_;
     file 'sastnd.rlink.testpdsr(b)';
     put 'data a; x=1; run;';
   run;
endrsubmit;

filename locdir 
      '/unixhost/sas/programs';
 rsubmit;
    filename inpds
         'mfhost.sas.programs' shr;
    proc download infile=inpds('*')
          outfile=locdir;
 endrsubmit;

The first FILENAME statement defines the fileref LOCDIR, which identifies the physical location for the files that are downloaded to the UNIX client. The RSUBMIT statement indicates that the statement that follows will be processed on the z/OS server. By not specifying a server-ID, this example assumes that the z/OS computer is your current server. The second FILENAME statement defines the fileref INPDS for the partitioned data set MFHOST.SAS.PROGRAMS, which contains the SAS programs that will be downloaded to the client. The PROC DOWNLOAD step transfers all the files in the partitioned data set on the z/OS server to the library LOCDIR on the UNIX client. The ENDRSUBMIT statement indicates the end of the block of statements that are submitted to the server for processing.

Previous Page | Next Page | Top of Page