|
> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On
> Behalf Of Arthur Tabachneck
> Sent: Monday, October 19, 2009 6:40 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Re: Help using notepad in SAS
>
> Dan,
>
> Thanks for looking, but you found what I did.
>
> The problem in more detail.
>
> First, I created a file called c:\copy.sas which contained
> the following
> lines:
>
> %window GET_LIB
> rows=8
> columns=80
> irow=1
> icolumn=2
> color=black
>
> #2 @3 'Enter libname:'
> color=gray
> @30 libnm 30
> required=yes
> attr=underline
> color=yellow
> #3 @3 'Enter filename:'
> color=gray
> @30 memnm 30
> required=yes
> attr=underline
> color=yellow;
> %display GET_LIB;
> proc sql noprint;
> select name into :namelist
> separated by ' '
> from dictionary.columns
> where libname=upcase("&libnm.")
> and memname=upcase("&memnm.");
> quit;
> filename clippy clipbrd;
> data _null_;
> file clippy;
> put "&namelist.";
> run;
>
> Then, I went to tools->options->keys and assigned the
> following to ctrl-f11:
>
> note;inc "c:\copy.sas";notesubmit;
>
> First time through it works perfectly. I.e., when window
> comes up I enter
> sashelp for the libname and class for the filename and, when
> its done, I can
> ctrl-v (i.e., paste) the variable names into a drop or keep statement.
>
> But, multiple runs end up running the code twice, three
> times, and more.
> Thus, the questions are (1) how to automagically delete
> notepad at the start
> and (2) how to automagically close the window.
>
> Art
Art,
Sorry for the multiple posts, but try the CLEAR command to clear the notepad
window, and the END command to close the notepad window, something like
this:
note;clear;inc "c:\copy.sas";notesubmit;end;
Hope this is helpful,
Dan
Daniel Nordlund
Bothell, WA USA
|