Recently we got an scenario where user need to transfer file from production to test. His condition is to transfer data without login to production environment. So below is the code we did to achieve his condition.
Option comamid=tcp Remote=hostname.7552;
Filename rlink "/sas/software/SASFoundation/9.4/misc/connect/tcpunix.scr";
signon user=<user_id> password="<password>";
Libname localdev "<local library where file needs to be copied>";
Rsubmit;
libname test "<remote library from where we need to copy>";
proc download inlib=test
outlib=localdev;
endrsubmit;
signoff;
Option comamid=tcp Remote=hostname.7552;
Filename rlink "/sas/software/SASFoundation/9.4/misc/connect/tcpunix.scr";
signon user=<user_id> password="<password>";
Libname localdev "<local library where file needs to be copied>";
Rsubmit;
libname test "<remote library from where we need to copy>";
proc download inlib=test
outlib=localdev;
endrsubmit;
signoff;
More references on this topic:
- Connecting Simply with SAS/CONNECT Michael G. Sadof, MGS Associates, Inc., Bethesda, MD.
- Structuring Base SAS for Easy Maintenance Gary E. Schlegelmilch, U.S. Dept. of Commerce, Bureau of the Census, Suitland MD
Comments
Post a Comment