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?
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
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.