The SAS Output Delivery System and reporting techniques

How to save SAS Log as a Dataset Automatically.

Reply
Contributor
Posts: 26

How to save SAS Log as a Dataset Automatically.

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

Super Contributor
Posts: 282

Re: How to save SAS Log as a Dataset Automatically.

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.

Valued Guide
Posts: 3,206

Re: How to save SAS Log as a Dataset Automatically.

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 --<-----
Contributor
Posts: 26

Re: How to save SAS Log as a Dataset Automatically.

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

Respected Advisor
Posts: 3,834

Re: How to save SAS Log as a Dataset Automatically.

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?

Valued Guide
Posts: 3,206

Re: How to save SAS Log as a Dataset Automatically.

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 --<-----
Respected Advisor
Posts: 3,834

Re: How to save SAS Log as a Dataset Automatically.

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.

Valued Guide
Posts: 3,206

Re: How to save SAS Log as a Dataset Automatically.

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 --<-----
Valued Guide
Posts: 2,174

Re: How to save SAS Log as a Dataset Automatically.

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

Occasional Contributor
Posts: 13

Re: How to save SAS Log as a Dataset Automatically.

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

Grand Advisor
Posts: 17,345

Re: How to save SAS Log as a Dataset Automatically.

Dataset or file?

Proc Printto will also redirect the log to a file

Occasional Contributor
Posts: 13

Re: How to save SAS Log as a Dataset Automatically.

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

Ask a Question
Discussion stats
  • 11 replies
  • 1391 views
  • 0 likes
  • 7 in conversation