<?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: CRON scripts and multiple worksheet output in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/CRON-scripts-and-multiple-worksheet-output/m-p/403550#M25899</link>
    <description>&lt;P&gt;Please post your code. You can use datasets from sashelp (class, cars etc) for example sources.&lt;/P&gt;</description>
    <pubDate>Thu, 12 Oct 2017 13:51:23 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-10-12T13:51:23Z</dc:date>
    <item>
      <title>CRON scripts and multiple worksheet output</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/CRON-scripts-and-multiple-worksheet-output/m-p/403542#M25897</link>
      <description>&lt;P&gt;I have a SAS 9.4 program that outputs an Excel workbook with 2 tabs.&amp;nbsp; When I run the program it works correctly.&amp;nbsp; When run by a scheduled CRON script, however, only the first tab is included.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a difference in the way the SAS program runs when it is run manually vs. when it is called and run by a CRON script?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 13:39:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/CRON-scripts-and-multiple-worksheet-output/m-p/403542#M25897</guid>
      <dc:creator>PrimeDougR</dc:creator>
      <dc:date>2017-10-12T13:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: CRON scripts and multiple worksheet output</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/CRON-scripts-and-multiple-worksheet-output/m-p/403550#M25899</link>
      <description>&lt;P&gt;Please post your code. You can use datasets from sashelp (class, cars etc) for example sources.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 13:51:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/CRON-scripts-and-multiple-worksheet-output/m-p/403550#M25899</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-12T13:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: CRON scripts and multiple worksheet output</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/CRON-scripts-and-multiple-worksheet-output/m-p/403572#M25902</link>
      <description>&lt;P&gt;And even more important, post your logs.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 14:48:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/CRON-scripts-and-multiple-worksheet-output/m-p/403572#M25902</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-10-12T14:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: CRON scripts and multiple worksheet output</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/CRON-scripts-and-multiple-worksheet-output/m-p/403612#M25903</link>
      <description>&lt;P&gt;Here is the essence of my program:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname sasprod "/sas_shared/data";&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;/P&gt;&lt;P&gt;CREATE TABLE work.DataTable1 AS&lt;/P&gt;&lt;P&gt;Select&lt;BR /&gt;&amp;nbsp; Field1,&lt;BR /&gt;&amp;nbsp; Field2,&lt;BR /&gt;&amp;nbsp; Field3,&lt;BR /&gt;&amp;nbsp; Field4,&lt;BR /&gt;&amp;nbsp; Field5&lt;BR /&gt;from sasprod.Table1&lt;BR /&gt;where Field1 = 'P'&lt;BR /&gt;and (Field2 = 'ABC' or Field2 = 'DEF'))&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;QUIT;&lt;/P&gt;&lt;P&gt;data _variables_;&lt;BR /&gt;D = date() - 1;&lt;BR /&gt;call symput('D',put(D,MMDDYY10.));&lt;BR /&gt;D_yyyymmdd = (year(D) * 10000) + (month(D) * 100) + day(D);&lt;BR /&gt;call symput('D_yyyymmdd',D_yyyymmdd);&lt;BR /&gt;file_name = "/sastmp/sas_shared/output/TestFile &amp;amp;D_yyyymmdd..xlsx";&lt;BR /&gt;call symput('file_name',trim(file_name));&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc export data = work.DataTable1&lt;BR /&gt;&amp;nbsp;&amp;nbsp; outfile="&amp;amp;file_name"&lt;BR /&gt;&amp;nbsp;&amp;nbsp; dbms=xlsx&lt;BR /&gt;&amp;nbsp;&amp;nbsp; replace;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; sheet="Detail";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table work.Table1Summary as&lt;BR /&gt;(Field2, count(Field3) as Count3, Sum(Field4) as Sum4, sum(Field5) as Sum5&lt;BR /&gt;from work.DataTable1&lt;BR /&gt;group by Field2);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc export data = work.Table1Summary&lt;BR /&gt;&amp;nbsp;&amp;nbsp; outfile="&amp;amp;file_name"&lt;BR /&gt;&amp;nbsp;&amp;nbsp; dbms=xlsx&lt;BR /&gt;&amp;nbsp;&amp;nbsp; replace;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; sheet="Summary";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 16:21:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/CRON-scripts-and-multiple-worksheet-output/m-p/403612#M25903</guid>
      <dc:creator>PrimeDougR</dc:creator>
      <dc:date>2017-10-12T16:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: CRON scripts and multiple worksheet output</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/CRON-scripts-and-multiple-worksheet-output/m-p/403921#M25924</link>
      <description>&lt;P&gt;This question has been resolved.&amp;nbsp; It actually involved SAS columns that were using "field name"n references.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I added&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; options validvarname=any;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this resolved the problem.&amp;nbsp; I still don't know why it worked without that option when running the SAS program, but failed when running it via a CRON script.&amp;nbsp; But at this point, the fact that it now runs both ways is all that matters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 13:33:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/CRON-scripts-and-multiple-worksheet-output/m-p/403921#M25924</guid>
      <dc:creator>PrimeDougR</dc:creator>
      <dc:date>2017-10-13T13:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: CRON scripts and multiple worksheet output</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/CRON-scripts-and-multiple-worksheet-output/m-p/404020#M25933</link>
      <description>&lt;P&gt;Validvarname = any is usually set for GUI environments, where badly structured data with stupid column names coming from external sources is quite common. Typically, SAS is used in a more controlled environment, so this option is not the default.&lt;/P&gt;
&lt;P&gt;IMHO, people coming up with such column names should be sentenced to keep at least 1LD from computers.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 16:39:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/CRON-scripts-and-multiple-worksheet-output/m-p/404020#M25933</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-13T16:39:03Z</dc:date>
    </item>
  </channel>
</rss>

