<?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>darrylovia Tracker</title>
    <link>https://communities.sas.com/kntur85557/tracker</link>
    <description>darrylovia Tracker</description>
    <pubDate>Sun, 17 May 2026 12:46:41 GMT</pubDate>
    <dc:date>2026-05-17T12:46:41Z</dc:date>
    <item>
      <title>Re: PROC SQL - Insert date on Oracle table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-Insert-date-on-Oracle-table/m-p/113546#M31453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A few things.&lt;/P&gt;&lt;P&gt;the value clause only accepts values not expressions/functions such as datetime.&amp;nbsp; To get what you want I would create temporary SAS data set then insert that dataset into your oracle table.&amp;nbsp; See my example below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data one;&lt;/P&gt;&lt;P&gt;det=1;&lt;/P&gt;&lt;P&gt;mydate=datetime();&lt;/P&gt;&lt;P&gt;format mydate datetime.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; insert into myora.test1 (det,mydate)&lt;/P&gt;&lt;P&gt;&amp;nbsp; select det,mydate&lt;/P&gt;&lt;P&gt; from one;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 14:27:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-Insert-date-on-Oracle-table/m-p/113546#M31453</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2012-11-01T14:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use proc univariate for getting a clue on group cut off lines</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Can-we-use-proc-univariate-for-getting-a-clue-on-group-cut-off/m-p/104656#M5524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could also use the HISTOGRAM option after var income / histogram; to see what SAS comes up with.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2012 17:24:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Can-we-use-proc-univariate-for-getting-a-clue-on-group-cut-off/m-p/104656#M5524</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2012-07-13T17:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to quickly identify variables that distinguish records uniquely</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-quickly-identify-variables-that-distinguish-records/m-p/117273#M32354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A quick question before I try to answer.&lt;/P&gt;&lt;P&gt;If your source data is in a RDMS like Oracle, DB2, Teradata, SQL server, you can query the system tables and find the index on the tables which are unique.&amp;nbsp; If not any of the answers above will work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2012 14:19:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-quickly-identify-variables-that-distinguish-records/m-p/117273#M32354</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2012-05-17T14:19:27Z</dc:date>
    </item>
    <item>
      <title>How do I get a multi-level ODBC path to work?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-get-a-multi-level-ODBC-path-to-work/m-p/39344#M7949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;did you try the owner= option&lt;/P&gt;&lt;P&gt;for SQL Server it is usually dbo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Nov 2011 18:33:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-get-a-multi-level-ODBC-path-to-work/m-p/39344#M7949</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2011-11-04T18:33:25Z</dc:date>
    </item>
    <item>
      <title>From Base SAS to Enterprise Guide</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/From-Base-SAS-to-Enterprise-Guide/m-p/38004#M4637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I would put in a help ticket.&amp;nbsp; It looks like the user (you) has not been put into the system via sas management console.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 15:00:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/From-Base-SAS-to-Enterprise-Guide/m-p/38004#M4637</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2011-07-28T15:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: Do loop or array?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Do-loop-or-array/m-p/12497#M1356</link>
      <description>Generally with an array you use some type of do loop.  See my example below:&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data b;&lt;BR /&gt;
  set a;&lt;BR /&gt;
&lt;BR /&gt;
  array m(12);&lt;BR /&gt;
  zero=0;&lt;BR /&gt;
  do i=1 to dim(m);&lt;BR /&gt;
    zero=zero+(m&lt;I&gt; ne 0);&lt;BR /&gt;
  end;&lt;BR /&gt;
run;&lt;/I&gt;</description>
      <pubDate>Mon, 13 Jun 2011 20:00:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Do-loop-or-array/m-p/12497#M1356</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2011-06-13T20:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: Way to pick the latest file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Way-to-pick-the-latest-file/m-p/67354#M19262</link>
      <description>you can also check DINFO to get all the items in a directory</description>
      <pubDate>Thu, 02 Jun 2011 16:57:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Way-to-pick-the-latest-file/m-p/67354#M19262</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2011-06-02T16:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: Where is ROW in proc sql?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Where-is-ROW-in-proc-sql/m-p/69999#M15149</link>
      <description>I've used the MONOTINC function with no ill effects for one table processing.  I believe when joins occur the MONOTONIC function may fail.  Sounds like a fun experiment!</description>
      <pubDate>Thu, 26 May 2011 20:01:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Where-is-ROW-in-proc-sql/m-p/69999#M15149</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2011-05-26T20:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: simple question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/simple-question/m-p/69468#M19946</link>
      <description>i did notice in your code that the LIBNAME names uses OLEBD to connect to SQL Server and the SQL Pass-through uses ODBC.  Try using the same connection method and see what happens.&lt;BR /&gt;
&lt;BR /&gt;
D</description>
      <pubDate>Wed, 25 May 2011 19:29:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/simple-question/m-p/69468#M19946</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2011-05-25T19:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: Function Multiply</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Function-Multiply/m-p/68676#M14872</link>
      <description>Unfortunately not.&lt;BR /&gt;
I would love to have a PRODUCT function and a SUMPRODUCT function, but in the mean time you'll have to use an ARRAY to calculated it.</description>
      <pubDate>Mon, 23 May 2011 20:23:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Function-Multiply/m-p/68676#M14872</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2011-05-23T20:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to move file folder-to-folder</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-move-file-folder-to-folder/m-p/67394#M6768</link>
      <description>Hello&lt;BR /&gt;
&lt;BR /&gt;
I work exclusively in SAS Enterprise Guide and have had the same problem that you have.  I solved mine by directly accessing the Windows DLL that contains the copy/move function by using the SASCBTL attribute table with the MODULE family of call routines and functions.  Below is a link to a paper that I wrote for SESUG 2010 that describes how to do this.&lt;BR /&gt;
&lt;BR /&gt;
paper&lt;BR /&gt;
&lt;A href="http://analytics.ncsu.edu/sesug/2010/CC06.Putnam.pdf" target="_blank"&gt;http://analytics.ncsu.edu/sesug/2010/CC06.Putnam.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
SAS DOC&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#accdll.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#accdll.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Enjoy&lt;BR /&gt;
D</description>
      <pubDate>Thu, 19 May 2011 15:22:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-move-file-folder-to-folder/m-p/67394#M6768</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2011-05-19T15:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: Convert full date to year and week of the year?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Convert-full-date-to-year-and-week-of-the-year/m-p/66399#M18973</link>
      <description>Just convert the date to a character like below&lt;BR /&gt;
&lt;BR /&gt;
data two;&lt;BR /&gt;
  set one;&lt;BR /&gt;
  format myweek weeku6.;&lt;BR /&gt;
  myweek=raw_date;&lt;BR /&gt;
  cat_week=put(raw_date,weeku6.);&lt;BR /&gt;
run;</description>
      <pubDate>Tue, 17 May 2011 17:58:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Convert-full-date-to-year-and-week-of-the-year/m-p/66399#M18973</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2011-05-17T17:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: Convert full date to year and week of the year?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Convert-full-date-to-year-and-week-of-the-year/m-p/66394#M18968</link>
      <description>SAS has a number of date functions and formats that you could use to solve your problem.  Try the WEEK function or WEEKU./WEEKW. formats&lt;BR /&gt;
&lt;BR /&gt;
Try looking at the documentation&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003154994.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003154994.htm&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a002604217.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a002604217.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
below is a quite example for week begining with Sunday&lt;BR /&gt;
&lt;BR /&gt;
data one;&lt;BR /&gt;
format raw_date yymmddp10.;&lt;BR /&gt;
input raw_date yymmdd10.;&lt;BR /&gt;
datalines;&lt;BR /&gt;
2009.01.05&lt;BR /&gt;
2009.01.06&lt;BR /&gt;
2010.01.05&lt;BR /&gt;
2011.01.05&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data two;&lt;BR /&gt;
  set one;&lt;BR /&gt;
  format myweek weeku6.;&lt;BR /&gt;
  myweek=raw_date;&lt;BR /&gt;
run;</description>
      <pubDate>Tue, 17 May 2011 14:50:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Convert-full-date-to-year-and-week-of-the-year/m-p/66394#M18968</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2011-05-17T14:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if new record is added in a sas dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-if-new-record-is-added-in-a-sas-dataset/m-p/66201#M14370</link>
      <description>It all depends on how the new record is inserted into your master table and how big your table is.  There are many was to accomplish this functionallity.  &lt;BR /&gt;
&lt;BR /&gt;
I would use any of the 4 methods below:&lt;BR /&gt;
1) I would create a timestamp and the most recent record would be the max timestamp, additional you can create  a new record flag from the transaction set. &lt;BR /&gt;
&lt;BR /&gt;
2) create a new record flag from the incoming data set&lt;BR /&gt;
 See below for a quick code snippet.&lt;BR /&gt;
&lt;BR /&gt;
3) create an audit data set&lt;BR /&gt;
&lt;BR /&gt;
4) create a unique sequential id for your master file and store the max value in another table.  All inserted record would be incremented by 1 then any ID greater than the max id would be new.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data master_table;&lt;BR /&gt;
  format timestamp datetime21.2;&lt;BR /&gt;
  ID=1;value='HELLO';timestamp=datetime();output;&lt;BR /&gt;
  ID=2;value='WORLD';timestamp=datetime();output;&lt;BR /&gt;
run;&lt;BR /&gt;
proc sql;&lt;BR /&gt;
  create table max_id as&lt;BR /&gt;
    select max(id) as max_id&lt;BR /&gt;
	from master_table;&lt;BR /&gt;
  select max_id&lt;BR /&gt;
  into :max_id&lt;BR /&gt;
  from max_id;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
data transaction_table;&lt;BR /&gt;
  value='TEST ';&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data master_table;&lt;BR /&gt;
  set master_table (in=inMaster)&lt;BR /&gt;
      transaction_table (in=inTransaction) &lt;BR /&gt;
      ;&lt;BR /&gt;
  * create timestamp to find newest record;&lt;BR /&gt;
  * create 1/0 indicator for newest record;&lt;BR /&gt;
  * increment id by 1;&lt;BR /&gt;
  if inTransaction then do;&lt;BR /&gt;
    counter+1;&lt;BR /&gt;
    timestamp=datetime();&lt;BR /&gt;
    new=(inTransaction);&lt;BR /&gt;
	id=&amp;amp;max_id+counter;&lt;BR /&gt;
  end;&lt;BR /&gt;
run;</description>
      <pubDate>Tue, 17 May 2011 11:27:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-check-if-new-record-is-added-in-a-sas-dataset/m-p/66201#M14370</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2011-05-17T11:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: RSUBMIT batches unresponsive</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RSUBMIT-batches-unresponsive/m-p/66161#M14362</link>
      <description>i don't think the CONNECTWAIT option is causing your problems.  Since the log snippet isn't producing an ERROR maybe your data doesn't have any rows which may be unexpected.  &lt;BR /&gt;
&lt;BR /&gt;
Is there any subsetting based on dates or anything like that when the data sets like WORK.FIVE is being produces?</description>
      <pubDate>Mon, 16 May 2011 21:11:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RSUBMIT-batches-unresponsive/m-p/66161#M14362</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2011-05-16T21:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Random sample until</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Random-sample-until/m-p/66139#M18868</link>
      <description>for some reason my post was truncated.  &lt;BR /&gt;
&lt;BR /&gt;
here is the completed code&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data stocks;&lt;BR /&gt;
  set sashelp.stocks;&lt;BR /&gt;
  weight=ranuni(8)*.05;&lt;BR /&gt;
  rand=ranuni(789);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc sort data=stocks;&lt;BR /&gt;
  by rand;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data portfolio;&lt;BR /&gt;
  set stocks;&lt;BR /&gt;
  retain one 0;&lt;BR /&gt;
&lt;BR /&gt;
  one+weight;&lt;BR /&gt;
  if one le 1;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Regards</description>
      <pubDate>Mon, 16 May 2011 19:18:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Random-sample-until/m-p/66139#M18868</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2011-05-16T19:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Random sample until</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Random-sample-until/m-p/66138#M18867</link>
      <description>It seems that you're is approach is good and that you are stuck on how to increment to weight up to 1.  SAS has a RETAIN feature that retains the value from one record to another.  See my below code using an example;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data stocks;&lt;BR /&gt;
  set sashelp.stocks;&lt;BR /&gt;
  weight=ranuni(8)*.05;&lt;BR /&gt;
  rand=ranuni(789);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc sort data=stocks;&lt;BR /&gt;
  by rand;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data portfolio;&lt;BR /&gt;
  set stocks;&lt;BR /&gt;
  retain one 0;&lt;BR /&gt;
&lt;BR /&gt;
  one+weight;&lt;BR /&gt;
  if one&amp;lt;=1;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Regards</description>
      <pubDate>Mon, 16 May 2011 19:13:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Random-sample-until/m-p/66138#M18867</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2011-05-16T19:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: datalines eof option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/datalines-eof-option/m-p/65221#M14154</link>
      <description>Since you only want the last record you can use a subsetting if&lt;BR /&gt;
&lt;BR /&gt;
data vac_used; &lt;BR /&gt;
  retain vac_used 0;&lt;BR /&gt;
  input date1 :ddmmyy10. date2 :ddmmyy10. holidays :5.;&lt;BR /&gt;
  days1=date2-date1+1-holidays;&lt;BR /&gt;
  vac_used=vac_used+days1;&lt;BR /&gt;
  format date1 date2 date9.;&lt;BR /&gt;
&lt;BR /&gt;
  if _n_=4;&lt;BR /&gt;
&lt;BR /&gt;
 put _all_; &lt;BR /&gt;
datalines;&lt;BR /&gt;
18.05.2009 22.05.2009 0&lt;BR /&gt;
24.08.2009 11.09.2009 0&lt;BR /&gt;
13.10.2010 29.10.2010 0&lt;BR /&gt;
27.12.2010 31.12.2010 0&lt;BR /&gt;
;&lt;BR /&gt;
run;</description>
      <pubDate>Thu, 12 May 2011 11:43:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/datalines-eof-option/m-p/65221#M14154</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2011-05-12T11:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Create a matrix using a SAS dataset with row and column information</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Create-a-matrix-using-a-SAS-dataset-with-row-and-column/m-p/64908#M18471</link>
      <description>I have a general approach that uses BASE SAS and not PROC IML but this should get what you are looking for.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
** Data in a listing structure;&lt;BR /&gt;
data one;&lt;BR /&gt;
input row column element;&lt;BR /&gt;
datalines;&lt;BR /&gt;
1 1 0.5&lt;BR /&gt;
1 3 0.2&lt;BR /&gt;
2 1 0.4&lt;BR /&gt;
2 2 0.6&lt;BR /&gt;
3 2 0.7&lt;BR /&gt;
3 3 0.1&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
** get maximum dimension;&lt;BR /&gt;
proc sql;&lt;BR /&gt;
  select max(column)&lt;BR /&gt;
  into :c&lt;BR /&gt;
  from one;&lt;BR /&gt;
quit;&lt;BR /&gt;
%let c=&amp;amp;c;&lt;BR /&gt;
&lt;BR /&gt;
%put  c=&amp;amp;c;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc sort data=one;&lt;BR /&gt;
  by row;&lt;BR /&gt;
run;&lt;BR /&gt;
** Convert data from listing to matrix structure;&lt;BR /&gt;
data matrix(keep=x:);&lt;BR /&gt;
  set one;&lt;BR /&gt;
&lt;BR /&gt;
  array x(&amp;amp;c);&lt;BR /&gt;
&lt;BR /&gt;
  do until (last.row);&lt;BR /&gt;
    set one end=eof;&lt;BR /&gt;
	by row;&lt;BR /&gt;
	x(column)=element;&lt;BR /&gt;
  end;&lt;BR /&gt;
&lt;BR /&gt;
  do i=1 to dim(x);&lt;BR /&gt;
    if missing(x(i)) then x(i)=0;&lt;BR /&gt;
  end;&lt;BR /&gt;
run;</description>
      <pubDate>Wed, 11 May 2011 15:50:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Create-a-matrix-using-a-SAS-dataset-with-row-and-column/m-p/64908#M18471</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2011-05-11T15:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Function SUM requires a numeric expression as argument 1</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-Function-SUM-requires-a-numeric-expression-as-argument-1/m-p/54671#M15167</link>
      <description>&amp;gt; Why does your sum statement have two 'sum' functions?&lt;BR /&gt;
&amp;gt; I can't test it at the moment, but would suggest&lt;BR /&gt;
&amp;gt;  trying it as sum(normal,etc., etc.).&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Art&lt;BR /&gt;
&amp;gt; -----------&lt;BR /&gt;
&amp;gt; &amp;gt; Hi &lt;BR /&gt;
&amp;gt; &amp;gt; &lt;BR /&gt;
&amp;gt; &amp;gt; I am trying to sum using proc sql but I get the&lt;BR /&gt;
&amp;gt; &amp;gt; following on the log window&lt;BR /&gt;
&amp;gt; &amp;gt; &lt;BR /&gt;
&amp;gt; &amp;gt; proc sql;&lt;BR /&gt;
&amp;gt; &amp;gt; 519  create table limbs3 as&lt;BR /&gt;
&amp;gt; &amp;gt; 520  select&lt;BR /&gt;
&amp;gt; &amp;gt; 521          id,&lt;BR /&gt;
&amp;gt; &amp;gt; 522  sum(sum(normal, alo2, call3, red4, wound5,&lt;BR /&gt;
&amp;gt; &amp;gt; callswe6,&lt;BR /&gt;
&amp;gt; &amp;gt; 523          swound7, sswe8, swound_sswe9)) as&lt;BR /&gt;
&amp;gt; score&lt;BR /&gt;
&amp;gt; &amp;gt; 524  FROM limbs_sum;&lt;BR /&gt;
&amp;gt; &amp;gt; ERROR: Function SUM requires a numeric expression&lt;BR /&gt;
&amp;gt; as&lt;BR /&gt;
&amp;gt; &amp;gt; argument 1.&lt;BR /&gt;
&amp;gt; &amp;gt; ERROR: Function SUM requires a numeric expression&lt;BR /&gt;
&amp;gt; as&lt;BR /&gt;
&amp;gt; &amp;gt; argument 2.&lt;BR /&gt;
&amp;gt; &amp;gt; ERROR: Function SUM requires a numeric expression&lt;BR /&gt;
&amp;gt; as&lt;BR /&gt;
&amp;gt; &amp;gt; argument 3.&lt;BR /&gt;
&amp;gt; &amp;gt; ERROR: Function SUM requires a numeric expression&lt;BR /&gt;
&amp;gt; as&lt;BR /&gt;
&amp;gt; &amp;gt; argument 4.&lt;BR /&gt;
&amp;gt; &amp;gt; ERROR: Function SUM requires a numeric expression&lt;BR /&gt;
&amp;gt; as&lt;BR /&gt;
&amp;gt; &amp;gt; argument 5.&lt;BR /&gt;
&amp;gt; &amp;gt; ERROR: Function SUM requires a numeric expression&lt;BR /&gt;
&amp;gt; as&lt;BR /&gt;
&amp;gt; &amp;gt; argument 6.&lt;BR /&gt;
&amp;gt; &amp;gt; ERROR: Function SUM requires a numeric expression&lt;BR /&gt;
&amp;gt; as&lt;BR /&gt;
&amp;gt; &amp;gt; argument 7.&lt;BR /&gt;
&amp;gt; &amp;gt; ERROR: Function SUM requires a numeric expression&lt;BR /&gt;
&amp;gt; as&lt;BR /&gt;
&amp;gt; &amp;gt; argument 8.&lt;BR /&gt;
&amp;gt; &amp;gt; ERROR: Function SUM requires a numeric expression&lt;BR /&gt;
&amp;gt; as&lt;BR /&gt;
&amp;gt; &amp;gt; argument 9.&lt;BR /&gt;
&amp;gt; &amp;gt; ERROR: The SUM summary function requires a numeric&lt;BR /&gt;
&amp;gt; &amp;gt; argument.&lt;BR /&gt;
&amp;gt; &amp;gt; 525  group by id;&lt;BR /&gt;
&amp;gt; &amp;gt; 526  quit;&lt;BR /&gt;
&amp;gt; &amp;gt; &lt;BR /&gt;
&amp;gt; &amp;gt; &lt;BR /&gt;
&amp;gt; &amp;gt; what am I doing wrong?&lt;BR /&gt;
&amp;gt; &amp;gt; &lt;BR /&gt;
&amp;gt; &amp;gt; Thanks for your help&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I think you put a semi-colon after your FROM CLAUSE and that needs to be removed.&lt;BR /&gt;
The syntax works for me by using the below code&lt;BR /&gt;
proc sql;&lt;BR /&gt;
  create table table1 as&lt;BR /&gt;
  select region&lt;BR /&gt;
         ,sum(sum(sales,returns)) as gross_sales&lt;BR /&gt;
  from sashelp.shoes&lt;BR /&gt;
  group by region;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
yet if I use a char data type i get your message.  see below&lt;BR /&gt;
&lt;BR /&gt;
16         proc sql;&lt;BR /&gt;
17           create table table3 as&lt;BR /&gt;
18           select region&lt;BR /&gt;
19                  ,sum(sum(product,returns)) as gross_sales&lt;BR /&gt;
20           from sashelp.shoes&lt;BR /&gt;
21           group by region;&lt;BR /&gt;
ERROR: Function SUM requires a numeric expression as argument 1.&lt;BR /&gt;
ERROR: The SUM summary function requires a numeric argument.&lt;BR /&gt;
&lt;BR /&gt;
Also I would check the data types of your table&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
  describe table limbs_sum;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
to double check&lt;BR /&gt;
&lt;BR /&gt;
Add to Art297.  the sum by itself just adds the columns together, the double sum then aggregates the summed columns .&lt;BR /&gt;
&lt;BR /&gt;
D</description>
      <pubDate>Thu, 21 Apr 2011 12:50:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-Function-SUM-requires-a-numeric-expression-as-argument-1/m-p/54671#M15167</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2011-04-21T12:50:43Z</dc:date>
    </item>
  </channel>
</rss>

