Date: Fri, 11 Jul 2003 22:54:00 -0700
Reply-To: Roger DeAngelis <xlr82sas@AOL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Roger DeAngelis <xlr82sas@AOL.COM>
Organization: http://groups.google.com/
Subject: Saving the contents of your windows program editor into a unix
directory
Content-Type: text/plain; charset=ISO-8859-1
Hi SAS-L'rs,
I wonder if there is an easier way to do this
/*--------------------------*\
| |
| I wanted to save the |
| contents of the windows |
| program editor into a |
| member of my utl directory |
| on unix |
| |
| ie type |
| |
| Command> ux pgm |
| |
| on the windows program |
| editor commad line and |
| place pgm.sas into |
| |
| /home/xlr82sas/utl/pgm.sas |
| on Unix |
| Put the next two macros |
| in your autocall library |
| |
| |
| I need to do more testing |
| but this appears to work |
| |
| |
\*--------------------------*/
options cmdmac;run; /* need this option on */
%macro ux(afstr1) / cmd;
/* command line macro */
/* afstr1 is global macro variable SAS uses */
note uxa;clear; notesubmit '%uxa';
%mend ux;
%macro uxa;
data _null_;
/* It seems with every new version of SAS some things get harder
to do */
handle= "filename ux ftp "!!"'/home/xlr82sas/utl/&afstr1..sas' "!!
" user="!!"'xlr82sas' "!!
" pass="!!"'xxxxxxxx' "!!
" host="!!"'xxxxxxxx' "!!
" recfm=v;"
;
Call Execute(handle);
Run;
dm "file ux"; /* save program into unix directory */
filename ux clear;run;
%mend uxa;