Good time of a day to everyone. I face with a huge problem during my work on previous week. Here ia the deal:
I need to download exel file (blob) from ORACLE database through SAS. I am using:
First step i need to get data from oracle. I used the construction (blob file is nearly 100kb):
proc sql; connect to oracle; create table SASTBL as select * from connection to oracle ( select dbms_lob.substr(myblobfield,1,32767) as blob_1, dbms_lob.substr(myblobfield,32768,32767) as blob_2, dbms_lob.substr(myblobfield,65535,32767) as blob_3, dbms_lob.substr(myblobfield,97302,32767) as blob_4 from my_tbl; ); quit;
And the result is:
blob_1 = 70020202020202...02
blob_2 = 02020202020...02
blob_3 = 02020202...02
I do not understand why the field consists from "02"(the whole file)
And the length of any variable in sas is 1024 (instead of 37767) $HEX2024 format. If I ll take:
dbms_lob.substr(my_blob_field,2000,900) from the same object the result will mush more similar to the truth: blob = "A234ABC4536AE7...."
The question is: 1. how can i get binary data from blob field correctly trough SAS? What is my mistake?
Thank you.
EDIT 1:
I get the information but max string is 2000 kb.