BookmarkSubscribeRSS Feed
jmic_nyk
Obsidian | Level 7

Hi wise people 😍

Is it possible to redirect a saslog to a clob (or similar) object in a database - in my case Oracle?

How?

 

I suppose it is not possible directly, but maybe via some proc printto + proc document + ???

Any suggestions?

 

Would very much like to have the suggested solution to work in a batch environment on Linux using SAS9.4M7.

2 REPLIES 2
Tom
Super User Tom
Super User

Run the SAS program first. It will produce a log file like it always does.

Then use whatever command your database uses to allow you to copy an actual file into a object in the database.

Quentin
Super User

It looks like on Viya you can use FILENAME to point to a Azure Blob Storage, so that might make it possible to create the fileref then just use PROC PRINTTO:

https://documentation.sas.com/doc/en/pgmsascdc/v_035/lestmtsglobal/p1arsjiowdszd8n1qk8mqg5p2uhv.htm

 

But unless there is something similar for Oracle (I doubt it), agree with suggestion to separate the process of writing the log from whatever process can upload it to the blob

 

Of course even if you use a non-SAS process to upload to the blob, you should still be able to call it from your SAS job (assuming XCMD is enabled), so that it is fully automated.

The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.

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!

Discussion stats
  • 2 replies
  • 577 views
  • 0 likes
  • 3 in conversation