<?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: How to programm a function using character, numeric AND date variables in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-programm-a-function-using-character-numeric-AND-date/m-p/586735#M14556</link>
    <description>Thanks a lot!&lt;BR /&gt;I got the wished result, and can now use thi method with my actual real data.&lt;BR /&gt;&lt;BR /&gt;Have a nice WE&lt;BR /&gt;Regards,&lt;BR /&gt;PY</description>
    <pubDate>Fri, 06 Sep 2019 12:47:25 GMT</pubDate>
    <dc:creator>PierreYvesILY</dc:creator>
    <dc:date>2019-09-06T12:47:25Z</dc:date>
    <item>
      <title>How to programm a function using character, numeric AND date variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-programm-a-function-using-character-numeric-AND-date/m-p/586685#M14545</link>
      <description>&lt;P&gt;&lt;FONT face="helvetica" size="2"&gt;hello,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica" size="2"&gt;I need a function which would use the following entry parameters:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica" size="2"&gt;- Date (format: Datetime20.)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica" size="2"&gt;- Qualification ($2.)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica" size="2"&gt;- Produkt ($25.)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica" size="2"&gt;- Laufzeit (4.)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica" size="2"&gt;and return the following Value of the variable Zins (format 3.4), stored in the dataset 'reference matrix' underneath.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica" size="2"&gt;Zins= Function (Date, Qualification, Produkt, Laufzeit)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica" size="2"&gt;The result ist determined by:&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT face="helvetica"&gt;&lt;FONT size="2"&gt;select the lines in the dataset 'reference matrix'&amp;nbsp; where :&lt;/FONT&gt; &lt;FONT face="courier new,courier" size="3"&gt;Start_date &amp;lt; Date &amp;lt;= End_date&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="helvetica"&gt;select the lines in the dataset where :&lt;/FONT&gt; &lt;FONT face="courier new,courier" size="3"&gt;Laufzeit_&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier" size="3"&gt;Start &amp;lt;&amp;nbsp;Laufzeit &amp;lt;= Laufzeit_End&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="helvetica" size="2"&gt;and the Qualification and Produkt Variables.&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT face="helvetica"&gt;I have an (example) reference matrix for the results:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Matrix_Ref(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;label&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'Konditionstableau'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Start_date:&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;Datetime20.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; End_date:&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;Datetime20.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Qualification:&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$2.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Produkt:&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$25.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Laufzeit_Start:&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;4.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; Laufzeit_End:&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;4.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; Zins:&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;3.4&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;datalines&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;01JAN2009:08:00:00 31JAN2009:08:00:00 C Auto 12 36 0.02&lt;/P&gt;&lt;P&gt;31JAN2009:08:00:00 01JAN2015:08:00:00 D Immo 36 60 0.05&lt;/P&gt;&lt;P&gt;01JAN2009:08:00:00 01JAN2015:08:00:00 A FreeUse 60 72 0.04&lt;/P&gt;&lt;P&gt;01JAN2010:08:00:00 01JAN2015:08:00:00 E FreeUse 96 120 0.055&lt;/P&gt;&lt;P&gt;01JAN2012:08:00:00 01JAN2015:08:00:00 D FreeUse 12 36 0.06&lt;/P&gt;&lt;P&gt;01JAN2015:08:00:00 01JAN2019:08:00:00 C FreeUse 36 60 0.07&lt;/P&gt;&lt;P&gt;01JAN2017:08:00:00 01JAN2019:08:00:00 B Auto 36 60 0.035&lt;/P&gt;&lt;P&gt;01JAN2017:08:00:00 01JAN2019:08:00:00 B Immo 96 120 0.08&lt;/P&gt;&lt;P&gt;01JAN2019:08:00:00 01APR2019:08:00:00 B Immo 72 84 0.07&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica" size="2"&gt;Questions&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica" size="2"&gt;1. The Input step doesn't work for the Date, what should I write?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica" size="2"&gt;2. How could I write the function? What is recommended here?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica" size="2"&gt;Thanks in advance,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica" size="2"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica" size="2"&gt;PY&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2019 10:13:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-programm-a-function-using-character-numeric-AND-date/m-p/586685#M14545</guid>
      <dc:creator>PierreYvesILY</dc:creator>
      <dc:date>2019-09-06T10:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to programm a function using character, numeric AND date variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-programm-a-function-using-character-numeric-AND-date/m-p/586689#M14548</link>
      <description>&lt;P&gt;Hi PY,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where is the date or &lt;FONT size="3" face="courier new,courier"&gt;Laufzeit t&lt;/FONT&gt;hat you want to use for comparison, they are not in the data. Please provide more details and also show sample expected output.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2019 10:41:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-programm-a-function-using-character-numeric-AND-date/m-p/586689#M14548</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2019-09-06T10:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to programm a function using character, numeric AND date variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-programm-a-function-using-character-numeric-AND-date/m-p/586699#M14550</link>
      <description>&lt;P&gt;The date is not provided in the dataset above because this dataset is the 'reference' one. So does the Laufzeit, the Qualification, the Produkt. They all are in the production dataset that has to be matched with the reference one to determine the result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To simplify, I have a Production Dataset with the following columns (and lots of other parameters):&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Production_result(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;label&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'Productiondata_with_Zins'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Date:&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;Datetime20.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Qualification:&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$2.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Produkt:&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$25.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Laufzeit:&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;4. &lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Courier New" size="3"&gt;Zins:&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;3.4&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;datalines&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;12JAN2009:18:00:00 C Auto 13&lt;/P&gt;&lt;P&gt;31JAN2009:09:00:00 D Immo 40&lt;/P&gt;&lt;P&gt;01JAN2009:08:45:00 A FreeUse 61&amp;nbsp;&lt;/P&gt;&lt;P&gt;01JAN2010:16:58:00 E FreeUse 99&lt;/P&gt;&lt;P&gt;01JAN2012:12:00:58 D FreeUse 28&amp;nbsp;&lt;/P&gt;&lt;P&gt;01JAN2015:09:15:00 C FreeUse 39&lt;/P&gt;&lt;P&gt;01JAN2017:08:20:00 B Auto 50&lt;/P&gt;&lt;P&gt;01JAN2017:08:30:00 B Immo 108&lt;/P&gt;&lt;P&gt;01JAN2019:08:10:00 B Immo 78&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the awaited result is to add a column 'Zins' to the production dataset, and the results would be :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Production(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;label&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'Productiondata'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Date:&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;Datetime20.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Qualification:&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$2.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Produkt:&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$25.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Laufzeit:&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;4.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;datalines&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;12JAN2009:18:00:00 C Auto 13 0.02&amp;nbsp;&lt;/P&gt;&lt;P&gt;31JAN2009:09:00:00 D Immo 40 0.05&lt;/P&gt;&lt;P&gt;01JAN2009:08:45:00 A FreeUse 61 0.04&amp;nbsp;&lt;/P&gt;&lt;P&gt;01JAN2010:16:58:00 E FreeUse 99 0.055&lt;/P&gt;&lt;P&gt;01JAN2012:12:00:58 D FreeUse 28 0.06&amp;nbsp;&lt;/P&gt;&lt;P&gt;01JAN2015:09:15:00 C FreeUse 39 0.07&lt;/P&gt;&lt;P&gt;01JAN2017:08:20:00 B Auto 50 0.035&lt;/P&gt;&lt;P&gt;01JAN2017:08:30:00 B Immo 108 0.08&lt;/P&gt;&lt;P&gt;01JAN2019:08:10:00 B Immo 78 0.07&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope it is a lot clearer like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I still don't find the correct input format for the dates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2019 11:06:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-programm-a-function-using-character-numeric-AND-date/m-p/586699#M14550</guid>
      <dc:creator>PierreYvesILY</dc:creator>
      <dc:date>2019-09-06T11:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to programm a function using character, numeric AND date variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-programm-a-function-using-character-numeric-AND-date/m-p/586709#M14551</link>
      <description>&lt;P&gt;Please try this you will get the proper date format, however i wanted to know how you got the zins= 0.02 for the first record as example. If you could explain it then i can try for the code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Production_result(label='Productiondata_with_Zins');
input Date:Datetime18. Qualification:$2. Produkt:$25. Laufzeit:4. ;
format Date datetime20.;
datalines;
12JAN2009:18:00:00 C Auto 13
31JAN2009:09:00:00 D Immo 40
01JAN2009:08:45:00 A FreeUse 61 
01JAN2010:16:58:00 E FreeUse 99
01JAN2012:12:00:58 D FreeUse 28 
01JAN2015:09:15:00 C FreeUse 39
01JAN2017:08:20:00 B Auto 50
01JAN2017:08:30:00 B Immo 108
01JAN2019:08:10:00 B Immo 78
;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Sep 2019 11:26:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-programm-a-function-using-character-numeric-AND-date/m-p/586709#M14551</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2019-09-06T11:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to programm a function using character, numeric AND date variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-programm-a-function-using-character-numeric-AND-date/m-p/586712#M14552</link>
      <description>&lt;P&gt;thank you for your efforts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To understand the result Zins = 0.02 for the first example:&lt;/P&gt;&lt;P&gt;1) the first entry in the production datastep is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;Date = 12JAN2009:18:00:00&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Qualification = C&lt;/P&gt;&lt;P&gt;&amp;nbsp;Produkt = Auto&lt;/P&gt;&lt;P&gt;&amp;nbsp;Laufzeit = 13&lt;/P&gt;&lt;P&gt;2) look at the Konditionstabelau (1. Datastep), and now check if you find a line where, using the values above:&lt;/P&gt;&lt;P&gt;Start_date &amp;lt; Date &amp;lt;= End_date&lt;/P&gt;&lt;P&gt;Qualification = C&lt;/P&gt;&lt;P&gt;Produkt = Auto&lt;/P&gt;&lt;P&gt;Laufzeit_Start &amp;lt; Laufzeit &amp;lt;= Laufzeit_End&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The 1st line of the Konditionstabelau (1. Datastep)&amp;nbsp;&amp;nbsp;is compatible with the values, and in the Zins column is the value 0.02 stored.&lt;/P&gt;&lt;P&gt;This value is the result to complete the Production dataset into Production_result dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this is clear now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;PY&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2019 11:36:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-programm-a-function-using-character-numeric-AND-date/m-p/586712#M14552</guid>
      <dc:creator>PierreYvesILY</dc:creator>
      <dc:date>2019-09-06T11:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to programm a function using character, numeric AND date variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-programm-a-function-using-character-numeric-AND-date/m-p/586727#M14554</link>
      <description>&lt;P&gt;Hope this is the expected output check the Want dataset&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Matrix_Ref(label='Konditionstableau');
input Start_date:Datetime20. End_date:Datetime20. Qualification:$2. Produkt:$25. Laufzeit_Start:4. Laufzeit_End:4. Zins:3.4;
format Start_date End_date datetime20.;
datalines;
01JAN2009:08:00:00 31JAN2009:08:00:00 C Auto 12 36 0.02
31JAN2009:08:00:00 01JAN2015:08:00:00 D Immo 36 60 0.05
01JAN2009:08:00:00 01JAN2015:08:00:00 A FreeUse 60 72 0.04
01JAN2010:08:00:00 01JAN2015:08:00:00 E FreeUse 96 120 0.055
01JAN2012:08:00:00 01JAN2015:08:00:00 D FreeUse 12 36 0.06
01JAN2015:08:00:00 01JAN2019:08:00:00 C FreeUse 36 60 0.07
01JAN2017:08:00:00 01JAN2019:08:00:00 B Auto 36 60 0.035
01JAN2017:08:00:00 01JAN2019:08:00:00 B Immo 96 120 0.08
01JAN2019:08:00:00 01APR2019:08:00:00 B Immo 72 84 0.07
;
run;

data Production_result(label='Productiondata_with_Zins');
input Date:Datetime18. Qualification:$2. Produkt:$25. Laufzeit:4. ;
format Date datetime20.;
datalines;
12JAN2009:18:00:00 C Auto 13
31JAN2009:09:00:00 D Immo 40
01JAN2009:08:45:00 A FreeUse 61 
01JAN2010:16:58:00 E FreeUse 99
01JAN2012:12:00:58 D FreeUse 28 
01JAN2015:09:15:00 C FreeUse 39
01JAN2017:08:20:00 B Auto 50
01JAN2017:08:30:00 B Immo 108
01JAN2019:08:10:00 B Immo 78
;
run;

proc sql;
create table want as select /*a.Start_date,a.End_date,*/b.*, /*a.Qualification,a.Produkt,a.Laufzeit_Start,a.Laufzeit_End,*/a.zins from Matrix_Ref as a left join Production_result as b 
on a.Start_date &amp;lt; b.Date &amp;lt;= a.End_date and a.Qualification=b.Qualification and a.Produkt=b.Produkt and a.Laufzeit_Start &amp;lt; b.Laufzeit &amp;lt;= a.Laufzeit_End order by b.date;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Sep 2019 12:30:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-programm-a-function-using-character-numeric-AND-date/m-p/586727#M14554</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2019-09-06T12:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to programm a function using character, numeric AND date variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-programm-a-function-using-character-numeric-AND-date/m-p/586735#M14556</link>
      <description>Thanks a lot!&lt;BR /&gt;I got the wished result, and can now use thi method with my actual real data.&lt;BR /&gt;&lt;BR /&gt;Have a nice WE&lt;BR /&gt;Regards,&lt;BR /&gt;PY</description>
      <pubDate>Fri, 06 Sep 2019 12:47:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-programm-a-function-using-character-numeric-AND-date/m-p/586735#M14556</guid>
      <dc:creator>PierreYvesILY</dc:creator>
      <dc:date>2019-09-06T12:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to programm a function using character, numeric AND date variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-programm-a-function-using-character-numeric-AND-date/m-p/586736#M14557</link>
      <description>Happy to know that it helped.</description>
      <pubDate>Fri, 06 Sep 2019 12:48:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-programm-a-function-using-character-numeric-AND-date/m-p/586736#M14557</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2019-09-06T12:48:35Z</dc:date>
    </item>
  </channel>
</rss>

