<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Statskom</title>
	<atom:link href="http://statskom.com/tag/sas/feed/" rel="self" type="application/rss+xml" />
	<link>http://statskom.com</link>
	<description>Clinical programming</description>
	<lastBuildDate>Thu, 05 Oct 2017 09:04:02 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.8.41</generator>
	<item>
		<title>Clinical Metadata at Phuse next week</title>
		<link>http://statskom.com/clinical-metadata-phuse-next-week/</link>
		<comments>http://statskom.com/clinical-metadata-phuse-next-week/#comments</comments>
		<pubDate>Mon, 02 Oct 2017 15:03:08 +0000</pubDate>
		<dc:creator><![CDATA[Andrew N]]></dc:creator>
				<category><![CDATA[Clinical Metadata]]></category>
		<category><![CDATA[CDISC]]></category>
		<category><![CDATA[Data standards]]></category>
		<category><![CDATA[SAS]]></category>

		<guid isPermaLink="false">http://statskom.com/?p=505</guid>
		<description><![CDATA[<p>Clinical Metadata will be presenting their metadata and projects standards tool at the PhUse conference in Edinburgh on Tuesday 10th October. Join them to learn how Clinical Metadata can help the pharmaceutical industry manage its clinical trial metadata and data&#8230; </p><p>The post <a rel="nofollow" href="http://statskom.com/clinical-metadata-phuse-next-week/">Clinical Metadata at Phuse next week</a> appeared first on <a rel="nofollow" href="http://statskom.com">Statskom</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><a title="Clinical Metadata - Metadata management with a CDISC mindset" href="https://www.clinicalmetadata.com" target="_blank">Clinical Metadata</a> will be presenting their metadata and projects standards tool at the PhUse conference in Edinburgh on Tuesday 10th October.</p>
<p>Join them to learn how Clinical Metadata can help the pharmaceutical industry manage its clinical trial metadata and data standards. The tool also helps users obtain CDISC compliance and accelerates the reporting process by generating SAS code and submission deliverables.</p>
<p><a href="http://statskom.com/wp-content/uploads/2017/10/clinical-metadata.jpg"><img class="alignnone size-medium wp-image-506" alt="clinical metadata" src="http://statskom.com/wp-content/uploads/2017/10/clinical-metadata-300x164.jpg" width="300" height="164" /></a></p>
<p>The post <a rel="nofollow" href="http://statskom.com/clinical-metadata-phuse-next-week/">Clinical Metadata at Phuse next week</a> appeared first on <a rel="nofollow" href="http://statskom.com">Statskom</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://statskom.com/clinical-metadata-phuse-next-week/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Phastar SAS Art Competition</title>
		<link>http://statskom.com/phastar-sas-art-competition/</link>
		<comments>http://statskom.com/phastar-sas-art-competition/#comments</comments>
		<pubDate>Sat, 03 Jan 2015 20:25:08 +0000</pubDate>
		<dc:creator><![CDATA[Andrew N]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[SAS]]></category>

		<guid isPermaLink="false">http://statskom.com/?p=481</guid>
		<description><![CDATA[<p>Statskom&#8217;s Lead Programmer Andrew Ndikom came second in Phastar&#8217;s SAS Art Competition. http://www.phastar.co.uk/Latest-News/sasartresults.html</p><p>The post <a rel="nofollow" href="http://statskom.com/phastar-sas-art-competition/">Phastar SAS Art Competition</a> appeared first on <a rel="nofollow" href="http://statskom.com">Statskom</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Statskom&#8217;s Lead Programmer Andrew Ndikom came second in Phastar&#8217;s SAS Art Competition. <a href="http://www.phastar.co.uk/Latest-News/sasartresults.html">http://www.phastar.co.uk/Latest-News/sasartresults.html</a></p>
<p>The post <a rel="nofollow" href="http://statskom.com/phastar-sas-art-competition/">Phastar SAS Art Competition</a> appeared first on <a rel="nofollow" href="http://statskom.com">Statskom</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://statskom.com/phastar-sas-art-competition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAS paper review 6-Deciphering PROC COMPARE return codes/</title>
		<link>http://statskom.com/sas-paper-review-6/</link>
		<comments>http://statskom.com/sas-paper-review-6/#comments</comments>
		<pubDate>Tue, 18 Nov 2014 22:23:35 +0000</pubDate>
		<dc:creator><![CDATA[Andrew N]]></dc:creator>
				<category><![CDATA[SAS paper review]]></category>
		<category><![CDATA[BAND function]]></category>
		<category><![CDATA[PROC COMPARE]]></category>
		<category><![CDATA[SAS]]></category>

		<guid isPermaLink="false">http://statskom.com/?p=475</guid>
		<description><![CDATA[<p>This week our SAS paper review looks at “Deciphering PROC COMPARE Codes: The Use of the bAND Function  ” by Joseph Hinson and Margaret Coughlin of  Merck Sharp &#38; Dohme Corp. PROC COMPARE is often seen as the gold standard for validating&#8230; </p><p>The post <a rel="nofollow" href="http://statskom.com/sas-paper-review-6/">SAS paper review 6-Deciphering PROC COMPARE return codes/</a> appeared first on <a rel="nofollow" href="http://statskom.com">Statskom</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>This week our SAS paper review looks at “Deciphering PROC COMPARE Codes: The Use of the bAND Function  ” by Joseph Hinson and Margaret Coughlin of  Merck Sharp &amp; Dohme Corp.</p>
<p>PROC COMPARE is often seen as the gold standard for validating datasets within clinical trials. However the output it produces can often be extensive and manually interpreting this can be timely and error prone. This paper discusses an automated approach for examining the results of PROC COMPARE, by interpreting the return code that the procedure creates. This approach allows the user to quickly create single page summaries displaying the comparison results of multiple (i.e. more than 30) comparisons in an easy to interpret one observation per comparison format.</p>
<p>We have previously seen several papers that have explained how to utilise PROC COMPARE return codes, however what differentiates this paper is its clever use of the SAS bAND function to interpret the return codes.</p>
<p>The paper was presented at the SAS  Global Forum, 2012. Download the paper <a href="http://support.sas.com/resources/papers/proceedings12/063-2012.pdf">here</a>.</p>
<p>The post <a rel="nofollow" href="http://statskom.com/sas-paper-review-6/">SAS paper review 6-Deciphering PROC COMPARE return codes/</a> appeared first on <a rel="nofollow" href="http://statskom.com">Statskom</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://statskom.com/sas-paper-review-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAS-paper-review-5/</title>
		<link>http://statskom.com/sas-paper-review-5/</link>
		<comments>http://statskom.com/sas-paper-review-5/#comments</comments>
		<pubDate>Thu, 13 Nov 2014 02:12:01 +0000</pubDate>
		<dc:creator><![CDATA[Andrew N]]></dc:creator>
				<category><![CDATA[SAS paper review]]></category>
		<category><![CDATA[CDISC]]></category>
		<category><![CDATA[efficiency]]></category>
		<category><![CDATA[FDA]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[SDTM]]></category>

		<guid isPermaLink="false">http://statskom.com/?p=471</guid>
		<description><![CDATA[<p>This week our SAS paper review looks at “TIPS AND TRICKS OF EFFICIENT SAS® PROGRAMMING FOR SDTM DATA ” by Eric Qi and Fikret Karahoda of Merck &#38; Co. The paper examines problems which can result from processing and storing large SDTM  datasets and&#8230; </p><p>The post <a rel="nofollow" href="http://statskom.com/sas-paper-review-5/">SAS-paper-review-5/</a> appeared first on <a rel="nofollow" href="http://statskom.com">Statskom</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>This week our SAS paper review looks at “TIPS AND TRICKS OF EFFICIENT SAS® PROGRAMMING FOR SDTM DATA ” by Eric Qi and Fikret Karahoda of Merck &amp; Co.</p>
<p>The paper examines problems which can result from processing and storing large SDTM  datasets and how to resolve them. Although this paper was written in 2010, we feel that the issues and techniques discussed in this paper are particularly important in the light of the guidance provided by CDISC  (SDTM Implementation Guide 3.2 &#8211; section 4.1.2.9) that:</p>
<p><em>Very large transport files have become an issue for FDA to process. One of the main contributors to the large file sizes has been sponsors using the maximum length of 200 for character variables. To help rectify this situation:</em><br />
<em>• The maximum SAS Version 5 character variable length of 200 characters should not be used unless necessary.</em></p>
<p>The paper presents several methods for handling large datasets more efficiently and suggests ways in which the size of datasets can be reduced. We particularly liked the tables which show real time, CPU time and memory costs associated with different approaches, which provide a tangible illustration of the benefits of efficiency savings.</p>
<p>The paper was presented at the SESUG conference, Savannah, GA, 2010. Download the paper <a href="http://analytics.ncsu.edu/sesug/2010/PO10.Qi.pdf">here</a>.</p>
<p>The post <a rel="nofollow" href="http://statskom.com/sas-paper-review-5/">SAS-paper-review-5/</a> appeared first on <a rel="nofollow" href="http://statskom.com">Statskom</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://statskom.com/sas-paper-review-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAS paper review #4</title>
		<link>http://statskom.com/sas-paper-review-4/</link>
		<comments>http://statskom.com/sas-paper-review-4/#comments</comments>
		<pubDate>Mon, 15 Sep 2014 21:54:15 +0000</pubDate>
		<dc:creator><![CDATA[Andrew N]]></dc:creator>
				<category><![CDATA[SAS paper review]]></category>
		<category><![CDATA[PharmaSUG]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[Special characters]]></category>

		<guid isPermaLink="false">http://statskom.com/?p=351</guid>
		<description><![CDATA[<p>This week our SAS paper review looks at &#8220;Non Printable &#38; Special Characters: Problems and how to overcome them&#8221; by Sridhar R Dodlapati, Praveen Lakkaraju, Naresh Tulluru and Zemin Zeng. The paper looks at the problems which can be caused when non-printable&#8230; </p><p>The post <a rel="nofollow" href="http://statskom.com/sas-paper-review-4/">SAS paper review #4</a> appeared first on <a rel="nofollow" href="http://statskom.com">Statskom</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><span style="line-height: 1.5em;">This week our SAS paper review looks at &#8220;</span><span style="line-height: 1.5em;">Non Printable &amp; Special Characters: Problems and how to overcome them&#8221; by </span><span style="line-height: 1.5em;">Sridhar R Dodlapati, Praveen Lakkaraju, Naresh Tulluru and Zemin Zeng.</span></p>
<p>The paper looks at the problems which can be caused when non-printable and special characters such as line feeds and carriage returns are present in SAS datasets, how to detect them and how to replace the.</p>
<p>Non printable and special characters can be a source of confusion when they are encountered in SAS, the programmer often only detects them by chance when they notice that the alignment in an output report seems to be disrupted for no apparent reason. A systematic approach to detecting and handling special characters is clearly required in situations when special characters can be reasonably expected and this is just what is set out in this paper.</p>
<p>The paper describes a clear approach for detecting special characters and explains three keyapproaches for dealing with them:</p>
<p>1. Report them to data management and get clean data in the next transfer.<br />
2. Replace NPSC with other characters.<br />
3. Delete NPSC.</p>
<p>Particularly useful is the recommendation to use the compress option with the &#8216;KW&#8217; modifier (new to SAS version 9) to only keep writable characters.</p>
<p>The paper includes several worked examples as well as useful code fragments.</p>
<p>The paper was presented at the PharmaSUG conference in Orlando 2010. Download the paper <a href="http://www.lexjansen.com/pharmasug/2010/CC/CC13.pdf">here</a>.</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="http://statskom.com/sas-paper-review-4/">SAS paper review #4</a> appeared first on <a rel="nofollow" href="http://statskom.com">Statskom</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://statskom.com/sas-paper-review-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAS tips &amp; tricks #4 – Visualising SAS datasets with an sql histogram</title>
		<link>http://statskom.com/sas-tips-tricks-4-visualising-datasets-sql-histogram/</link>
		<comments>http://statskom.com/sas-tips-tricks-4-visualising-datasets-sql-histogram/#comments</comments>
		<pubDate>Thu, 28 Aug 2014 14:52:18 +0000</pubDate>
		<dc:creator><![CDATA[Andrew N]]></dc:creator>
				<category><![CDATA[SAS Tips & Tricks]]></category>
		<category><![CDATA[histogram]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[PROC SQL]]></category>
		<category><![CDATA[SAS]]></category>

		<guid isPermaLink="false">http://statskom.com/?p=276</guid>
		<description><![CDATA[<p>In our last post SAS tips &#38; tricks #3 – SAS dictionary tables, we looked at how the dictionary tables can be used to find metadata about the SAS session, including dataset and variable level metadata. In this post we&#8230; </p><p>The post <a rel="nofollow" href="http://statskom.com/sas-tips-tricks-4-visualising-datasets-sql-histogram/">SAS tips &#038; tricks #4 – Visualising SAS datasets with an sql histogram</a> appeared first on <a rel="nofollow" href="http://statskom.com">Statskom</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>In our last post <a title="SAS tips &amp; tricks #3 – SAS dictionary tables" href="http://statskom.com/sas-tips-tricks-3-sas-dictionary-tables/">SAS tips &amp; tricks #3 – SAS dictionary tables</a>, we looked at how the dictionary tables can be used to find metadata about the SAS session, including dataset and variable level metadata.</p>
<p>In this post we look at how we can use a simple piece of SQL to create a histogram which gives a quick overview of the number of variables in each domain.</p>
<p>The SASHELP.VCOLUMN dataset contains a list of all variables present in each dataset. Here we use the repeat function to output a &#8220;*&#8221; character for each variable in the dataset. The output of the query is printed to the active output destination.</p>
<pre>PROC SQL;
   SELECT memname  , REPEAT('*',nvar) AS freq
   FROM sashelp.vtable
   WHERE libname = "SASHELP";
 QUIT;</pre>
<p>The result is something similar to the below, which gives a quick insight into the number of variables in each dataset in the SASHELP library.</p>
<p><a href="http://statskom.com/wp-content/uploads/2014/08/sql_histogram_vars.jpg"><img class="alignnone size-full wp-image-284" alt="sql_histogram_vars" src="http://statskom.com/wp-content/uploads/2014/08/sql_histogram_vars.jpg" width="531" height="706" /></a></p>
<p>This SQL histogram technique has a wide varierty of other applications, for example here we use it to show the frequency of countries within each region in the SASHELP.DEMOGRAPHICS dataset.</p>
<p>&nbsp;</p>
<pre>PROC SQL;
  SELECT region , REPEAT('*',COUNT(*)) AS freq
  FROM sashelp.demographics
  GROUP BY region
  ORDER BY region;
QUIT;</pre>
<p><a href="http://statskom.com/wp-content/uploads/2014/08/sql_histogram_region.jpg"><img class="alignnone  wp-image-283" alt="sql_histogram_region" src="http://statskom.com/wp-content/uploads/2014/08/sql_histogram_region.jpg" width="673" height="117" /></a></p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="http://statskom.com/sas-tips-tricks-4-visualising-datasets-sql-histogram/">SAS tips &#038; tricks #4 – Visualising SAS datasets with an sql histogram</a> appeared first on <a rel="nofollow" href="http://statskom.com">Statskom</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://statskom.com/sas-tips-tricks-4-visualising-datasets-sql-histogram/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SAS paper review #3</title>
		<link>http://statskom.com/sas-paper-review-3/</link>
		<comments>http://statskom.com/sas-paper-review-3/#comments</comments>
		<pubDate>Mon, 03 Mar 2014 20:44:21 +0000</pubDate>
		<dc:creator><![CDATA[Andrew N]]></dc:creator>
				<category><![CDATA[SAS paper review]]></category>
		<category><![CDATA[FEEDBACK]]></category>
		<category><![CDATA[PROC SQL]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[SESUG]]></category>
		<category><![CDATA[VALIDATE]]></category>

		<guid isPermaLink="false">http://statskom.com/?p=250</guid>
		<description><![CDATA[<p>This week our SAS paper review looks at  “A Closer Look at PROC SQL’s FEEDBACK Option” by Kenneth W. Borowiak. The paper explores how the FEEDBACK option can be used in the SQL statement  to cause SAS to create additionally detailed&#8230; </p><p>The post <a rel="nofollow" href="http://statskom.com/sas-paper-review-3/">SAS paper review #3</a> appeared first on <a rel="nofollow" href="http://statskom.com">Statskom</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>This week our SAS paper review looks at  “A Closer Look at PROC SQL’s FEEDBACK Option” by <span style="color: #000000;"><span style="font-size: medium;">Kenneth W. Borowiak</span>.</span></p>
<p>The paper explores how the FEEDBACK option can be used in the SQL statement  to cause SAS to create additionally detailed log entries which can be useful for debugging. It explains  how use of the FEEDBACK option will cause SAS to write expanded, more explicit messages in the log, which for example explicitly list any variables that were implicitly selected with a SELECT * construction.</p>
<p>We particularly liked the Code Generation section in which Borowiak’s suggests using the FEEDBACK option in combination with the VALIDATE statement to write an expanded version of the SELECT * statement into the log, which can then be copied back into the program and executed.</p>
<p>We feel the paper is suitable for all SAS users who utilise, or are learning SQL.</p>
<p>The paper was presented at the SouthEast SAS® Users Group, 2012 Conference in Raleigh-Durham, North Carolina. Download the paper from the <a href="http://analytics.ncsu.edu/sesug/2012/CT-05.pdf">SESUG website.</a></p>
<p>The post <a rel="nofollow" href="http://statskom.com/sas-paper-review-3/">SAS paper review #3</a> appeared first on <a rel="nofollow" href="http://statskom.com">Statskom</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://statskom.com/sas-paper-review-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAS tips &amp; tricks #2 – Retrieving variable metadata within DATA Steps</title>
		<link>http://statskom.com/sas-tips-tricks-2/</link>
		<comments>http://statskom.com/sas-tips-tricks-2/#comments</comments>
		<pubDate>Sun, 02 Mar 2014 19:29:19 +0000</pubDate>
		<dc:creator><![CDATA[Andrew N]]></dc:creator>
				<category><![CDATA[SAS Tips & Tricks]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[SAS Functions]]></category>

		<guid isPermaLink="false">http://statskom.com/?p=239</guid>
		<description><![CDATA[<p>In our last tips &#38; tricks blogpost we looked at how the VARNUM function could be used to within a DATA Step to determine whether a variable was present within dataset and how this function could be used as an&#8230; </p><p>The post <a rel="nofollow" href="http://statskom.com/sas-tips-tricks-2/">SAS tips &#038; tricks #2 – Retrieving variable metadata within DATA Steps</a> appeared first on <a rel="nofollow" href="http://statskom.com">Statskom</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>In our last <a title="SAS tips &amp; tricks #1 – The VARNUM function" href="http://statskom.com/sas-tips-tricks-1-the-varnum-function/">tips &amp; tricks blogpost </a>we looked at how the VARNUM function could be used to within a DATA Step to determine whether a variable was present within dataset and how this function could be used as an alternative to referencing  the dictionary tables or a PROC CONTENTS. Today we look at how the VARxx functions can be used in combination with the VARNUM function to determine other attributes about variables in a dataset.</p>
<p>The additional functions are shown in the table below and each can be used to retrieve a specific piece of metadata:</p>
<table border="0" align="center">
<tbody>
<tr>
<td style="border: 1px solid #000000;">VARFMT</td>
<td style="border: 1px solid #000000;">Returns the format that is assigned to a SAS data set variable.</td>
</tr>
<tr>
<td style="border: 1px solid #000000;">VARINFMT</td>
<td style="border: 1px solid #000000;">Returns the informat that is assigned to a SAS data set variable.</td>
</tr>
<tr>
<td style="border: 1px solid #000000;">VARLABEL</td>
<td style="border: 1px solid #000000;">Returns the label that is assigned to a SAS data set variable.</td>
</tr>
<tr>
<td style="border: 1px solid #000000;">VARLEN</td>
<td style="border: 1px solid #000000;">Returns the label that is assigned to a SAS data set variable.</td>
</tr>
<tr>
<td style="border: 1px solid #000000;">VARNAME</td>
<td style="border: 1px solid #000000;">Returns the length of a SAS data set variable.</td>
</tr>
<tr>
<td style="border: 1px solid #000000;">VARTYPE</td>
<td style="border: 1px solid #000000;">Returns the length of a SAS data set variable.</td>
</tr>
</tbody>
</table>
<p>The example below shows how to use VARTYPE and VARLEN functions to retrieve the type and length of variables.</p>
<pre><span style="font-size: small;"><strong><span style="color: #0000ff;">DATA </span></strong></span> <span style="color: #0000ff; font-family: Courier New;"><span style="color: #0000ff; font-family: Courier New;"><span style="color: #0000ff; font-family: Courier New;">_null_</span></span></span><span style="font-family: Courier New;"><span style="font-family: Courier New;">;
</span></span>  dsid=OPEN(<span style="color: #800080; font-family: Courier New;"><span style="color: #800080; font-family: Courier New;"><span style="color: #800080; font-family: Courier New;">"sashelp.class"</span></span></span><span style="font-family: Courier New;"><span style="font-family: Courier New;">);
  <span style="color: #0000ff;">CALL</span> SYMPUT("<span style="color: #800080;">name_length</span>",VARLEN(dsid,VARNUM(dsid,1));
</span></span><span style="color: #0000ff; font-family: Courier New;"><span style="color: #0000ff; font-family: Courier New;"><span style="color: #0000ff; font-family: Courier New;">  CALL</span></span></span><span style="font-family: Courier New;"><span style="font-family: Courier New;"> SYMPUTX(</span></span><span style="color: #800080; font-family: Courier New;"><span style="color: #800080; font-family: Courier New;"><span style="color: #800080; font-family: Courier New;">"height_type"</span></span></span><span style="font-family: Courier New;"><span style="font-family: Courier New;">,VARTYPE(dsid,VARNUM(dsid,</span></span><span style="color: #800080; font-family: Courier New;"><span style="color: #800080; font-family: Courier New;"><span style="color: #800080; font-family: Courier New;">"height"</span></span></span><span style="font-family: Courier New;"><span style="font-family: Courier New;">)));
</span></span><strong><span style="color: #0000ff;">RUN</span></strong><span style="font-family: Courier New;"><span style="font-family: Courier New;">;

</span></span></pre>
<p>Note that in the VARLEN statement we specify the column number of the variable we are interested in. In the VARTYPE example we retrieve the column number by first using the VARNUM function.</p>
<p>All of these functions appear under the SAS SAS File I/O Category. More information about these functions is available within the <a title="SAS(R) 9.2 Language Reference: Dictionary, Fourth Edition" href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000245860.htm">SAS (R) Language Reference: Dictionary </a></p>
<p>The post <a rel="nofollow" href="http://statskom.com/sas-tips-tricks-2/">SAS tips &#038; tricks #2 – Retrieving variable metadata within DATA Steps</a> appeared first on <a rel="nofollow" href="http://statskom.com">Statskom</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://statskom.com/sas-tips-tricks-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAS tips &amp; tricks #1 – The VARNUM function</title>
		<link>http://statskom.com/sas-tips-tricks-1-the-varnum-function/</link>
		<comments>http://statskom.com/sas-tips-tricks-1-the-varnum-function/#comments</comments>
		<pubDate>Fri, 21 Feb 2014 19:55:39 +0000</pubDate>
		<dc:creator><![CDATA[Andrew N]]></dc:creator>
				<category><![CDATA[SAS Tips & Tricks]]></category>
		<category><![CDATA[DICTIONARY TABLES]]></category>
		<category><![CDATA[PROC CONTENTS]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[VARNUM]]></category>

		<guid isPermaLink="false">http://statskom.com/?p=214</guid>
		<description><![CDATA[<p>A couple of well known ways to tell whether a variable is present in a dataset  include using a PROC CONTENTS or by referring to the SASHELP.VCOLUMN Dictionary Table, a perhaps lesser known approach is to utilise the VARNUM function.&#8230; </p><p>The post <a rel="nofollow" href="http://statskom.com/sas-tips-tricks-1-the-varnum-function/">SAS tips &#038; tricks #1 – The VARNUM function</a> appeared first on <a rel="nofollow" href="http://statskom.com">Statskom</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><span style="font-size: medium;">A couple of well known ways to tell whether a variable is present in a dataset  include using a PROC CONTENTS or by referring to the SASHELP.VCOLUMN Dictionary Table, a perhaps lesser known approach is to utilise the VARNUM function.</span></p>
<p><span style="font-size: medium;">The VARNUM function returns the number of a variable’s position within a dataset, or 0 if a variable is not present in a dataset. This value can then be used to control subsequent processing steps, for example,  only executing steps if a particular variable is present in a given dataset.</span></p>
<p><span style="font-size: medium;">The function is used in combination with the OPEN function as shown below.</span></p>
<p><span style="font-size: medium;">In this example we test to see whether the variable HEIGHT exists in the SASHELP.CLASS dataset. The variable is the fourth column within the dataset and so the function returns the value 4. In our example we’ve assigned this value to the macro variable HEIGHT_EXIST, so that it is readily available in subsequent steps.</span></p>
<blockquote>
<pre><span style="color: #888888;"><b>DATA</b> </span>_null_;
  dsid=OPEN("sashelp.class");
  CALL SYMPUTX("height_exist",VARNUM(dsid,"height"));
<b>RUN</b>;</pre>
</blockquote>
<p><span style="font-size: medium;">The VARNUM function can also be used in combination with other functions, for example VARTYPE and VARLABEL to gain additional information about the attributes of a variable.  </span></p>
<p><span style="font-size: medium;">See how in our next SAS Tips &amp; Tricks blog.</span></p>
<p>The post <a rel="nofollow" href="http://statskom.com/sas-tips-tricks-1-the-varnum-function/">SAS tips &#038; tricks #1 – The VARNUM function</a> appeared first on <a rel="nofollow" href="http://statskom.com">Statskom</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://statskom.com/sas-tips-tricks-1-the-varnum-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing our SAS ® paper reviews</title>
		<link>http://statskom.com/statskom-paper-review/</link>
		<comments>http://statskom.com/statskom-paper-review/#comments</comments>
		<pubDate>Sun, 16 Feb 2014 00:22:17 +0000</pubDate>
		<dc:creator><![CDATA[Andrew N]]></dc:creator>
				<category><![CDATA[SAS paper review]]></category>
		<category><![CDATA[Paper review]]></category>
		<category><![CDATA[PharmaSUG]]></category>
		<category><![CDATA[PhUSE]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[SAS Global Forum]]></category>
		<category><![CDATA[Statistical Programming]]></category>

		<guid isPermaLink="false">http://statskom.com/?p=197</guid>
		<description><![CDATA[<p>Each week we review a statistical programming, SAS ® or life sciences paper that we have found especially informative or that we think will be of particular use for the statistical programmer working in the life sciences industry. The papers we&#8230; </p><p>The post <a rel="nofollow" href="http://statskom.com/statskom-paper-review/">Introducing our SAS ® paper reviews</a> appeared first on <a rel="nofollow" href="http://statskom.com">Statskom</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><span style="font-size: medium;"><span style="color: #000000;"><span style="font-family: Arial;">Each week we review a statistical programming, <span style="color: #000000; font-family: Arial; font-size: medium;">SAS ®</span> or life sciences paper that we have found especially informative or that we think will be of particular use for the statistical programmer working in the life sciences industry.</span></span></span></p>
<p><span style="font-size: medium;"><span style="color: #000000;"><span style="font-family: Arial;">The papers we review will all be publically available and will usually have been presented at conferences by organisations such as <a title="Phuse" href="http://www.phusewiki.org/wiki/index.php?title=PhUSE_Wiki">PhUSE</a>, <a title="SAS Gloabal Forum" href="http://support.sas.com/events/sasglobalforum/">SAS Global Forum</a>, or</span></span></span><span style="font-size: medium;"><span style="color: #000000;"><span style="font-family: Arial;"> <a title="Pharmaceutical Industry SAS® Users Group" href="http://www.pharmasug.org/">PharmaSUG </a>.</span></span></span></p>
<p><span style="font-size: medium;"><span style="color: #000000;"><span style="font-family: Arial;">Read our first recommendation tomorrow.</span></span></span></p>
<p>The post <a rel="nofollow" href="http://statskom.com/statskom-paper-review/">Introducing our SAS ® paper reviews</a> appeared first on <a rel="nofollow" href="http://statskom.com">Statskom</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://statskom.com/statskom-paper-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
