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.
Please help
Do you refer to the IBM/Platform client?
This software is bundled with SAS, but it's not a SAS sw. Detailed queston on this may be found here:
https://www.ibm.com/support/knowledgecenter/SSZSHQ_10.2.0/source/pm_applications.html
By "where my JOb execution is stored", do you mean like in a log database table?
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.
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.
Also I need to download the run history of each job. to calculate the time take by a job complete.
Hi @jogendra
Flows scheduled in SAS Management Console have schedules stored in Metadata. I posted a program here that pulls this information into a data set:
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:
/* 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(),-&ndays,'b'); /* midnight one week ago */ infile history; input; timestamp = tintnx('DTyear',scan(_infile_,5,'"'),10,'s'); if timestamp < 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;
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?
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.
Find more tutorials on the SAS Users YouTube channel.