| Date: | Wed, 17 Aug 2011 14:48:33 +0000 |
| Reply-To: | Randy Herbison <RandyHerbison@WESTAT.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Randy Herbison <RandyHerbison@WESTAT.COM> |
| Subject: | Re: Why does method not work on some systems? |
|
| In-Reply-To: | <201108162303.p7GLRQbV023151@waikiki.cc.uga.edu> |
| Content-Type: | text/plain; charset="us-ascii" |
Art,
What happens on the OP's machine? Does the custom Explorer action appear on the popup menu? Any clues in the SAS log?
Explorer actions are stored in the SAS registry. If I remember correctly, the default library for the SAS registry is SASUSER. The OP would need write access to customize Explorer actions.
-Randy
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Arthur Tabachneck
Sent: Tuesday, August 16, 2011 7:04 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: Why does method not work on some systems?
Randy,
Yes the OP has SAS/FSP. I tried the method you suggested and it worked
perfectly on my system. But so did all of the other methods.
I'll let you and the list know what happens on the OP's machine. I am a
firm believer in the method and think that it could benefit many.
Art
------
On Tue, 16 Aug 2011 17:28:04 +0000, Randy Herbison
<RandyHerbison@WESTAT.COM> wrote:
>Hi Art,
>
>Does the OP have SAS/FSP?
>
>You can use an %include statement for the 2nd program. I used a macro
variable for DSN:
>
>*** c:\temp\test.sas ***;
>data _forview;
> length name $32;
> do dsid=open("&dsn",'I') while(dsid ne 0);
> do i=1 to attrn(dsid,'NVARS');
> name=upcase(varname(dsid,i));
> output;
> end;
> dsid=close(dsid);
> end;
>run;
>proc sql noprint;
> select name into :names
> separated by ' '
> from _forview
> order by name
> ;
>quit;
>proc delete data=_forview;
>run;
>proc fsview data=&dsn;
> var &names.;
>run;
>
>and changed the Explorer action command to:
>
>gsubmit "%%let dsn=%8b.%32b; %%include 'c:\temp\test.sas';"
>
>-Randy
>
>
>-----Original Message-----
>From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Arthur
Tabachneck
>Sent: Tuesday, August 16, 2011 11:13 AM
>To: SAS-L@LISTSERV.UGA.EDU
>Subject: Why does method not work on some systems?
>
>My questions are at the end of this post.
>
>A couple of years ago a number of us co-wrote a paper on how to make good
>use of the capabilities built into the Explorer menu (see:
>http://support.sas.com/resources/papers/proceedings10/046-2010.pdf
>
>In trying to generalize that method in response to a recent post on the SAS
>Forums, I suggested using the following code in order to be able to right
>click on a file in the SAS Explorer menu in order to run FSView on the
>selected file and show an alphabetically sorted view of the file:
>
>gsubmit "proc sql noprint; select name into :vars separated by ' ' from
>dictionary.columns where libname=upcase('%8b') and memname=upcase('%32b')
>order by name;quit; proc fsview data=%8b.%32b; var &vars.;run;";
>
>I had really wanted to use the following code, but it exceeded the 255
>characters that are allowed:
>
>
>data _forview;
> dsn='%8b'||'.'||'%32b';
> length name $32;
> do dsid=open(dsn,'I') while(dsid ne 0);
> do i=1 to attrn(dsid,'NVARS');
> name=upcase(varname(dsid,i));
> output;
> end;
> dsid=close(dsid);
> end;
>run;
>proc sql noprint;
> select name into :names
> separated by ' '
> from _forview
> order by name
> ;
>quit;
>proc delete data=_forview;
>run;
>proc fsview data=%8b.%32b;
> var &names.;
>run;
>
>My questions:
>1. Why would the first method work for me, but not for the OP? They are
>running SAS 9.1.3 on a Windows 2000 server.
>
>2. Is there a way to include such code (as the second set) that wouldn't
>exceed the 255 character limitation?
>
>FWIW, I truncated the second method so that it would work for me (i.e.,
used
>every abbreviation I could think of so that it would run albeit with about
>20 warnings that I had spelled things wrong .. but that the correct
commands
>were used). Again, it would work for me, but not for the OP.
>
>Thanks in advance,
>Art
|