BookmarkSubscribeRSS Feed
HeidiDT
Quartz | Level 8

Hi All

Has anyone ever had the need to log the start and end dates and times for SAS campaigns? We would like to do this (logging the information into (an) Oracle table(s)), so that we can:

1. Create a dashboard showing which campaigns are currently running

2. Expand this further in order to log the start and end times for individual nodes in the campaigns

 

Any advice would be appreciated!

4 REPLIES 4
Shmuel
Garnet | Level 18

Locate in your code where the campaign starts and insert a new record with the starting variable using datetime() function.

You need keep the recordID in memory in order to update that record when the campaign ends, again using the datetime() function.

At that time you can calculate how long did it take.

 

Without having your code this design is the most I can let you.

HeidiDT
Quartz | Level 8

Hi

I am not sure what you mean when you say "locate in your code", I have never tried to view the generated code - how do I do that? And how do I insert code into the auto-generated code? 

Shmuel
Garnet | Level 18

In your first post you wrote 

...need to log the start and end dates and times for SAS campaigns

what do you mean by "sas campaign" ? Is it a program to run? is it a set of transactions treated inside a program?

how do you know when it starts? when it ends? 

In order to write info to a log you have to add some code to do it while program runs.

You need to know where to enter that code and how to code it.

 

HeidiDT
Quartz | Level 8

Hi

No it is not a SAS program, it is a campaign designed in SAS CI Studio. So I think we are talking about different things here Smiley Happy

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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!

Register now

Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

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
  • 4 replies
  • 1922 views
  • 0 likes
  • 2 in conversation