<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Reading from sashelp.vcolumn is taking too long in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189967#M47955</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorrry, I find it very difficult to read that code.&amp;nbsp; Do you just want to print a dataset to a text file with a delimiter?&amp;nbsp; Try proc export?&amp;nbsp; If not maybe clarify what you want out as I don't see what you are trying to achieve, is it perhaps to check the existence before outputting - then use the exist() function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Jul 2014 14:21:27 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2014-07-22T14:21:27Z</dc:date>
    <item>
      <title>Reading from sashelp.vcolumn is taking too long</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189961#M47949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a program that reads regularly from this table. The time taken to read data from it tends to vary, but it should only take a few seconds. When I proc print it to the screen, it's 7,000 observations or so. Proc printing it takes 55 seconds to run. Any proc or data step that accesses it takes 55 seconds or so on average, and just now it took 2½ minutes. Any idea why this might be? The PC is a slow one, but even 1GB of RAM and a 2.2GhZ processor should have no problems with this. There are other processes running in the background, but the only place in the program that hangs is where it accesses this table. I can't access my C drive on Windows Explorer, where the file is, so I can't tell if my C drive is short of space. 20434&amp;nbsp; proc print data = sashelp.vcolumn; 20435&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where libname = 'WORK' and memtype = 'DATA' and substr(name,1,3) = 'VAR'; 20436&amp;nbsp; run; NOTE: No observations were selected from data set SASHELP.VCOLUMN. NOTE: There were 0 observations read from the data set SASHELP.VCOLUMN.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE (libname='WORK') and (memtype='DATA') and (SUBSTR(name, 1, 3)='VAR'); NOTE: PROCEDURE PRINT used (Total process time):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2:30.42&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7.56 seconds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 13:23:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189961#M47949</guid>
      <dc:creator>mediaeval</dc:creator>
      <dc:date>2014-07-22T13:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from sashelp.vcolumn is taking too long</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189962#M47950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The SASHELP.VCOLUMN is actually an SQL view, so you need to factor that in.&amp;nbsp; If you use it regularly then datastep to another area restricting on libname ne sashelp and then reference that dataset, save re-running each time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 13:43:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189962#M47950</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-07-22T13:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from sashelp.vcolumn is taking too long</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189963#M47951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A couple of alternative approaches that might run faster ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using PROC SQL on dictionary.columns (instead of using sashelp.vcolumn).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try running PROC CONTENTS using the options NOPRINT and OUT= to capture the contents of a particular SAS data set.&amp;nbsp; Also note that you can capture information about all data sets in a library by specifying DATA=libname._all_.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 13:52:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189963#M47951</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2014-07-22T13:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from sashelp.vcolumn is taking too long</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189964#M47952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Accessing the sashelp.vmember or dictionary.columns will result at runtime:&lt;/P&gt;&lt;P&gt;- query-ing of all active allocates libraries for existing tables&lt;/P&gt;&lt;P&gt;- for each table of that list query-ing on each table for the existing columns and their attributes.&lt;/P&gt;&lt;P&gt;All this queries are a lot of small pieces of information the system is not tuned and designed for. This same kind of performance burden can be seen opening a lot files with small data to the same size of data collected to be in some bigger files. There is a lot overhead accessing headers/metadata.&lt;/P&gt;&lt;P&gt;When a RDBMS is involved (libname) or a RLS (sas/connect) it go everytime round the circle as the information is not seen as a static table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is good example of very easy way of getting of information can cause expected bad performance.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Copying the sashelp.vcolums first to a work.tabel and than go for selecting can help improving your performance without losing the ease on usage.&lt;/P&gt;&lt;P&gt;Advice: only once using the sashelp.vcloumn further processing on a static copy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 14:11:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189964#M47952</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-07-22T14:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from sashelp.vcolumn is taking too long</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189965#M47953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is how I am using sashelp.vcolumn. I'm unsure how to replace the references to it, such that it will work. Also, can you guys see the following code properly? It's all run together in my browser. I'm using Internet Explorer 7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%Macro CreateRPTFile(OutputFile, Dataset, RecLength, Library=work); **This data step writes the variable names contained in the SAS dataset that is specified in&amp;nbsp;&amp;nbsp; the &amp;amp;Dataset macro variable, to the file specified in the OutputFile parameter; Filename Fname "&amp;amp;OutputFile"; Data _Null_; File Fname DLM = "," LRECL = &amp;amp;RecLength; Set sashelp.vcolumn; If _n_ = 1 Then Put "!," @; **For libname and memname to work, the names that feed into them must be in uppercase ; Where libname = Put("&amp;amp;Library",$upcase50.) and memname = Put("&amp;amp;Dataset",$upcase50.); Put name @; Run; **This datastep outputs all of the observations in the specified dataset to the external file; Data _Null_; File Fname DLM = "," LRECL = &amp;amp;RecLength Mod; Set &amp;amp;Library..&amp;amp;Dataset;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put "*," (_all_) (:); run; %Mend;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 14:16:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189965#M47953</guid>
      <dc:creator>mediaeval</dc:creator>
      <dc:date>2014-07-22T14:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from sashelp.vcolumn is taking too long</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189966#M47954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Agree with Astounding's suggestion that PROC CONTENTS is often faster than hitting sashelp.vcolumn (or dictionary.columns).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, are you sure there are only 7,000 obs in sashelp.vcolumn?&amp;nbsp; When I start PC SAS, I have more records than that, just from MAPS libraries and others.&amp;nbsp;&amp;nbsp; Remember, it has information on the variables for every dataset in every library.... it gets big quick.&amp;nbsp; In BI setting with pre-assigned libraries, it can be enormous.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another point is that using the SUBSTR() function on the where statement may mean that SAS can't use indexes to find the records more quickly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 14:18:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189966#M47954</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2014-07-22T14:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from sashelp.vcolumn is taking too long</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189967#M47955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorrry, I find it very difficult to read that code.&amp;nbsp; Do you just want to print a dataset to a text file with a delimiter?&amp;nbsp; Try proc export?&amp;nbsp; If not maybe clarify what you want out as I don't see what you are trying to achieve, is it perhaps to check the existence before outputting - then use the exist() function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 14:21:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189967#M47955</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-07-22T14:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from sashelp.vcolumn is taking too long</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189968#M47956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is your problem.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Where libname = Put("&amp;amp;Library",$upcase50.) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;SAS will not be able to optimize this since it involves the use of a run-time function call to the PUT() function.&amp;nbsp; So it will need to attempt to open every table in every active library.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Try changing it to:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Where libname = %upcase("&amp;amp;Library")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Now to regular SAS the where clause will contain a constant and SAS should be able to limit itself to just querying the specified library.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 14:46:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189968#M47956</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-07-22T14:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from sashelp.vcolumn is taking too long</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189969#M47957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are lots of ways to make a CSV file, but using your current macro as a starting point, below changes to use PROC CONTENTS to get the var list from the dataset, and PROC SQL to make a macro variable holding that list:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;options mprint;

%Macro CreateRPTFile(OutputFile, Dataset, RecLength, Library=work);
%local varlist;

Filename Fname "&amp;amp;OutputFile"; 

proc contents data=&amp;amp;library..&amp;amp;dataset out=__varlist (keep=name) noprint;
run;

proc sql noprint;
&amp;nbsp; select distinct name into : varlist&amp;nbsp; separated by ',' 
&amp;nbsp; from __varlist 
&amp;nbsp; ;
quit;

**This datastep outputs all of the observations in the specified dataset to the external file; 
Data _Null_; 
&amp;nbsp; File Fname DLM = "," LRECL = &amp;amp;RecLength; 
&amp;nbsp; Set &amp;amp;Library..&amp;amp;Dataset;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; If _n_ = 1 Then Put "!,&amp;amp;varlist";
&amp;nbsp; put "*," (_all_) (:);
run;

proc datasets library=work memtype=data nolist;
&amp;nbsp; delete __varlist;
run;
%Mend;


data test;
&amp;nbsp; array x{5};
&amp;nbsp; do id=1 to 5;
&amp;nbsp;&amp;nbsp;&amp;nbsp; do i=1 to dim(x);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x{i}=ranuni(0);
&amp;nbsp;&amp;nbsp;&amp;nbsp; end;
&amp;nbsp;&amp;nbsp;&amp;nbsp; output;
&amp;nbsp; end;
&amp;nbsp; drop i;
run;

%CreateRptFile(d:/junk/test2.txt,test,100)

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;--Q.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 14:46:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189969#M47957</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2014-07-22T14:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from sashelp.vcolumn is taking too long</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189970#M47958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't need sashelp.vcolumn or dictionary.columns or PROC CONTENTS for this task.&amp;nbsp; You can use VNEXT to put the name row and in the same data step put the observations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="font-family: Courier New; font-size: 11pt;"&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;_null_&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; SASHELP.class;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;file&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;log&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;dlm&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'|'&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;dsd&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; _n_ eq &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; link names;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;put&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;_all_&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;)(:);&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;return&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;&amp;nbsp; &lt;BR /&gt;names:&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;length&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; _name_ $&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;32&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;do&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;while&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;);&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;call&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; vnext(_name_);&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; upcase(_name_) eq &lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'_NAME_'&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; leave;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;put&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; _name_ : @;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;put&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;return&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;&amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 14:50:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189970#M47958</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-07-22T14:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from sashelp.vcolumn is taking too long</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189971#M47959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks! This runs much more quickly. However, the variables are written to the output text file in alphabetical order. Is there an option on proc contents that will write the variables to __varlist in the order in which they were created in the input dataset?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 15:28:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189971#M47959</guid>
      <dc:creator>mediaeval</dc:creator>
      <dc:date>2014-07-22T15:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from sashelp.vcolumn is taking too long</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189972#M47960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ORDER BY VARNUM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc contents data=&amp;amp;library..&amp;amp;dataset out=__varlist (keep=name varnum) noprint;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select distinct name into : varlist&amp;nbsp; separated by ',' &lt;/P&gt;&lt;P&gt;&amp;nbsp; from __varlist &lt;/P&gt;&lt;P&gt;&amp;nbsp; order by varnum&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 15:35:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189972#M47960</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-07-22T15:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from sashelp.vcolumn is taking too long</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189973#M47961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can add varnum to the KEEP= option when PROC CONTENTS outputs the dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then add ORDER BY VARNUM to the SQL step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also remove DISTINCT from the SQL step, since you can't have two vars with same name it isn't needed. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 15:41:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189973#M47961</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2014-07-22T15:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from sashelp.vcolumn is taking too long</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189974#M47962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Quentin, on login this morning, I'm seeing 5,200 observations when I run proc print on sashelp.vcolumn. Yesterday evening I saw something over 7,000. Running this morning's proc print took 3:45!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 07:12:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189974#M47962</guid>
      <dc:creator>mediaeval</dc:creator>
      <dc:date>2014-07-23T07:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from sashelp.vcolumn is taking too long</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189975#M47963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom, I changed my code to use the %ucase function but the times doubled, approximately. This probably isn't anything to do with the change of function, it's probably other factors. When I logged on this morning, a proc print statement on sashelp.vcolumn took 3:45.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 07:15:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189975#M47963</guid>
      <dc:creator>mediaeval</dc:creator>
      <dc:date>2014-07-23T07:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from sashelp.vcolumn is taking too long</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189976#M47964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi data _null_, how do you format your code when posting to the forum?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 07:19:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189976#M47964</guid>
      <dc:creator>mediaeval</dc:creator>
      <dc:date>2014-07-23T07:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from sashelp.vcolumn is taking too long</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189977#M47965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@mediaeval for the performance try to understand what you are causing in the system. See my previous post(s). &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 07:23:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189977#M47965</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-07-23T07:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from sashelp.vcolumn is taking too long</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189978#M47966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the code written like that in your SAS window, if so then format there and then copy to notepad and then to this window, also you can use the advanced editor top right of the edit window.&lt;/P&gt;&lt;P&gt;As for your slowdowns, could be any number of things.&amp;nbsp; How is SAS installed, locally, network, virtual, what speeds are the networks running at, how much ram on the server etc.&amp;nbsp; I would run through the executing process with your SAS/Network people to see why you are getting such speeds, its probably something simple, for instance we were getting terrible speeds sometime back, there was a syncronisation program running which was interfering with read/write on files. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 08:06:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189978#M47966</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-07-23T08:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from sashelp.vcolumn is taking too long</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189979#M47967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everyone for taking the time to answer. In the end I used Quentin's solution and runtimes have reduced from 10 minutes or so to just under 3 minutes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 10:07:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189979#M47967</guid>
      <dc:creator>mediaeval</dc:creator>
      <dc:date>2014-07-23T10:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from sashelp.vcolumn is taking too long</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189980#M47968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you see CEDA messages?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/15/379.html" title="http://support.sas.com/kb/15/379.html"&gt;15379 - Cross-Environment Data Access (CEDA) utilization message&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: Data file libref.member.DATA is in a format native to&lt;/P&gt;&lt;P&gt;&amp;nbsp; another host or the file encoding does not match the&lt;/P&gt;&lt;P&gt;&amp;nbsp; session encoding. Cross Environment Data Access will&lt;/P&gt;&lt;P&gt;&amp;nbsp; be used, &lt;STRONG&gt;which may require additional CPU resources&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; and reduce performance.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 12:09:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-sashelp-vcolumn-is-taking-too-long/m-p/189980#M47968</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-07-23T12:09:13Z</dc:date>
    </item>
  </channel>
</rss>

