I have this code which i want to run after each query is processed. When i run it manualy it works, but when i use option tools>options>sas programs> insert custom code after submitted code it doesn't insert that row affter i run query.
PROC SQL;
%let date_modified=%sysfunc(datetime(),datetime16.);
%put &date_modified;
insert into REP.tables(TABLE_NAME, DATETIME_MODIFIED, MODIFIED_BY_USER,PROJECT_PATH,PROJECT_NAME,PROCES_FLOW,QUERY_NAME)
values("&syslast","&date_modified"dt,"&_CLIENTUSERNAME","&_CLIENTPROJECTPATH","&_CLIENTPROJECTNAME","&_CLIENTPROCESSFLOWNAME","&_CLIENTTASKLABEL");
quit;
Please post your code in a code box ("little running man" button).
You will make it easier to post code and especially logs by copying the TEXT and pasting into a code box on the forum opened with the </> icon.
We can't edit pictures.
We can't copy text from a picture to show needed changes.
And the default image is so blinking small it is extremely hard to read.
What does your LOG show?
I inspected the log as you said. It seems like it only executes this when you run a query in a program, not in a Query bulder. When i run query builder it doesn't show up in log at all, but when i run any program it does.
You need to do the "insert custom code" for tasks also.
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!
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.