BookmarkSubscribeRSS Feed
sasuser381
Obsidian | Level 7

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;

 

5 REPLIES 5
ballardw
Super User

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?

 

 

sasuser381
Obsidian | Level 7

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.

sasuser381
Obsidian | Level 7
I found the solution. I needed to go in options for query in tools>options>tasks and to set this code tu run after each query. Because the option i used was only for programs. Thank you guys.
How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1426 views
  • 0 likes
  • 3 in conversation