<?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 ods html path error in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-path-error/m-p/300960#M20458</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My requirement is to create html reports under the current date folder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my below code, after creating the current date folder, I am facing issues when I assign &lt;SPAN&gt;ods html path=&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;outdir&lt;/SPAN&gt;&lt;/FONT&gt;. How to reference the path&amp;nbsp;through the variable&amp;nbsp;to create the html reports? Please help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;date=today();&lt;BR /&gt;put 'SAS date=' date yymmddn8.;&lt;BR /&gt;dir=Compress(put(date, yymmddn8.),' ');&lt;BR /&gt;put dir=;&lt;BR /&gt;dir1= dcreate(dir,'C:\SAS\'); &amp;nbsp;/* this will create folder for the current date*/&lt;/P&gt;&lt;P&gt;outdir=compress('\\Gcwcnappv01021\sas_dev\TestFolder\'||dir,' ');&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Below lines to create html file*/&lt;/P&gt;&lt;P&gt;ods html path=&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;outdir&lt;/SPAN&gt;&amp;nbsp;&lt;/FONT&gt;(url=none)&amp;nbsp;&lt;BR /&gt;body='SASReport.html'&lt;BR /&gt;style=harvest;&lt;/P&gt;&lt;P&gt;proc report ;&lt;/P&gt;&lt;P&gt;title1 'SAS Report';&lt;BR /&gt;title2 "%sysfunc(date(),worddate18.)";&lt;BR /&gt;run;&lt;BR /&gt;ods _all_ close;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vikram&lt;/P&gt;</description>
    <pubDate>Tue, 27 Sep 2016 09:00:43 GMT</pubDate>
    <dc:creator>vikramhm</dc:creator>
    <dc:date>2016-09-27T09:00:43Z</dc:date>
    <item>
      <title>ods html path error</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-path-error/m-p/300960#M20458</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My requirement is to create html reports under the current date folder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my below code, after creating the current date folder, I am facing issues when I assign &lt;SPAN&gt;ods html path=&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;outdir&lt;/SPAN&gt;&lt;/FONT&gt;. How to reference the path&amp;nbsp;through the variable&amp;nbsp;to create the html reports? Please help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;date=today();&lt;BR /&gt;put 'SAS date=' date yymmddn8.;&lt;BR /&gt;dir=Compress(put(date, yymmddn8.),' ');&lt;BR /&gt;put dir=;&lt;BR /&gt;dir1= dcreate(dir,'C:\SAS\'); &amp;nbsp;/* this will create folder for the current date*/&lt;/P&gt;&lt;P&gt;outdir=compress('\\Gcwcnappv01021\sas_dev\TestFolder\'||dir,' ');&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Below lines to create html file*/&lt;/P&gt;&lt;P&gt;ods html path=&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;outdir&lt;/SPAN&gt;&amp;nbsp;&lt;/FONT&gt;(url=none)&amp;nbsp;&lt;BR /&gt;body='SASReport.html'&lt;BR /&gt;style=harvest;&lt;/P&gt;&lt;P&gt;proc report ;&lt;/P&gt;&lt;P&gt;title1 'SAS Report';&lt;BR /&gt;title2 "%sysfunc(date(),worddate18.)";&lt;BR /&gt;run;&lt;BR /&gt;ods _all_ close;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vikram&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 09:00:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-path-error/m-p/300960#M20458</guid>
      <dc:creator>vikramhm</dc:creator>
      <dc:date>2016-09-27T09:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: ods html path error</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-path-error/m-p/300964#M20459</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are creating a data base variable (outdir) which value you expect to be available outside the data step.&lt;/P&gt;
&lt;P&gt;The only variables that cand translate beyond the data step are macro variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, since you clearly state the path why don't you state it in the ods html statement ?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 09:13:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-path-error/m-p/300964#M20459</guid>
      <dc:creator>Loko</dc:creator>
      <dc:date>2016-09-27T09:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: ods html path error</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-path-error/m-p/300974#M20460</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As i am creating the current date folder which is not static, i cannot directly state in ods html statement. So i am&amp;nbsp;deriving the path( for current date) and then specifying it &lt;SPAN&gt;in ods html statement&lt;/SPAN&gt;&amp;nbsp;though the variable.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 09:55:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-path-error/m-p/300974#M20460</guid>
      <dc:creator>vikramhm</dc:creator>
      <dc:date>2016-09-27T09:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: ods html path error</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-path-error/m-p/300984#M20461</link>
      <description>&lt;P&gt;Since you already create the filename in your data step, just store it into a macro variable:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
date=today();
put 'SAS date=' date yymmddn8.;
dir=Compress(put(date, yymmddn8.),' ');
put dir=;
dir1= dcreate(dir,'C:\SAS\');  /* this will create folder for the current date*/
outdir=compress('\\Gcwcnappv01021\sas_dev\TestFolder\'||dir,' ');
call symput('outdir',trim(outdir));
run;

/* Below lines to create html file*/

ods html path="&amp;amp;outdir" (url=none) 
body='SASReport.html'
style=harvest;

proc report ;

title1 'SAS Report';
title2 "%sysfunc(date(),worddate18.)";
run;
ods _all_ close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Sep 2016 10:31:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-path-error/m-p/300984#M20461</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-09-27T10:31:23Z</dc:date>
    </item>
  </channel>
</rss>

