<?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 &amp;styl file='C:\Users\sas\Desktop\discharge_print.xml'; in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ods-styl-file-C-Users-sas-Desktop-discharge-print-xml/m-p/98513#M20786</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ods &amp;amp;styl file='C:\Users\sas\Desktop\discharge_print.xml'; &lt;/P&gt;&lt;P&gt;Does the above code work. I am creating a macro variable to automate the output template.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Apr 2013 10:17:21 GMT</pubDate>
    <dc:creator>venkatard</dc:creator>
    <dc:date>2013-04-05T10:17:21Z</dc:date>
    <item>
      <title>ods &amp;styl file='C:\Users\sas\Desktop\discharge_print.xml';</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ods-styl-file-C-Users-sas-Desktop-discharge-print-xml/m-p/98513#M20786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ods &amp;amp;styl file='C:\Users\sas\Desktop\discharge_print.xml'; &lt;/P&gt;&lt;P&gt;Does the above code work. I am creating a macro variable to automate the output template.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2013 10:17:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ods-styl-file-C-Users-sas-Desktop-discharge-print-xml/m-p/98513#M20786</guid>
      <dc:creator>venkatard</dc:creator>
      <dc:date>2013-04-05T10:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: ods &amp;styl file='C:\Users\sas\Desktop\discharge_print.xml';</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ods-styl-file-C-Users-sas-Desktop-discharge-print-xml/m-p/98514#M20787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;This is a very ambiguous question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess it depends on what values you give to the macro variable &amp;amp;styl.&lt;/P&gt;&lt;P&gt;If it takes the values tagsets.excelxp, then yes, it works&lt;/P&gt;&lt;P&gt;but if it takes the value default (which may be one of the style you may want to use...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, what do you want to do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code below is a macro that creates an XML file using different styles (default, normal, statistical...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let path = &lt;STRONG&gt;your_path&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro print(styl = );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods&lt;STRONG&gt; tagsets.excelxp&lt;/STRONG&gt; file =&lt;STRONG&gt; "&lt;/STRONG&gt;&amp;amp;path.\discharge_print_&amp;amp;styl..xml&lt;STRONG&gt;" style= &amp;amp;styl.&lt;/STRONG&gt; ; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc print data = sashelp.class;where sex = "F";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;%mend print;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%print(styl = normal);&lt;/P&gt;&lt;P&gt;%print(styl = default);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure what you want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2013 11:55:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ods-styl-file-C-Users-sas-Desktop-discharge-print-xml/m-p/98514#M20787</guid>
      <dc:creator>AncaTilea</dc:creator>
      <dc:date>2013-04-05T11:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: ods &amp;styl file='C:\Users\sas\Desktop\discharge_print.xml';</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ods-styl-file-C-Users-sas-Desktop-discharge-print-xml/m-p/98515#M20788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am sorry for confusing.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;ods &amp;amp;styl file='C:\Users\sas\Desktop\discharge_print.&amp;amp;styl';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;and when calling macro variable %sty(styl=pdf);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;That means i am opting a pdf output.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Does this logic work?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2013 12:09:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ods-styl-file-C-Users-sas-Desktop-discharge-print-xml/m-p/98515#M20788</guid>
      <dc:creator>venkatard</dc:creator>
      <dc:date>2013-04-05T12:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: ods &amp;styl file='C:\Users\sas\Desktop\discharge_print.xml';</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ods-styl-file-C-Users-sas-Desktop-discharge-print-xml/m-p/98516#M20789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You have to use double &lt;SPAN style="color: #ff0000;"&gt;" "&lt;/SPAN&gt; when macro variables are involved.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;ods &amp;amp;styl file=&lt;SPAN style="color: #ff0000;"&gt;'&lt;/SPAN&gt;C:\Users\sas\Desktop\discharge_print.&amp;amp;styl&lt;SPAN style="color: #ff0000;"&gt; ';&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2013 12:27:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ods-styl-file-C-Users-sas-Desktop-discharge-print-xml/m-p/98516#M20789</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2013-04-05T12:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: ods &amp;styl file='C:\Users\sas\Desktop\discharge_print.xml';</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ods-styl-file-C-Users-sas-Desktop-discharge-print-xml/m-p/98517#M20790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, yes it would work;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro print(styl = );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;ods &amp;amp;styl. file&lt;/STRONG&gt; = "&amp;amp;path.\discharge_print.&lt;STRONG&gt;&amp;amp;styl.&lt;/STRONG&gt;"&amp;nbsp; ; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc print data = sashelp.class;where sex = "F";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; ods &amp;amp;styl. close;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;%mend print;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%print(styl = pdf);&lt;/P&gt;&lt;P&gt;%print(styl = html);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note the "ods &amp;amp;styl. close" statement as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And yes, you should always use double quotes instead of single quotes in a macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck,&lt;/P&gt;&lt;P&gt;Anca.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2013 12:45:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ods-styl-file-C-Users-sas-Desktop-discharge-print-xml/m-p/98517#M20790</guid>
      <dc:creator>AncaTilea</dc:creator>
      <dc:date>2013-04-05T12:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: ods &amp;styl file='C:\Users\sas\Desktop\discharge_print.xml';</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ods-styl-file-C-Users-sas-Desktop-discharge-print-xml/m-p/98518#M20791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; In my opinion, &amp;amp;STYL is a confusing name to use for the macro variable. Here's why. When you have an ODS "sandwich"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods &lt;SPAN style="color: #ff00ff;"&gt;&amp;lt;destination&amp;gt;&lt;/SPAN&gt; file="somefile.&lt;SPAN style="color: #008000;"&gt;ext&lt;/SPAN&gt;" style&lt;SPAN style="color: #33cccc;"&gt;=&amp;lt;style&amp;gt;&lt;/SPAN&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;...more code ...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods &lt;SPAN style="color: #ff00ff;"&gt;&amp;lt;destination&amp;gt;&lt;/SPAN&gt; close;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the &lt;STRONG&gt;&lt;EM style="color: #ff00ff;"&gt;&amp;lt;destination&amp;gt;&lt;/EM&gt;&lt;/STRONG&gt; should be specified as:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods &lt;SPAN style="color: #ff00ff;"&gt;html&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods &lt;SPAN style="color: #ff00ff;"&gt;pdf&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods &lt;SPAN style="color: #ff00ff;"&gt;rtf&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods &lt;SPAN style="color: #ff00ff;"&gt;tagsets.excelxp&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods &lt;SPAN style="color: #ff00ff;"&gt;msofice2k&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;etc, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; None of those destinations is a STYLE definition name. The &lt;SPAN style="color: #ff00ff;"&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;lt;destination&amp;gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; used by ODS is different from the &lt;SPAN style="color: #33cccc; text-decoration: underline;"&gt;&lt;STRONG style="text-decoration: underline;"&gt;STYLE&lt;/STRONG&gt;&lt;/SPAN&gt; definition used by ODS. for example, there is no style called PDF and there is no style called HTML or TAGSETS.EXCELXP... those are all destinations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; A less confusing name for the macro variable would be &amp;amp;DEST, which would then allow you to use &amp;amp;STYL to change the style definition used for your output. Another possible macro variable might be &amp;amp;EXT, so that if you use a destination like MSOFFICE2K, you can specify the correct .HTML extension. Or you can specify a different style definition for each destination, or based on the destination, you can use a %IF to create a macro variable for other options (&amp;amp;OTHEROPT).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I used some color coding in the program below to give you the general idea of the possible use for 3 different macro variables. I didn't do color coding for every macro variable reference, but there should be enough to convey the general concept of the difference between ODS destination, ODS style and the file extension for the file you are creating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; This is just my .02 on the design of the macro program and naming the macro variables so they accurately reflect which code piece you are generating: the destination name, the file extension (which does NOT always match the destination name) and the style specification (which again, does not always match the destination name).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%macro alt(&lt;SPAN style="color: #ff00ff;"&gt;dest=&lt;/SPAN&gt;, &lt;SPAN style="color: #008000;"&gt;ext=&lt;/SPAN&gt;, &lt;SPAN style="color: #33cccc;"&gt;styl=&lt;/SPAN&gt; );&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ods listing close;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; option nodate number pageno=1;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; %if %upcase(&lt;SPAN style="color: #ff00ff;"&gt;&amp;amp;dest&lt;/SPAN&gt;)=TAGSETS.EXCELXP %then %do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let otheropt = options(embedded_titles='yes'); &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; %end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; %if %upcase(&lt;SPAN style="color: #ff00ff;"&gt;&amp;amp;dest&lt;/SPAN&gt;)=PDF %then %do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let otheropt = notoc;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; %end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; %else %let otheropt=;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ods &lt;SPAN style="color: #ff00ff;"&gt;&amp;amp;dest&lt;/SPAN&gt; file = "c:\temp\use_&lt;SPAN style="color: #ff00ff;"&gt;&amp;amp;dest&lt;/SPAN&gt;._&lt;SPAN style="color: #33cccc;"&gt;&amp;amp;styl&lt;/SPAN&gt;..&lt;SPAN style="color: #008000;"&gt;&amp;amp;ext&lt;/SPAN&gt;"&amp;nbsp; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style=&lt;SPAN style="color: #33cccc;"&gt;&amp;amp;styl&lt;/SPAN&gt; &amp;amp;otheropt ;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; title "Using &amp;amp;dest with &amp;amp;styl style to create &amp;amp;ext type of file";&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc print data = sashelp.class;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where sex = "F";&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ods &amp;amp;dest close;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%mend alt;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%alt(dest=html, styl=htmlblue, ext=html)&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%alt(dest=pdf, styl=journal, ext=pdf)&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%alt(dest=rtf, styl=analysis, ext=rtf)&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%alt(dest=msoffice2k, styl=normal, ext=html)&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%alt(dest=tagsets.excelxp, styl=sasweb, ext=xml)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2013 20:41:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ods-styl-file-C-Users-sas-Desktop-discharge-print-xml/m-p/98518#M20791</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2013-04-05T20:41:52Z</dc:date>
    </item>
  </channel>
</rss>

