Date: Tue, 17 May 2011 13:56:36 +0000
Reply-To: Michael Raithel <michaelraithel@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Michael Raithel <michaelraithel@WESTAT.COM>
Subject: Re: SASHELP.VTABLE error
In-Reply-To: <201105162048.p4GHvWJ7006062@waikiki.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"
Dear SAS-L-ers,
Andy posted the following interesting problem:
> Hi all,
>
> First off, I apologize if the formatting does not come out great...I'm
> posting through the website. I'm trying to sort all datasets within
> the "work" library. To do this, I found the following nugget of code
> (I
> ensure I only have the datasets I need by using a proc datasets prior
> to
> running this code):
>
> data _null_;
> set sashelp.vtable (where=(libname="WORK"));
> call execute("proc sort data=work." || memname || " nodupkey;by
> verbatim;run;");
> run;
>
> The code works great, however prior to sorting, I get 6 ERRORs in my
> code:
> ERROR: INPUT function requires a character argument.
> ERROR: Character expression requires a character format.
> ERROR: INPUT function requires a character argument.
> ERROR: Character expression requires a character format.
> ERROR: INPUT function requires a character argument.
> ERROR: Character expression requires a character format.
>
>
> These errors immedietly follow the data _null_ above. The code
> continues
> on and it sorts the datasets as you would expect. I then tried the
> following code:
>
> data temp;
> set sashelp.vtable;
> run;
>
> Even doing this, I receive these 6 errors. I have restarted SAS, and
> logged out and back in (we use PC Server SAS so remoting in). Am I
> missing something silly?
>
A-Squared; wow; f-r-e-a-k-y!!!! I was able to run the following without error or warning on SAS 9.2 TS2M3 on Windows XP:
data class1;
set sashelp.class;
run;
data class2;
set sashelp.class;
run;
data _null_;
set sashelp.vtable (where=(libname="WORK"));
call execute("proc sort data=work." || memname || " nodupkey;by name;run;");
run;
So, there is nothing inherently wrong with your clever code.
I would bet that it is something upstream... say in your AUTOEXEC.SAS or a %INCLUDE or something else you don't even think about any more. Check it out!
AA, best of luck in all your SAS endeavors!
I hope that this suggestion proves helpful now, and in the future!
Of course, all of these opinions and insights are my own, and do not reflect those of my organization or my associates. All SAS code and/or methodologies specified in this posting are for illustrative purposes only and no warranty is stated or implied as to their accuracy or applicability. People deciding to use information in this posting do so at their own risk.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Michael A. Raithel
"The man who wrote the book on performance"
E-mail: MichaelRaithel@westat.com
Author: Tuning SAS Applications in the MVS Environment
Author: Tuning SAS Applications in the OS/390 and z/OS Environments, Second Edition
http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=58172
Author: The Complete Guide to SAS Indexes
http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=60409
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
If you try to fail, and succeed, which have you done? - Anonymous
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++