BookmarkSubscribeRSS Feed
sravanpathu
Calcite | Level 5

Hi All,

I want to save the SAS Log as a Dataset Automatically. I really don't the possibility levels on it.

One i was using is

Saving the log as text file and importing again into sas & creating as a dataset.

Please help to solve it.

Regards,

Sravn

11 REPLIES 11
Amir
PROC Star

Hi,

If you're using SAS code to save and then import the log into a SAS data set, then you should be able to save the SAS code and run the saved code whenever you want.

Regards,

Amir.

jakarman
Barite | Level 11

All depends on the system you are running on.

- With a BI/DI server installation thre are a lot of LOG-options to configure by your platform admin

- When using Eguide Eminer DI etc. al lot is already done as autmatically saved results and logs.

- Only is the case of plain old SAS style approach (base DMS / batch)  you can do things with altlog (dms) and  log options (batch).

---->-- ja karman --<-----
sravanpathu
Calcite | Level 5

Hi Jaap Karman,

Am using Base SAS 9.3 in Windows environment . Just want to know whether am able to convert the SAS Log to Dataset automatically.

Regards,

Sravan

Patrick
Opal | Level 21

Why would you want to do that? What's the benefit of it?

For any kind of log analysis you would need to parse the log - eg. for errors and warnings - and eventually read multiple lines of log for the full message. So is it that what you're after?

jakarman
Barite | Level 11

With base 9.3 you could upgrade to 9.4 and 9.5 etc.  You are getting also Eguide 5.1 6.1 etc.

- You are already holding logfiles with that.  You are also getting scaproc

- When you are after the status of having it run correct or not , there are different / better approaches

- when you are after changes in tables/datasets the journal/logging systables of a RDMS there are different /  better approaches

what is what you are after? (ok patrick).     

---->-- ja karman --<-----
Patrick
Opal | Level 21

Very o.k.   / LOL

Thanks for mentioning PROC SCAPROC. Always forget about it.

SAS9.5?....That will still take quite a while. I believe the roadmap is now set for version 9.4 with several major releases but little to none migration requirements between the releases. So 9.4 is the version you want to be on.

jakarman
Barite | Level 11

Patrick, you are right I did not have noticed anything on 9.5 it is a teasing one. Just to get to the newest one.

I am convinced people learning SAS should start with the newest version and be frontrunners in that (early adopters).

By that you also ar getting to a good test/validation accepting some errors small and big terrible ones are in those ... the beta releases   

---->-- ja karman --<-----
Peter_C
Rhodochrosite | Level 12

Interesting discussions - resulting in conclusion for OP - the answer is

There is no way to automatically load the log into a sas dataset.

Of course it might be achieved, depending on requirements.

As  no detailed requirements have been defined, the answer to the original post remains No.

peterC

Orsini
Fluorite | Level 6

You might try the ALTLOG= or ALTPRINT= options. They send a copy of the SASLOG and SASLIST to datasets.

Reeza
Super User

Dataset or file?

Proc Printto will also redirect the log to a file

Orsini
Fluorite | Level 6

On MVS it sends it to OS sequential datasets (make it a print file). I never tried using it with a PDS...

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!

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
  • 11 replies
  • 4034 views
  • 0 likes
  • 7 in conversation