Hello all,
we are using LSF and Automic schedulers in 2 different SAS 9.4 DI environments.
In the environment using Automic it is possible to get some Automic Runtime attributes form automatic macro variables created while running a batch job:
run_id = %sysget(AUTOMIC_RUN_ID);
load_id = %sysget(AUTOMIC_LOAD_ID);
load_name = %sysget(AUTOMIC_LOAD_NAME);
Is there a possibility to get Runtime attributes while running a flow/job scheduled with LSF as automatic macro variables?
LSF Runtime Attibutes
Any suggestions or other ideas? Thank you.
Robert
Hi @macrobo
This is possible in LSF too. We use the following code, which is a snippet from a macro that is executed at start of every batchjob.
%* collect information from actual job running under LSF;
%let ExecutionServer = %lowcase(&syshostname).odknet.dk;
%let ProcessID = &sysJobID;
%let LSB_UserID = %upcase(&sysuserid);
%let LSB_SourceFile = %sysfunc(getoption(sysin));
%let LSB_JobName = %sysget(LSB_JOBNAME);
%let LSB_flow = %scan(&LSB_JobName,3,%str(:));
%let LSB_FlowID = %scan(&LSB_JobName,1,%str(:));
%let LSB_Job = %scan(%scan(&LSB_JobName,4,%str(:)),1,%str({));
%let LSB_JobID = %sysget(LSB_JOBID);
Note that not all values are from LSF, but are collected here to come in the same "group" og macro variables for further use.
Hi @macrobo
This is possible in LSF too. We use the following code, which is a snippet from a macro that is executed at start of every batchjob.
%* collect information from actual job running under LSF;
%let ExecutionServer = %lowcase(&syshostname).odknet.dk;
%let ProcessID = &sysJobID;
%let LSB_UserID = %upcase(&sysuserid);
%let LSB_SourceFile = %sysfunc(getoption(sysin));
%let LSB_JobName = %sysget(LSB_JOBNAME);
%let LSB_flow = %scan(&LSB_JobName,3,%str(:));
%let LSB_FlowID = %scan(&LSB_JobName,1,%str(:));
%let LSB_Job = %scan(%scan(&LSB_JobName,4,%str(:)),1,%str({));
%let LSB_JobID = %sysget(LSB_JOBID);
Note that not all values are from LSF, but are collected here to come in the same "group" og macro variables for further use.
Thank you very much. This is exacly the solution.
Regards,
Robert
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.