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.