<?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>CTorres Tracker</title>
    <link>https://communities.sas.com/kntur85557/tracker</link>
    <description>CTorres Tracker</description>
    <pubDate>Mon, 04 May 2026 22:53:56 GMT</pubDate>
    <dc:date>2026-05-04T22:53:56Z</dc:date>
    <item>
      <title>Re: Time Conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-Conversion/m-p/213041#M39349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is Mark Johnson' solution improved:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;txt=put(number,z4.);&lt;/P&gt;&lt;P&gt;time = put(input(substr(txt,1,2),2.)*3600+(input(substr(txt,3),2.)*60),timeampm.);&lt;/P&gt;&lt;P&gt;drop txt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CTorres&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 18:08:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-Conversion/m-p/213041#M39349</guid>
      <dc:creator>CTorres</dc:creator>
      <dc:date>2015-06-24T18:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: re: email attachments</title>
      <link>https://communities.sas.com/t5/SAS-Programming/re-email-attachments/m-p/208474#M38761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I am not very good using macro language specially when I have to deal with quotes and special characters like in this case.&lt;/P&gt;&lt;P&gt;If I were you I would avoid using macros because in my opinion SAS Base language is a much better tool to do what you need. I would:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Run SAS code (without macros) to test the email with one attachment.&lt;/P&gt;&lt;P&gt;2. Run SAS code to test the email with two or more attachments.&lt;/P&gt;&lt;P&gt;3. Once I am sure about the syntax then I would use the SAS Data Step to generate the list of n files using SAS Base (no macro at all).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe this is a safer approach than using macros.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;&lt;P&gt;CTorres&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 18:47:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/re-email-attachments/m-p/208474#M38761</guid>
      <dc:creator>CTorres</dc:creator>
      <dc:date>2015-06-22T18:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: Import zip csv file to SAS, Date variable values missing</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-zip-csv-file-to-SAS-Date-variable-values-missing/m-p/211430#M52222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try reading Sale_date using an informat:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;&amp;nbsp; input Sale_date &lt;STRONG&gt;MMDDYY10.&lt;/STRONG&gt; City_CD Brand $ MODEL_YEAR Units;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; 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; font-size: 13px; background-color: #ffffff;"&gt;CTorres&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 16:38:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-zip-csv-file-to-SAS-Date-variable-values-missing/m-p/211430#M52222</guid>
      <dc:creator>CTorres</dc:creator>
      <dc:date>2015-06-22T16:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: re: email attachments</title>
      <link>https://communities.sas.com/t5/SAS-Programming/re-email-attachments/m-p/208472#M38759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the problem here is that you can have only one ATTACH= option in the FILE statement. So you have to use the loop to generate the list of files to attach and the use only one attach= option. Something like:&amp;nbsp; (untested and may be more complex than that)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background: white;"&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;FILENAME mail EMAIL;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background: white;"&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;DATA _NULL_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background: white;"&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;FILE mail&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background: white;"&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;TO = &lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: purple; background-position: initial;"&gt;"&lt;A class="jive-link-email-small" href="mailto:Lisa1245@yahoo.com" style="font-weight: inherit; font-style: inherit; font-size: 13.3333311080933px; font-family: inherit; color: #0e66ba;"&gt;Lisa1245@yahoo.com&lt;/A&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background: white;"&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;FROM = &lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: purple; background-position: initial;"&gt;"&lt;A class="jive-link-email-small" href="mailto:argo34@yahoo.com" style="font-weight: inherit; font-style: inherit; font-size: 13.3333311080933px; font-family: inherit; color: #0e66ba;"&gt;argo34@yahoo.com&lt;/A&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background: white;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-position: initial;"&gt;%macro&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; &lt;STRONG style="font-style: inherit; font-size: 13.3333311080933px; font-family: inherit;"&gt;&lt;EM style="font-weight: inherit; font-size: 13.3333311080933px;"&gt;send_email&lt;/EM&gt;&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background: white;"&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;&lt;STRONG&gt;%LET mylist=;&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background: white;"&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;%DO&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; i=&lt;/SPAN&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: teal; background-position: initial;"&gt;1&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;%TO&lt;/SPAN&gt; &lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;(COUNTW(&amp;amp;FILENAMELIST1,’|’));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background: white;"&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;%LET&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; NEXT_FILENAMELIST1 = %SCAN(&amp;amp;FILENAMELIST1,&amp;amp;i,|);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background: white;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;&amp;nbsp;&amp;nbsp; &amp;amp;LET mylist=&amp;amp;mylist. &lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: purple; background-position: initial;"&gt;"%sysfunc(pathname(project))\&amp;amp;NEXT_FILE&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; NAMELIST1&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: purple; background-position: initial;"&gt;..PDF"&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;;&amp;nbsp;&amp;nbsp; /* here you build the list */&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background: white;"&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;%END&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;ATTACH=(&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: purple; background-position: initial;"&gt;"&amp;amp;mylist&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: purple; background-position: initial;"&gt;"&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;);&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background: white;"&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;PUT &lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: purple; background-position: initial;"&gt;"Hi Lisa,"&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background: white;"&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;PUT &lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: purple; background-position: initial;"&gt;" "&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background: white;"&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;PUT &lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: purple; background-position: initial;"&gt;"This is test"&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background: white;"&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;PUT &lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: purple; background-position: initial;"&gt;" "&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background: white;"&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;PUT &lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: purple; background-position: initial;"&gt;"Thanks,"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background: white;"&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;RUN;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background: white;"&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;QUIT&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background: white;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-position: initial;"&gt;%mend&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CTorres&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 16:27:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/re-email-attachments/m-p/208472#M38759</guid>
      <dc:creator>CTorres</dc:creator>
      <dc:date>2015-06-22T16:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: insert rows based on output from subtracting two rows in the same column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/insert-rows-based-on-output-from-subtracting-two-rows-in-the/m-p/207856#M38657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;You can recreate the email sequence with the following additional Data step:&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;data want(rename=seq=email);&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; set want(drop=email);&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; by ID;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; retain seq;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; if first.id then seq=1;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else seq=seq+1;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;run;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;CTorres&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 15:52:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/insert-rows-based-on-output-from-subtracting-two-rows-in-the/m-p/207856#M38657</guid>
      <dc:creator>CTorres</dc:creator>
      <dc:date>2015-06-17T15:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: Read Hierarchical Files in SAS DI Studio</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-Hierarchical-Files-in-SAS-DI-Studio/m-p/208259#M267209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As far as I understand there isn't an out-the-box transformation to do that but you can use either the &lt;STRONG&gt;User Written Code Transformation&lt;/STRONG&gt; or the &lt;STRONG&gt;New Transformation Wizard &lt;/STRONG&gt;to generate the required SAS code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CTorres &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 14:43:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-Hierarchical-Files-in-SAS-DI-Studio/m-p/208259#M267209</guid>
      <dc:creator>CTorres</dc:creator>
      <dc:date>2015-06-17T14:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to Combine Municipal Proc SQL Statements Based on Date Criteria</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-to-Combine-Municipal-Proc-SQL-Statements-Based-on-Date/m-p/203789#M37974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Proc SQL produces ONLY one output Dataset.&lt;/P&gt;&lt;P&gt;You can use a SAS Data Step to generate many datasets in one pass.&lt;/P&gt;&lt;P&gt;The following program creates the three datasets you want using the today as the reference date to count the 0-12, 13-24 and 25-36 months back. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data Customers_Active Customers_Inactive Customers_Lapsed;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set transaction_vw;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if transaction_date &amp;gt; today()-365 then output Customers_Active;&lt;/P&gt;&lt;P&gt;&amp;nbsp; else if transaction_date &amp;gt; today()-730 then output Customers_Inactive;&lt;/P&gt;&lt;P&gt;&amp;nbsp; else if transaction_date &amp;gt; today()-1095 then output Customers_Lapsed;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the program as a starting point to get your results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CTorres&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 19:27:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-to-Combine-Municipal-Proc-SQL-Statements-Based-on-Date/m-p/203789#M37974</guid>
      <dc:creator>CTorres</dc:creator>
      <dc:date>2015-06-12T19:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Last First Mi from a single variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-Last-First-Mi-from-a-single-variable/m-p/204082#M50865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very simplistic but works if there are no composed names, prefixes, more than one initial, etc...:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; name='Doe, John M';&lt;/P&gt;&lt;P&gt;&amp;nbsp; last=scan(name,1);&lt;/P&gt;&lt;P&gt;&amp;nbsp; first=scan(name,2);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Mi=scan(name,3);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;CTorres&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2015 20:01:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-Last-First-Mi-from-a-single-variable/m-p/204082#M50865</guid>
      <dc:creator>CTorres</dc:creator>
      <dc:date>2015-06-11T20:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Character Value from String at Specific Position in String</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Removing-Character-Value-from-String-at-Specific-Position-in/m-p/202559#M50556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, It works OK but I would improve the program with a compress at the end to remove the blanks:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt; set have;&lt;/P&gt;&lt;P&gt; want=have;&lt;/P&gt;&lt;P&gt; substr(want,ifn(position-1=0,1,position-1)*2,2)='';&lt;/P&gt;&lt;P&gt; want=compress(want);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CTorres&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2015 14:40:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Removing-Character-Value-from-String-at-Specific-Position-in/m-p/202559#M50556</guid>
      <dc:creator>CTorres</dc:creator>
      <dc:date>2015-06-11T14:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Character Value from String at Specific Position in String</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Removing-Character-Value-from-String-at-Specific-Position-in/m-p/202555#M50552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My program works as you want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length ID position 8 Have $ 20;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input ID position have;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1000 2&amp;nbsp; N,N,Y&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;1001 2&amp;nbsp; Y,N,N,N,Y&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;1002 4&amp;nbsp; N,N,N,N,N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;1003 6&amp;nbsp; N,Y,Y,N,Y,Y,N&amp;nbsp; &lt;/P&gt;&lt;P&gt;1004 5&amp;nbsp; N,Y,N,N,N,Y,N&amp;nbsp; &lt;/P&gt;&lt;P&gt;1005 3&amp;nbsp; Y,N,Y&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;;&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;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length Wanted $20;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i=1 to countw(have);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if i=position then continue;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; wanted=cats(wanted,scan(have,i),',');&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; wanted=substr(wanted,1,length(wanted)-1);&lt;/P&gt;&lt;P&gt;&amp;nbsp; drop i;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CTorres&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 20:08:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Removing-Character-Value-from-String-at-Specific-Position-in/m-p/202555#M50552</guid>
      <dc:creator>CTorres</dc:creator>
      <dc:date>2015-06-10T20:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Character Value from String at Specific Position in String</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Removing-Character-Value-from-String-at-Specific-Position-in/m-p/202553#M50550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you say the position in the string is dynamic I assume that this value is known in every observation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following program removes the text found in different positions (del variable) in the text separated by commas:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length del 8 text $ 20;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input del text;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;2 N,N,Y,Y,N,XX,G&lt;/P&gt;&lt;P&gt;4 YX,N,Y,N,N,Y,AA&lt;/P&gt;&lt;P&gt;1 N,X,T,Y,Y,A,F&lt;/P&gt;&lt;P&gt;3 Y,XX,N,YY,DF&lt;/P&gt;&lt;P&gt;3 M,N,N,Y,YY,XX,Z&lt;/P&gt;&lt;P&gt;8 Y,N,Y,Y,Y,Y,Y,D&lt;/P&gt;&lt;P&gt;;&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;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length newtext $20;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i=1 to countw(text);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if i=del then continue;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; newtext=cats(newtext,scan(text,i),',');&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; newtext=substr(newtext,1,length(newtext)-1);&lt;/P&gt;&lt;P&gt;&amp;nbsp; drop i;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this is what you want,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CTorres&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 19:13:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Removing-Character-Value-from-String-at-Specific-Position-in/m-p/202553#M50550</guid>
      <dc:creator>CTorres</dc:creator>
      <dc:date>2015-06-10T19:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: create .csv without blanks</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/create-csv-without-blanks/m-p/201332#M50254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;IMO the blank will not hurt at all when you read the .cvs file. &lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Take into account that SAS represents missing values with a . for numeric variables and with a blank for character variables.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;CTorres&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 18:55:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/create-csv-without-blanks/m-p/201332#M50254</guid>
      <dc:creator>CTorres</dc:creator>
      <dc:date>2015-06-09T18:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Means to SQL code</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-to-SQL-code/m-p/213929#M52746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, the following would be the solution (untested) for your proc means assuming the class variables are character type:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create view type11 as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select distinct source, Year,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* from by statement in Proc means */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cltname, incentive,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* from class statement in Proc means */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '11' as _TYPE_, count(*) as _FREQ_,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* _TYPE_ and _FREQ_ variables&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(Elig) as ELIG, sum(overall) as overal,&amp;nbsp;&amp;nbsp; /* SUM statistics for var statement */&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(initial) as initial, sum(consecutive) as conservative&lt;/P&gt;&lt;P&gt;&amp;nbsp; from temp&lt;/P&gt;&lt;P&gt;&amp;nbsp; group by&amp;nbsp; source, Year, cltname, incentive;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* from both by and class statements&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create view type10 as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select distinct source, Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cltname, ' ' as incentive,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '10' as _TYPE_, count(*) as _FREQ_,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(Elig) as ELIG, um(overall) as overal, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(initial) as initial, sum(consecutive) as conservative&lt;/P&gt;&lt;P&gt;&amp;nbsp; from temp&lt;/P&gt;&lt;P&gt;&amp;nbsp; group by&amp;nbsp; source, Year, cltname;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create view type01 as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select distinct source, Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' ' as cltname, incentive,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '01' as _TYPE_, count(*) as _FREQ_,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(Elig) as ELIG, um(overall) as overal, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(initial) as initial, sum(consecutive) as conservative&lt;/P&gt;&lt;P&gt;&amp;nbsp; from temp&lt;/P&gt;&lt;P&gt;&amp;nbsp; group by&amp;nbsp; source, Year, incentive;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create view type00 as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select distinct source, Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' ' as cltname, ' ' as incentive,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '00' as _TYPE_, count(*) as _FREQ_,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(Elig) as ELIG, um(overall) as overal, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(initial) as initial, sum(consecutive) as conservative&lt;/P&gt;&lt;P&gt;&amp;nbsp; from temp&lt;/P&gt;&lt;P&gt;&amp;nbsp; group by&amp;nbsp; source, Year;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table smry as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select * from type11&lt;/P&gt;&lt;P&gt;&amp;nbsp; union all&lt;/P&gt;&lt;P&gt;&amp;nbsp; select * from type10&lt;/P&gt;&lt;P&gt;&amp;nbsp; union all&lt;/P&gt;&lt;P&gt;&amp;nbsp; select * from type01&lt;/P&gt;&lt;P&gt;&amp;nbsp; union all&lt;/P&gt;&lt;P&gt;&amp;nbsp; select * from type00&lt;/P&gt;&lt;P&gt;&amp;nbsp; order by 1,2,3,4;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CTorres&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 20:59:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-to-SQL-code/m-p/213929#M52746</guid>
      <dc:creator>CTorres</dc:creator>
      <dc:date>2015-05-13T20:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Means to SQL code</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-to-SQL-code/m-p/213928#M52745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aanch16167,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following example shows how to convert a PROC MEANS to PROC SQL. You can use it as starting point to create your own solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data grade;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; input Name $ 1-8 Gender $ 11 Status $13 Year $ 15-16&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Section $ 18 Score 20-21 FinalGrade 23-24;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; datalines;&lt;/P&gt;&lt;P&gt;Abbott&amp;nbsp;&amp;nbsp;&amp;nbsp; F 2 97 A 90 87&lt;/P&gt;&lt;P&gt;Branford&amp;nbsp; M 1 98 A 92 97&lt;/P&gt;&lt;P&gt;Crandell&amp;nbsp; M 2 98 B 81 71&lt;/P&gt;&lt;P&gt;Dennison&amp;nbsp; M 1 97 A 85 72&lt;/P&gt;&lt;P&gt;Edgar&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F 1 98 B 89 80&lt;/P&gt;&lt;P&gt;Faust&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M 1 97 B 78 73&lt;/P&gt;&lt;P&gt;Greeley&amp;nbsp;&amp;nbsp; F 2 97 A 82 91&lt;/P&gt;&lt;P&gt;Hart&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F 1 98 B 84 80&lt;/P&gt;&lt;P&gt;Isley&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M 2 97 A 88 86&lt;/P&gt;&lt;P&gt;Jasper&amp;nbsp;&amp;nbsp;&amp;nbsp; M 1 97 B 91 93&lt;/P&gt;&lt;P&gt;Charly&amp;nbsp;&amp;nbsp;&amp;nbsp; M 1&amp;nbsp;&amp;nbsp;&amp;nbsp; B 90 90&lt;/P&gt;&lt;P&gt;Sandra&amp;nbsp;&amp;nbsp;&amp;nbsp; F 2 98&amp;nbsp;&amp;nbsp; 95 88&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sort data=Grade out=GradeBySection;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; by section;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/****** PROC MEANS *******/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc means&lt;/STRONG&gt; data=GradeBySection missing noprint chartype;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; by Section;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; var Score FinalGrade;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; class Status Year;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; output out=Want_Means sum=;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sort data=Want_Means;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by Section Status Year _TYPE_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/******* PROC SQL&amp;nbsp; *******/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;sql&lt;/STRONG&gt; noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create view type11 as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select distinct Section, Status, Year, '11' as _TYPE_,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count(*) as _FREQ_, sum(Score) as Score, sum(FinalGrade) as FinalGrade&lt;/P&gt;&lt;P&gt;&amp;nbsp; from grade&lt;/P&gt;&lt;P&gt;&amp;nbsp; group by Section, Status, Year;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create view type10 as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select distinct Section, Status, '&amp;nbsp; ' as Year, '10' as _TYPE_,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count(*) as _FREQ_, sum(Score) as Score, sum(FinalGrade) as FinalGrade&lt;/P&gt;&lt;P&gt;&amp;nbsp; from grade&lt;/P&gt;&lt;P&gt;&amp;nbsp; group by Section, Status&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create view type01 as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select distinct Section, ' ' as Status, Year, '01' as _TYPE_,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count(*) as _FREQ_, sum(Score) as Score, sum(FinalGrade) as FinalGrade&lt;/P&gt;&lt;P&gt;&amp;nbsp; from grade&lt;/P&gt;&lt;P&gt;&amp;nbsp; group by Section, year&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create view type00 as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select distinct Section, ' ' as Status, '&amp;nbsp; ' as Year, '00' as _TYPE_,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count(*) as _FREQ_, sum(Score) as Score, sum(FinalGrade) as FinalGrade&lt;/P&gt;&lt;P&gt;&amp;nbsp; from grade&lt;/P&gt;&lt;P&gt;&amp;nbsp; group by Section&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table Want_SQL as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select * from type11&lt;/P&gt;&lt;P&gt;&amp;nbsp; union all&lt;/P&gt;&lt;P&gt;&amp;nbsp; select * from type10&lt;/P&gt;&lt;P&gt;&amp;nbsp; union all&lt;/P&gt;&lt;P&gt;&amp;nbsp; select * from type01&lt;/P&gt;&lt;P&gt;&amp;nbsp; union all&lt;/P&gt;&lt;P&gt;&amp;nbsp; select * from type00&lt;/P&gt;&lt;P&gt;&amp;nbsp; order by 1,2,3,4;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/****** Compare the results *******************/&lt;/P&gt;&lt;P&gt;proc compare data=Want_Means compare=Want_SQL;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CTorres&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 20:21:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-to-SQL-code/m-p/213928#M52745</guid>
      <dc:creator>CTorres</dc:creator>
      <dc:date>2015-05-13T20:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: Join tables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Join-tables/m-p/197100#M49240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The same code works OK with the new supposition: if all values of PWPUMAS are the same then MAX(PWPUMAS) is this value for each IN_PUMA_ID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also use the following code assuming both files are sorted by IN_PUMA_ID and PWPUMAS has the same value for each IN_PUMA_ID:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data new;&lt;/P&gt;&lt;P&gt;&amp;nbsp; merge Agearank (in=in_rank) Agea (keep=IN_PUMA_ID PWPUMAS);&lt;/P&gt;&lt;P&gt;&amp;nbsp; by IN_PUMA_ID;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if in_rank;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CTorres&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 19:48:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Join-tables/m-p/197100#M49240</guid>
      <dc:creator>CTorres</dc:creator>
      <dc:date>2015-04-23T19:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: Join tables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Join-tables/m-p/197097#M49237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this to attach the value of MAX(PWPUMAS) by each IN_PUMA_ID group:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table new as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select A.*, MPWPUMAS as PWPUMAS &lt;/P&gt;&lt;P&gt;&amp;nbsp; from Agearank A &lt;/P&gt;&lt;P&gt;&amp;nbsp; left join &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (select distinct IN_PUMA_ID, MAX(PWPUMAS) as MPWPUMAS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from Agea B&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; group by IN_PUMA_ID)&lt;/P&gt;&lt;P&gt;&amp;nbsp; on (A.IN_PUMA_ID = B.IN_PUMA_ID)&lt;/P&gt;&lt;P&gt;&amp;nbsp; order by 1;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CTorres&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 14:44:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Join-tables/m-p/197097#M49237</guid>
      <dc:creator>CTorres</dc:creator>
      <dc:date>2015-04-16T14:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Join tables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Join-tables/m-p/197096#M49236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are many values of the variable PWPUMAS for each IN_PUMA_ID. You need to chose what of them to attach. Maybe MAX(PWPUMAS) ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 14:20:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Join-tables/m-p/197096#M49236</guid>
      <dc:creator>CTorres</dc:creator>
      <dc:date>2015-04-16T14:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: problem with dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/problem-with-dates/m-p/196422#M49118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IMO you should not have to do this "complex" transformation from a text field to another text field if you use SAS Dates with formats:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;From text to text (your solution):&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data final;&lt;/P&gt;&lt;P&gt;&amp;nbsp; date_hoc="20140202";&amp;nbsp;&amp;nbsp;&amp;nbsp; /* text field */ &lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table Report as&lt;/P&gt;&lt;P&gt;select &lt;/P&gt;&lt;P&gt;&amp;nbsp; Put(mdy(input(substr(strip(put(DATE_HOC,$10.)),5,2),2.),input(substr(strip(put(DATE_HOC,$10.)),7),2.),input(substr(strip(put(DATE_HOC,$10.)),1,4),4.)),date9.) as Date_Hoc&lt;/P&gt;&lt;P&gt;from final;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;From numeric field to SAS Date (number) - my suggestion :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data final;&lt;/P&gt;&lt;P&gt;&amp;nbsp; date_hoc=20140202;&amp;nbsp; /* numeric field */&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table Report as&lt;/P&gt;&lt;P&gt;select &lt;/P&gt;&lt;P&gt;&amp;nbsp; input(DATE_HOC,yymmdd8.) as Date_Hoc format date9.&amp;nbsp;&amp;nbsp; /* SAS date */&lt;/P&gt;&lt;P&gt;from final;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The advantage of a SAS Date is that you can display it in many ways using different formats and also you can get more information from the date using functions as YEAR, MONTH, DAY, etc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CTorres&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2015 16:29:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/problem-with-dates/m-p/196422#M49118</guid>
      <dc:creator>CTorres</dc:creator>
      <dc:date>2015-04-15T16:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect sum of julian date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Incorrect-sum-of-julian-date/m-p/195197#M36727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data chk;&lt;/P&gt;&lt;P&gt;informat dat date9.;&lt;/P&gt;&lt;P&gt;format dat julian5. ;&lt;/P&gt;&lt;P&gt;input dat ;&lt;/P&gt;&lt;P&gt;juldate=input(put(dat,julian5.),5.);&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;23-Nov-73&lt;/P&gt;&lt;P&gt;26-Nov-73&lt;/P&gt;&lt;P&gt;23-Nov-73&lt;/P&gt;&lt;P&gt;23-Nov-73&lt;/P&gt;&lt;P&gt;23-Nov-73&lt;/P&gt;&lt;P&gt;23-Nov-73&lt;/P&gt;&lt;P&gt;26-Nov-73&lt;/P&gt;&lt;P&gt;26-Nov-73&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select sum(juldate) from chk;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 20:48:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Incorrect-sum-of-julian-date/m-p/195197#M36727</guid>
      <dc:creator>CTorres</dc:creator>
      <dc:date>2015-04-14T20:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error PATH= is converting into XXXX</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Error-PATH-is-converting-into-XXXX/m-p/195964#M4259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please provide the libname statement you are using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure you are using the engine ORACLE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIBNAME oralib ORACLE&amp;nbsp; PATH=path&amp;nbsp; SCHEMA=schema&amp;nbsp; USER=user&amp;nbsp; PASSWORD="password" ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 20:38:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Error-PATH-is-converting-into-XXXX/m-p/195964#M4259</guid>
      <dc:creator>CTorres</dc:creator>
      <dc:date>2015-04-14T20:38:41Z</dc:date>
    </item>
  </channel>
</rss>

