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 is hosting
free webinars!
Next up:
SAS Trivia Quiz hosted by SAS on Wednesday May 21.
Register now at
https://www.basug.org/events.