<?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 Increment dates in sas in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Increment-dates-in-sas/m-p/238948#M55460</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Referrring to the code below, I have to create a column 'calendar_date' which is the date in the column 'Start_date' incremented by the months in corresponding 'exposure' column. The program gives me an error which is mentioned below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CODE:&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE CONTRACTS_VIN AS&lt;BR /&gt;SELECT * FROM EXPOSURE_CONTRACTS_GRID, intnx('month', start_date, exposure) as calendar_month&lt;BR /&gt;WHERE EXPOSURE &amp;lt;= (TERM+6);&lt;BR /&gt;QUIT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;178 EXPOSURE_CONTRACTS_GRID as select * from data2 cross join exposure_grid order by contract_vin, exposure; quit; PROC SQL&lt;BR /&gt;178 ! ; CREATE TABLE CONTRACTS_VIN AS SELECT * FROM EXPOSURE_CONTRACTS_GRID, intnx('month', start_date, exposure) as&lt;BR /&gt;_&lt;BR /&gt;79&lt;BR /&gt;178 ! calendar_month WHERE&lt;BR /&gt;&lt;STRONG&gt;ERROR 79-322: Expecting a ).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;NOTE: Line generated by the invoked macro "DATA".&lt;BR /&gt;178 EXPOSURE_CONTRACTS_GRID as select * from data2 cross join exposure_grid order by contract_vin, exposure; quit; PROC SQL&lt;BR /&gt;178 ! ; CREATE TABLE CONTRACTS_VIN AS SELECT * FROM EXPOSURE_CONTRACTS_GRID, intnx('month', start_date, exposure) as&lt;BR /&gt;_&lt;BR /&gt;79&lt;BR /&gt;178 ! calendar_month WHERE&lt;BR /&gt;&lt;STRONG&gt;ERROR 79-322: Expecting a (.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;</description>
    <pubDate>Fri, 11 Dec 2015 17:33:13 GMT</pubDate>
    <dc:creator>Anuashla</dc:creator>
    <dc:date>2015-12-11T17:33:13Z</dc:date>
    <item>
      <title>Increment dates in sas</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Increment-dates-in-sas/m-p/238948#M55460</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Referrring to the code below, I have to create a column 'calendar_date' which is the date in the column 'Start_date' incremented by the months in corresponding 'exposure' column. The program gives me an error which is mentioned below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CODE:&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE CONTRACTS_VIN AS&lt;BR /&gt;SELECT * FROM EXPOSURE_CONTRACTS_GRID, intnx('month', start_date, exposure) as calendar_month&lt;BR /&gt;WHERE EXPOSURE &amp;lt;= (TERM+6);&lt;BR /&gt;QUIT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;178 EXPOSURE_CONTRACTS_GRID as select * from data2 cross join exposure_grid order by contract_vin, exposure; quit; PROC SQL&lt;BR /&gt;178 ! ; CREATE TABLE CONTRACTS_VIN AS SELECT * FROM EXPOSURE_CONTRACTS_GRID, intnx('month', start_date, exposure) as&lt;BR /&gt;_&lt;BR /&gt;79&lt;BR /&gt;178 ! calendar_month WHERE&lt;BR /&gt;&lt;STRONG&gt;ERROR 79-322: Expecting a ).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;NOTE: Line generated by the invoked macro "DATA".&lt;BR /&gt;178 EXPOSURE_CONTRACTS_GRID as select * from data2 cross join exposure_grid order by contract_vin, exposure; quit; PROC SQL&lt;BR /&gt;178 ! ; CREATE TABLE CONTRACTS_VIN AS SELECT * FROM EXPOSURE_CONTRACTS_GRID, intnx('month', start_date, exposure) as&lt;BR /&gt;_&lt;BR /&gt;79&lt;BR /&gt;178 ! calendar_month WHERE&lt;BR /&gt;&lt;STRONG&gt;ERROR 79-322: Expecting a (.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2015 17:33:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Increment-dates-in-sas/m-p/238948#M55460</guid>
      <dc:creator>Anuashla</dc:creator>
      <dc:date>2015-12-11T17:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Increment dates in sas</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Increment-dates-in-sas/m-p/238952#M55461</link>
      <description>&lt;P&gt;&lt;SPAN&gt;As a first step I would correct the select statement:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SELECT *&lt;STRONG&gt;, intnx('month', start_date, exposure) as calendar_month&lt;/STRONG&gt;&amp;nbsp;FROM EXPOSURE_CONTRACTS_GRID&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2015 17:55:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Increment-dates-in-sas/m-p/238952#M55461</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2015-12-11T17:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Increment dates in sas</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Increment-dates-in-sas/m-p/239017#M55472</link>
      <description>&lt;P&gt;Also, if you want the new date to represent the same day of the month as &lt;STRONG&gt;start_date&lt;/STRONG&gt;, and not the first day, as you would get by default, you should use option SAME:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;intnx('month', start_date, exposure, "SAME") as calendar_month&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Dec 2015 02:03:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Increment-dates-in-sas/m-p/239017#M55472</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-12-12T02:03:13Z</dc:date>
    </item>
  </channel>
</rss>

