<?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: SAS code creating a Excel pivot table can't be run in Microsoft Task Scheduler in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-code-creating-a-Excel-pivot-table-can-t-be-run-in-Microsoft/m-p/624725#M23768</link>
    <description>&lt;P&gt;The code you posted is just the definition of a macro. So it wouldn't actually do anything since there is no actual call to the macro.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if it is getting stuck then perhaps you did submit something that actually calls the macro?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why does the code have double slashs in the paths?&lt;/P&gt;
&lt;P&gt;Does the machine where the scheduler is running the job actually have a physical F: drive?&amp;nbsp; If that is a mapped drive is the drive actually mapped for the process that is running the scheduled job?&lt;/P&gt;</description>
    <pubDate>Fri, 14 Feb 2020 03:11:25 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2020-02-14T03:11:25Z</dc:date>
    <item>
      <title>SAS code creating a Excel pivot table can't be run in Microsoft Task Scheduler</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-code-creating-a-Excel-pivot-table-can-t-be-run-in-Microsoft/m-p/618899#M23710</link>
      <description>&lt;P&gt;I created the following SAS code to generate an Excel Pivot table using ODS. The code works perfectly when running in SAS or using a Batch file to run (in the Batch file, use SAS to run the code),&amp;nbsp; however, when I try to let the code run automatically put it in the Microsoft Task Scheduler, it stuck in the part of creating the Pivot Table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How could I let the Microsoft Task Scheduler to run the code automatically, could anybody help me? Thanks a lot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro pivot_pcp (data=,report_name=,pt_name=,i=);
OPTIONS FORMCHAR="|----|+|---+=|-/\&amp;lt;&amp;gt;*";
ods noresults;


ods excel file="&amp;amp;out_path\&amp;amp;data..xlsx" options(sheet_name="Parameters" embedded_titles="yes" start_at="1,2");
proc print data=parameter&amp;amp;i noobs;
title justify=left h=2 bold "Parameters of &amp;amp;report_name" ;run;



ods excel options(sheet_name="Source_Data" embedded_titles="no" start_at="1,1");
proc print data=&amp;amp;data;run;


ods excel close;

ods tagsets.tableeditor file="&amp;amp;out_path\pivot_table.js"
options(update_target="F:\\weekly\\&amp;amp;data..xlsx"
output_type='script'
sheet_name="Source_Data"
pivot_sheet_name="Report"
pivotrow="pcp_ID,pcp_name"
pivotcol="month"
pivotdata="members"
pivot_format="light3"
pivot_layout="tabular"
pivot_grandtotal="no"
pivot_subtotal="no" 
Pivot_title="&amp;amp;report_name"
pivotdata_fmt="#,###"
excel_save_file="F:\\weekly\\&amp;amp;data..xlsx"
quit="Yes");



data _null_;
file print;
title "&amp;amp;report_name";
put _all_;
run;
ods tagsets.tableeditor close;
x "'&amp;amp;out_path\pivot_table.js'";
%mend;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 17:19:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-code-creating-a-Excel-pivot-table-can-t-be-run-in-Microsoft/m-p/618899#M23710</guid>
      <dc:creator>wbsjd</dc:creator>
      <dc:date>2020-01-21T17:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code creating a Excel pivot table can't be run in Microsoft Task Scheduler</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-code-creating-a-Excel-pivot-table-can-t-be-run-in-Microsoft/m-p/624721#M23766</link>
      <description>&lt;P&gt;From the very few details given, it seems this might be due to different users having different authorisations.&lt;/P&gt;
&lt;P&gt;Is the scheduler using the same credentials as the other runs?&lt;/P&gt;
&lt;P&gt;Otherwise, please provide the log of the failed run.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2020 03:05:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-code-creating-a-Excel-pivot-table-can-t-be-run-in-Microsoft/m-p/624721#M23766</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-02-14T03:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code creating a Excel pivot table can't be run in Microsoft Task Scheduler</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-code-creating-a-Excel-pivot-table-can-t-be-run-in-Microsoft/m-p/624725#M23768</link>
      <description>&lt;P&gt;The code you posted is just the definition of a macro. So it wouldn't actually do anything since there is no actual call to the macro.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if it is getting stuck then perhaps you did submit something that actually calls the macro?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why does the code have double slashs in the paths?&lt;/P&gt;
&lt;P&gt;Does the machine where the scheduler is running the job actually have a physical F: drive?&amp;nbsp; If that is a mapped drive is the drive actually mapped for the process that is running the scheduled job?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2020 03:11:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-code-creating-a-Excel-pivot-table-can-t-be-run-in-Microsoft/m-p/624725#M23768</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-02-14T03:11:25Z</dc:date>
    </item>
  </channel>
</rss>

