<?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 What code is doing ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/What-code-is-doing/m-p/658095#M197225</link>
    <description>&lt;P&gt;data date;&lt;/P&gt;&lt;P&gt;set sashelp.date;&lt;/P&gt;&lt;P&gt;DateZ = INPUT(PUT(19000000+DATEF,Z8.),YYMMDD8.);&lt;/P&gt;&lt;P&gt;CALL SYMPUT('DATE_P',DATE3);&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May I know what exactly this code is doing here? as I can see we are using both PUT and INPUT and also why adding 19000000 ?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jun 2020 15:09:30 GMT</pubDate>
    <dc:creator>kajal_30</dc:creator>
    <dc:date>2020-06-12T15:09:30Z</dc:date>
    <item>
      <title>What code is doing ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-code-is-doing/m-p/658095#M197225</link>
      <description>&lt;P&gt;data date;&lt;/P&gt;&lt;P&gt;set sashelp.date;&lt;/P&gt;&lt;P&gt;DateZ = INPUT(PUT(19000000+DATEF,Z8.),YYMMDD8.);&lt;/P&gt;&lt;P&gt;CALL SYMPUT('DATE_P',DATE3);&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May I know what exactly this code is doing here? as I can see we are using both PUT and INPUT and also why adding 19000000 ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jun 2020 15:09:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-code-is-doing/m-p/658095#M197225</guid>
      <dc:creator>kajal_30</dc:creator>
      <dc:date>2020-06-12T15:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: What code is doing ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-code-is-doing/m-p/658110#M197238</link>
      <description>&lt;P&gt;Without actual date I have to guess that someone is either adding or changing the century value of something that is not really a SAS date value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It might help to print out some values of DATEF and DateZ&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jun 2020 15:36:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-code-is-doing/m-p/658110#M197238</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-06-12T15:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: What code is doing ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-code-is-doing/m-p/658116#M197242</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/259983"&gt;@kajal_30&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems that the objective is to get a character string that can be read as a valid SAS date.&lt;/P&gt;
&lt;P&gt;For example, if DATEF is equal to "500612", you will get "19500612", that will be read as 06/12/1952.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The CALL SYMPUT statement computes a macrovariable that contains the last unformatted value of the variable DATE3.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jun 2020 16:07:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-code-is-doing/m-p/658116#M197242</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-06-12T16:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: What code is doing ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-code-is-doing/m-p/658664#M197378</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think the author of this code was looking for the yearcutoff option :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=lesysoptsref&amp;amp;docsetTarget=n0yt2tjgsd5dpzn16wk1m3thcd3c.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=lesysoptsref&amp;amp;docsetTarget=n0yt2tjgsd5dpzn16wk1m3thcd3c.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro date_loop;

    data have;
        format a date9. i z2.;
        do i=1 to 99;
            a=input(cats(i,"0101"),yymmdd6.);
            put a= a best.;
        end;
    run;

%mend;

option yearcutoff=1920;

%date_loop

option yearcutoff=1900;

%date_loop

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Jun 2020 08:21:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-code-is-doing/m-p/658664#M197378</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2020-06-15T08:21:36Z</dc:date>
    </item>
  </channel>
</rss>

