Hi there
I have jobs that run sas scripts on IBM Flow manager. Is there a way for me to save a tabular log of the jobs? For example, save the logs in a sas table.
Hi @Citrine10,
I've not used IBM flow manager, but as a guess, could you create an extra SAS process after all your processes that reads the previous log files and save them as SAS data sets?
Kind regards,
Amir.
What do you mean "a tabular log of the jobs"? Are you referring to the SAS logs generated by your SAS scripts or something else? These will be typically written to a specific job log folder as text files where they can be easily viewed. Are you wanting to parse logs for monitoring performance or some other reason?
Hi @Citrine10,
Not knowing your exact set-up, the below untested macro (when called) reads a file and writes it as is to a SAS data set. You'll obviously have to change "default-log-path" to your own, assuming you have one.
As @SASKiwi mentioned, why do you think you need the log files saved as SAS data sets? If this is an access issue then your administrator should be able provide you with what you need.
/* define macro to read a log file and output it to a data set */
%macro log2ds(log_file /* name of log file */
,ds_name /* name of data set */
,log_path = default-log-path /* path to log file */
)
data &ds_name;
infile "&log_path/&log_file";
input;
put _infile_;
run;
%mend log2ds;
/* example call #1 using default path */
%log2ds(validation.txt, log_lib.validation);
/* example call #2 using non-default path */
%log2ds(report.txt, log_lib.report, log_path = non-default-log-path);
Kind regards,
Amir.
It's still unclear why you want to read them into SAS tables. If you just want to monitor the jobs or see a history of what has run then IBM Flow Manager does that.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.