<?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: NOBS= variable and DIM(array) as array subscript? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/NOBS-variable-and-DIM-array-as-array-subscript/m-p/139869#M296340</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;PROC&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;SQL&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;NOPRINT&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; NOBS, NUM_CHARACTER, NUM_NUMERIC &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;INTO&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;:NOBS TRIMMED, :NUM_CHARACTER TRIMMED, :NUM_NUMERIC TRIMMED&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; DICTIONARY.TABLES &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; LIBNAME=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'SASHELP'&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; MEMNAME=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'CLASS'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;QUIT&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;%PUT&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; NOBS=&amp;amp;NOBS NUM_CHARACTER=&amp;amp;NUM_CHARACTER NUM_NUMERIC=&amp;amp;NUM_NUMERIC;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;Haikuo &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Jan 2015 14:20:50 GMT</pubDate>
    <dc:creator>Haikuo</dc:creator>
    <dc:date>2015-01-27T14:20:50Z</dc:date>
    <item>
      <title>NOBS= variable and DIM(array) as array subscript?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOBS-variable-and-DIM-array-as-array-subscript/m-p/139864#M296335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My objective is to get NOBS=variable and the values of dim(char) and dim(numeric) from one dataset as use the same as array subscript in another datastep or datasteps(plural) or if possible even in the same datastep. Although, I understand the concept, i just don't know how to technically write a statement to get that to nobs and dim from let's say dataset1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd appreciate if anyone can demonstrate an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please and Thanks,&lt;/P&gt;&lt;P&gt;Charlotte&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 12:05:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOBS-variable-and-DIM-array-as-array-subscript/m-p/139864#M296335</guid>
      <dc:creator>CharlotteCain</dc:creator>
      <dc:date>2015-01-27T12:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: NOBS= variable and DIM(array) as array subscript?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOBS-variable-and-DIM-array-as-array-subscript/m-p/139865#M296336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please describe a bit more about what you wish to achieve (and why). &lt;/P&gt;&lt;P&gt;Also, some sample input/output data, and some pseudo code might help us follow your thoughts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 12:13:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOBS-variable-and-DIM-array-as-array-subscript/m-p/139865#M296336</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-01-27T12:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: NOBS= variable and DIM(array) as array subscript?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOBS-variable-and-DIM-array-as-array-subscript/m-p/139866#M296337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, perhaps more information.&amp;nbsp; You can get obs from sashelp.vtable - variable nobs plus various other methods.&amp;nbsp; You could also query sashelp.vcolumn with a count function to get number of array eg.&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count(1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; into&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :NUM_VARS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SASHELP.VCOLUMN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LIBNAME="WORK"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MEMNAME="ABC"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; substr(NAME,1,3)="COL";&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will give you a number in the macro variable of how many columns would have COL prefix.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 13:04:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOBS-variable-and-DIM-array-as-array-subscript/m-p/139866#M296337</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-01-27T13:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: NOBS= variable and DIM(array) as array subscript?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOBS-variable-and-DIM-array-as-array-subscript/m-p/139867#M296338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let us take a small example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have the Data Set, CLASS, from SASHELP.CLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data class;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; set sashelp.class;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We wish to count the Frequency of AGE. We assume that the Maximum Age of the CLASS is 16. (This assumption is not needed as we could find the Max and Min Age in the previous step).&lt;/P&gt;&lt;P&gt;We use an array K with a dimension of 16 as no AGE can exceed it in the data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We contrive a trivial way to use the number observations of the data set so that we read one observation at a time using I as a counter&amp;nbsp; until the counter(I) does not exceed NUM which is the total number of observations of the Data Set. When I = NUM, the do-loop ends and the next do-loop,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;do i = 1 to dim(k);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;is carried out. The Subscript of the array K takes values from 1 to dim(k) which happens to be 1 to 16. In this do-loop, if the array-cell contains a value &amp;gt; 0, then it is output. The Output data set is shown below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Hope this helps you to understand what you seek.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; array k[16] _temporary_;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; do i = 1 by 1 while ( i &amp;lt;= num);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set class nobs = num;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; k[Age] + 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; do i = 1 to dim(k);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if k&lt;I&gt; &amp;gt; 0 then do;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Age = i;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Freq = k&lt;I&gt;;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;keep Age Freq;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obs&amp;nbsp;&amp;nbsp;&amp;nbsp; Age&amp;nbsp;&amp;nbsp;&amp;nbsp; Freq&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&lt;/P&gt;&lt;P&gt; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;&lt;P&gt; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;&lt;P&gt; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;&lt;P&gt; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 13:54:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOBS-variable-and-DIM-array-as-array-subscript/m-p/139867#M296338</guid>
      <dc:creator>KachiM</dc:creator>
      <dc:date>2015-01-27T13:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: NOBS= variable and DIM(array) as array subscript?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOBS-variable-and-DIM-array-as-array-subscript/m-p/139868#M296339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For use in many DATA steps, macro language would be appropriate:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;set first_dataset nobs=_total_obs_;&lt;/P&gt;&lt;P&gt;array nums {*} _numeric_;&lt;/P&gt;&lt;P&gt;array chars {*} _character_;&lt;/P&gt;&lt;P&gt;call symputx('n_obs', _total_obs_);&lt;/P&gt;&lt;P&gt;call symputx('n_nums', dim(nums));&lt;/P&gt;&lt;P&gt;call symputx('n_chars', dim(chars));&lt;/P&gt;&lt;P&gt;stop;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That gives you three macro variables to work with in later steps &amp;amp;N_OBS, &amp;amp;N_NUMS, and &amp;amp;N_CHARS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can get these values in the same DATA step, without macro language:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if 0 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set first_datset nobs=_total_obs_;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array nums {*} _numeric_;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array chars {*} _character_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set second_dataset;&lt;/P&gt;&lt;P&gt;&amp;nbsp; *** Add statements to process second_dataset;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This gives you three DATA step numbers to work with:&amp;nbsp; _total_obs_, dim(nums), and dim(chars).&amp;nbsp; Note that the contents of the arrays depend only on the first data set, and the second SET statement does not impact the arrays.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 14:07:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOBS-variable-and-DIM-array-as-array-subscript/m-p/139868#M296339</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-01-27T14:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: NOBS= variable and DIM(array) as array subscript?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOBS-variable-and-DIM-array-as-array-subscript/m-p/139869#M296340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;PROC&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;SQL&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;NOPRINT&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; NOBS, NUM_CHARACTER, NUM_NUMERIC &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;INTO&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;:NOBS TRIMMED, :NUM_CHARACTER TRIMMED, :NUM_NUMERIC TRIMMED&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; DICTIONARY.TABLES &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; LIBNAME=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'SASHELP'&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; MEMNAME=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'CLASS'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;QUIT&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;%PUT&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; NOBS=&amp;amp;NOBS NUM_CHARACTER=&amp;amp;NUM_CHARACTER NUM_NUMERIC=&amp;amp;NUM_NUMERIC;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;Haikuo &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 14:20:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOBS-variable-and-DIM-array-as-array-subscript/m-p/139869#M296340</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2015-01-27T14:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: NOBS= variable and DIM(array) as array subscript?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOBS-variable-and-DIM-array-as-array-subscript/m-p/139870#M296341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Beautiful and neat, Thank you Sir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your second example wouldn't the contents of the PDV include variable descriptors of both datasets with missing values to variables of dataset1?&lt;/P&gt;&lt;P&gt;If yes, dropping or keeping them be necessary later?&lt;/P&gt;&lt;P&gt;/*coz i thought if 0 then set would still fully compile the entire descriptive portions occupying more memory but doing it one pass is awesome too, may i ask what do you reckon would be most efficient?*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please accept my apologies if i am wrong and silly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@hkuo @datsp and RW, Many thanks for the quick response. I really appreciate it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Charlotte from England!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 16:46:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOBS-variable-and-DIM-array-as-array-subscript/m-p/139870#M296341</guid>
      <dc:creator>CharlotteCain</dc:creator>
      <dc:date>2015-01-27T16:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: NOBS= variable and DIM(array) as array subscript?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOBS-variable-and-DIM-array-as-array-subscript/m-p/139871#M296342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you're correct about the PDV.&amp;nbsp; You could add this statement:&lt;/P&gt;&lt;P&gt;drop _numeric_ _character_;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just be sure to add it before the second SET statement ... and test it of course.&amp;nbsp; But the definition of _numeric_ and _character_ in a DATA step is supposed to mean all the numeric (or character) variables defined so far.&amp;nbsp; So this should work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2015 14:49:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOBS-variable-and-DIM-array-as-array-subscript/m-p/139871#M296342</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-01-28T14:49:55Z</dc:date>
    </item>
  </channel>
</rss>

