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.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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