<?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: file print in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/file-print/m-p/591420#M169406</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/265860"&gt;@BrahmanandaRao&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your syntax concatenating variables to populate variable Display is syntactically wrong. That's what the SAS Log will tell you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get to the desired output as posted you don't need to concatenate the variables. Just use a Put statement as done below.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ds;
  file print;
  std='10-jan-10'd;
  end='25-sep-19'd;
  format std  end date9.;
  years=intck('year',std,end);
  months=intck('month',std,end);
  days=intck('day',std,end);
/*  display=":" || years ||  months || days || ":";*/
  put years= months= days=;
  stop;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 25 Sep 2019 07:03:46 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2019-09-25T07:03:46Z</dc:date>
    <item>
      <title>file print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/file-print/m-p/591399#M169399</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ds;
file print;
std='10-jan-10'd  ;
end='25-sep-19'd  ;
format std  end date9.	;
years=intck('year',std,end);
months=intck('month',std,end);
days=intck('day',std,end);
display=":" || years   months  days || ":";
put display;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;why file print output not properly come&lt;/P&gt;&lt;P&gt;required output using file print and display&lt;/P&gt;&lt;P&gt;years:9 months:116 days:3545&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2019 05:51:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/file-print/m-p/591399#M169399</guid>
      <dc:creator>BrahmanandaRao</dc:creator>
      <dc:date>2019-09-25T05:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: file print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/file-print/m-p/591415#M169405</link>
      <description>&lt;P&gt;Read the log and fix the ERROR.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2019 06:32:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/file-print/m-p/591415#M169405</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-09-25T06:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: file print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/file-print/m-p/591420#M169406</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/265860"&gt;@BrahmanandaRao&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your syntax concatenating variables to populate variable Display is syntactically wrong. That's what the SAS Log will tell you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get to the desired output as posted you don't need to concatenate the variables. Just use a Put statement as done below.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ds;
  file print;
  std='10-jan-10'd;
  end='25-sep-19'd;
  format std  end date9.;
  years=intck('year',std,end);
  months=intck('month',std,end);
  days=intck('day',std,end);
/*  display=":" || years ||  months || days || ":";*/
  put years= months= days=;
  stop;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Sep 2019 07:03:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/file-print/m-p/591420#M169406</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-09-25T07:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: file print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/file-print/m-p/591441#M169414</link>
      <description>&lt;P&gt;Thank you Partick sir&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2019 09:26:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/file-print/m-p/591441#M169414</guid>
      <dc:creator>BrahmanandaRao</dc:creator>
      <dc:date>2019-09-25T09:26:16Z</dc:date>
    </item>
  </channel>
</rss>

