BookmarkSubscribeRSS Feed
JOBOJO
Calcite | Level 5
I need to calculate the ratio between the cpu time and the elapsed time for different job

I search a lot but I don't found how I can store this variable in a database

I want a database like that

User
Job
Production date
Production hour
cpu time
elapsed time

Thank you for your answer
2 REPLIES 2
deleted_user
Not applicable
see the documentation on ARM
(application response measurement)
bentleyj
Calcite | Level 5
I think my brute force approach would be to modify the programs use %let macro variables to capture the userID and production date and time. jobName would have to be hardcoded. Use proc printto to redirect the log to an external file. When the job finishes turn off proc printto and have it run a data step (but I'd put it in a macro) that reads in the external log file with each line as a single long character variable. Be sure to use the end= data set option so you know when you've reached the last record. Either substring or index each line looking for the phrases 'real time' and 'cpu time' and parse them when found to get the values. Sum those values and carry the values forward using a Retain statement. When you've reached the last line in the log file then calculate the ratio and write the macro variable values, the totals, and the ratio as a record to your database.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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