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.

BASUG is hosting free webinars Next up: Don Henderson presenting on using hash functions (not hash tables!) to segment data on June 12. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.