<?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 Flow Manager in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Flow-Manager/m-p/647460#M18928</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/328319"&gt;@jogendra&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Flows scheduled in SAS Management Console have schedules stored in Metadata. I posted a program here that pulls this information into a data set:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Administration-and-Deployment/How-to-know-the-batch-jobs-scheduled-times/td-p/640462" target="_blank"&gt;https://communities.sas.com/t5/Administration-and-Deployment/How-to-know-the-batch-jobs-scheduled-times/td-p/640462&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Flow history for the Process Manager component of Platform Suite for SAS are captured in files contained in JS_TOP/work/history/ (where JS_TOP is the Process Manager installation directory). This SAS program is an example of how you could parse these files into SAS:&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;PRE&gt;/* Define the path to the history files. */
filename history "/sas94/pss/pm/work/history/*";

%let ndays = 14;
options ls = 150;

data flows;
   length username $ 16 flowname jobname $ 32 flowid jobid $ 6 state $ 12 started ended 8;
   keep   username      flowname jobname      flowid jobid     state      started ended ;
   length stats    $ 64 flowjob  $ 200;
   format started ended datetime19.;
   retain cutoff 0;
   if _n_ = 1 then cutoff = tintnx('DTday',datetime(),-&amp;amp;ndays,'b'); /* midnight one week ago */
   infile history;
   input;
   timestamp = tintnx('DTyear',scan(_infile_,5,'"'),10,'s');
   if timestamp &amp;lt; cutoff then delete;
   if not(index(_infile_,"Finished ")) then delete;
   flowjob = scan(_infile_,7,'"');
   username = scan(_infile_,3,'"');
   flowid   = scan(flowjob,1,':');
   flowname = scan(flowjob,3,':');
   jobname  = scan(flowjob,4,':{');
   stats    = scan(_infile_,11,'"');
   if _infile_ =: '"FLOW"' then
      do;
         state   = scan(stats,2,'=|')||'('||scan(stats,4,'=|')||')';
         started = tintnx('DTyear',scan(stats,6,'=|'),10,'s');
         ended   = timestamp;
         jobid = " ";
      end;
   else
   if _infile_ =: '"JOB"' then
      do;
         jobid   = scan(stats,2,'=|');
         state   = scan(stats,4,'=|')||'('||scan(stats,6,'=|')||')';
         started = tintnx('DTyear',scan(stats,8,'=|'),10,'s');
         ended   = timestamp;
      end;
run;
proc sort;  by flowid jobid; run; 
proc print; by flowid flowname;  id flowid flowname;  var jobid jobname username started ended state;  run;&lt;/PRE&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Wed, 13 May 2020 13:46:26 GMT</pubDate>
    <dc:creator>gwootton</dc:creator>
    <dc:date>2020-05-13T13:46:26Z</dc:date>
    <item>
      <title>SAS Flow Manager</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Flow-Manager/m-p/647244#M18924</link>
      <description>&lt;P&gt;I am New to SAS and wanted to check if I can export all the flows which are running in the flow manager to an excel sheet. Also I wanted to see where my JOb execution is stored. After a job completed where is the completion time and date stored for the job.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 21:14:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Flow-Manager/m-p/647244#M18924</guid>
      <dc:creator>jogendra</dc:creator>
      <dc:date>2020-05-12T21:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Flow Manager</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Flow-Manager/m-p/647405#M18925</link>
      <description>&lt;P&gt;Do you refer to the IBM/Platform client?&lt;/P&gt;
&lt;P&gt;This software is bundled with SAS, but it's not a SAS sw. Detailed queston on this may be found here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.ibm.com/support/knowledgecenter/SSZSHQ_10.2.0/source/pm_applications.html" target="_blank"&gt;https://www.ibm.com/support/knowledgecenter/SSZSHQ_10.2.0/source/pm_applications.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By "&lt;SPAN&gt;where my JOb execution is&amp;nbsp;&lt;/SPAN&gt;stored", do you mean like in a log database table?&lt;/P&gt;
&lt;P&gt;On the SAS side you can see execution results in form of log files, and potentially in Environment Manager if you have that configured for your batches.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 11:01:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Flow-Manager/m-p/647405#M18925</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2020-05-13T11:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Flow Manager</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Flow-Manager/m-p/647435#M18927</link>
      <description>&lt;P&gt;I wanted to copy of all my flow or Job running in the schedule for a day. I need then to be downloaded and store in a excels sheet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also I need to download the run history of each job. to calculate the time take by a job complete.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 12:07:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Flow-Manager/m-p/647435#M18927</guid>
      <dc:creator>jogendra</dc:creator>
      <dc:date>2020-05-13T12:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Flow Manager</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Flow-Manager/m-p/647460#M18928</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/328319"&gt;@jogendra&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Flows scheduled in SAS Management Console have schedules stored in Metadata. I posted a program here that pulls this information into a data set:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Administration-and-Deployment/How-to-know-the-batch-jobs-scheduled-times/td-p/640462" target="_blank"&gt;https://communities.sas.com/t5/Administration-and-Deployment/How-to-know-the-batch-jobs-scheduled-times/td-p/640462&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Flow history for the Process Manager component of Platform Suite for SAS are captured in files contained in JS_TOP/work/history/ (where JS_TOP is the Process Manager installation directory). This SAS program is an example of how you could parse these files into SAS:&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;PRE&gt;/* Define the path to the history files. */
filename history "/sas94/pss/pm/work/history/*";

%let ndays = 14;
options ls = 150;

data flows;
   length username $ 16 flowname jobname $ 32 flowid jobid $ 6 state $ 12 started ended 8;
   keep   username      flowname jobname      flowid jobid     state      started ended ;
   length stats    $ 64 flowjob  $ 200;
   format started ended datetime19.;
   retain cutoff 0;
   if _n_ = 1 then cutoff = tintnx('DTday',datetime(),-&amp;amp;ndays,'b'); /* midnight one week ago */
   infile history;
   input;
   timestamp = tintnx('DTyear',scan(_infile_,5,'"'),10,'s');
   if timestamp &amp;lt; cutoff then delete;
   if not(index(_infile_,"Finished ")) then delete;
   flowjob = scan(_infile_,7,'"');
   username = scan(_infile_,3,'"');
   flowid   = scan(flowjob,1,':');
   flowname = scan(flowjob,3,':');
   jobname  = scan(flowjob,4,':{');
   stats    = scan(_infile_,11,'"');
   if _infile_ =: '"FLOW"' then
      do;
         state   = scan(stats,2,'=|')||'('||scan(stats,4,'=|')||')';
         started = tintnx('DTyear',scan(stats,6,'=|'),10,'s');
         ended   = timestamp;
         jobid = " ";
      end;
   else
   if _infile_ =: '"JOB"' then
      do;
         jobid   = scan(stats,2,'=|');
         state   = scan(stats,4,'=|')||'('||scan(stats,6,'=|')||')';
         started = tintnx('DTyear',scan(stats,8,'=|'),10,'s');
         ended   = timestamp;
      end;
run;
proc sort;  by flowid jobid; run; 
proc print; by flowid flowname;  id flowid flowname;  var jobid jobname username started ended state;  run;&lt;/PRE&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 13 May 2020 13:46:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Flow-Manager/m-p/647460#M18928</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2020-05-13T13:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Flow Manager</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Flow-Manager/m-p/708932#M21126</link>
      <description>&lt;P&gt;Do you happen to have any examples that would include the Host name used for the job flow execution in addition to the timestamps, etc?&lt;/P&gt;</description>
      <pubDate>Thu, 31 Dec 2020 19:02:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Flow-Manager/m-p/708932#M21126</guid>
      <dc:creator>rldaven</dc:creator>
      <dc:date>2020-12-31T19:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Flow Manager</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Flow-Manager/m-p/709221#M21136</link>
      <description>I do not have any additional examples for reading the history file. This code only reads from lines that contain the word "Finished":&lt;BR /&gt; if not(index(_infile_,"Finished ")) then delete;&lt;BR /&gt;&lt;BR /&gt;The execution host is not contained on the Finished line but on the Execute line:&lt;BR /&gt;"JOB" "sas" "1603822696" "193:sas:sysget_flow:sysget" "Execute job" "JobId=31231|Host=trcv051.trc.sas.com" &lt;BR /&gt;"JOB" "sas" "1603822701" "193:sas:sysget_flow:sysget" "Finished job" "JobId=31231|State=Done|Status=0|StartTime=1603822696|FinishTime=1603822701|CPUUsage=0.346100 sec" &lt;BR /&gt;&lt;BR /&gt;The easiest way I can think of would be to modify the code to read the execute lines into a separate lookup table (job id / host) and then join that to the table created by the existing program.</description>
      <pubDate>Mon, 04 Jan 2021 14:47:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Flow-Manager/m-p/709221#M21136</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2021-01-04T14:47:40Z</dc:date>
    </item>
  </channel>
</rss>

