f



Re: Reading an image file from an oracle database and storing

You can store some types of image files as catalog entries.

One problem, pointed out by Richard, is getting the image/BLOB out of
the Oracle database.  SAS needs help for that.  Using an Oracle tool may
be the best choice.  I'm currently working on a long-term project that
requires extracting BLOBS from a SQL-Server database.  I wrote a simple
Java application to serve as SAS's helper.  It writes the BLOBS as
files.

-Randy

-----Original Message-----
From: owner-sas-l@listserv.uga.edu [mailto:owner-sas-l@listserv.uga.edu]
On Behalf Of Rickards, Clinton (GE Consumer Finance)
Sent: Friday, June 09, 2006 4:36 PM
To: Richard A. DeVenezia; SAS-L@LISTSERV.UGA.EDU
Subject: RE: Re: Reading an image file from an oracle database and
storing it in a SAS data set.


Can't blobs be stored in a catalog entry?

Clint

-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of
Richard A. DeVenezia
Sent: Friday, June 09, 2006 2:16 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: Reading an image file from an oracle database and storing
it in a SAS data set.


jbeeler@nc.rr.com wrote:
> Is it possible to read an image (*.bmp, *.jpg, *.tif) file from an
> oracle database and store it in a SAS data set?

Generally no.  Standard SAS library engines do not store the equivalent
of Oracle blobs, clobs or other *obs.  The SAS character type can store
values upto 32767 bytes long, so you could store image data upto 32K in
a character variable in a SAS table.  To store larger image data, you
would have to manually break it up into 32K chunks.

You might need a oracle side function to convert the image file into a
string value.

--
Richard A. DeVenezia
http://www.devenezia.com/
0
6/9/2006 9:21:41 PM
comp.soft-sys.sas 142828 articles. 3 followers. Post Follow

0 Replies
410 Views

Similar Articles

[PageSpeed] 58

Reply:

Similar Artilces:

Re: Reading an image file from an oracle database and storing it
Can't blobs be stored in a catalog entry? Clint -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of Richard A. DeVenezia Sent: Friday, June 09, 2006 2:16 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Reading an image file from an oracle database and storing it in a SAS data set. jbeeler@nc.rr.com wrote: > Is it possible to read an image (*.bmp, *.jpg, *.tif) file from an > oracle database and store it in a SAS data set? Generally no. Standard SAS library engines do not store the equivalent of Oracle blobs, clobs or other *obs. The SAS character type can store values upto 32767 bytes long, so you could store image data upto 32K in a character variable in a SAS table. To store larger image data, you would have to manually break it up into 32K chunks. You might need a oracle side function to convert the image file into a string value. -- Richard A. DeVenezia http://www.devenezia.com/ ...

Re: Unable to read Unicode file into SAS file
Your first solution worked. proc import wasn't able to read the file because of the default lrecl option. Giving lrecl = 32767 solved the problem. Thanks a lot Arthur. Regards, Cherish On Tue, Jan 19, 2010 at 10:13 PM, Arthur Tabachneck <art297@netscape.net>wrote: > Another possibility is that proc import isn't correctly getting the right > formats and informats. If you already know what those formats and > informats should be, you can always copy, paste and edit (from the log) > the data step that resulted from the proc import run, adjusting any > incorrect f...

Re: Unable to read Unicode file into SAS file
Another possibility is that proc import isn't correctly getting the right formats and informats. If you already know what those formats and informats should be, you can always copy, paste and edit (from the log) the data step that resulted from the proc import run, adjusting any incorrect formats and informats and then just run it as a data step. Also, while I don't think it would make any difference, your proc import contains two "datafile=chr" statements. Art -------- On Tue, 19 Jan 2010 21:06:11 +0530, Cherish K <c4cherish@GMAIL.COM> wrote: >From MS SQL, I ext...

Re: running a sas file within a sas file
Like Joep wrote: that seems to be the right thing for the macro facility. With %include you are very static. With the macro facility that could be very dynamic. The simplest thing is: you could provide the statements you want to insert as parameter: %macro doit(stmt1=,stmt2=); ..... &stmt1 ..... &stmt2 ..... %mend; %doit(stmt1=%str(y=sqrt(y);), stmt2=%str(if y<2 then y=2;) ); with many other things you can do, e.g. conditional creating of statements, naming variables by parameters, create multiple statements with macro loops and much more. On the other hand: if you want to do such simple things like you wrote, avoid any %INC or %MACRO things! It is far more readable, if you don't use %INCLUDES. What do you think, that data-step will do: data a; %inc(inc1); %inc(inc2); %inc(inc3); run; ??? instead of: data a; set sashelp.class; if age>11 then age=11; keep name age; run; Gerhard On Mon, 9 Jun 2008 01:42:03 -0700, Joep Steeman <jsteeman@BUSINESSDECISION.COM> wrote: >On 9 jun, 09:20, zpe...@NATURE.BERKELEY.EDU (Zach Peery) wrote: >> Sorry to bug you all with such an easy one, but I havent had much luck >> with the usual help sources. >> >> I just want to run a sas program file within a sas program file. For >> example, in sas file 1 I want to set x equal to 2, then with file 2 >> invoked by file 1, I want to set y = 3. >> >> So sas file 1 looks like this... >> &g...

Re: SAS reads Oracle
I gather from that error that the table never gets created--have you verified that? Does oracle consider "diagonal" to be an invalid identifier b/c there's a pre-existing table by that name? Any difference if you say: Proc sql ; * While we are here, print a description of the sas version of the table to the log ; describe table sastable.diagonal ; create table OracleDB.diagonal like sastable.diagonal ; * Does the oracle version match exactly? ; describe table oracledb.diagonal ; insert into oracledb.diagonal select * from sastable.diagonal ; Quit ; ...

Re: SAS reads Oracle
Here is the entry from the Oracle documentation on your error code: ORA-00904 invalid column name Cause: The column name entered is either missing or invalid.=20 Action: Enter a valid column name. A valid column name must begin with a letter, be less than or equal to 30 characters, and consist of only alphanumeric characters and the special characters $, _, and #. If it contains other characters, it must be enclosed in double quotation marks. It may not be a reserved word.=20 Do you have variable names in your dataset that don't begin with a letter? One oth...

Re: SAS reads Oracle
Well, if the destination column is say, a NUMBER, and you're trying to insert values that are mostly numbers along w/some values of "_all_", then sure--changing your column to a VARCHAR2 will make the problem go away. But you don't need me to tell you that. I guess I need more info. Can you show us a DESCRIBE TABLE on the oracle table in question, and the sas code you're using to fill it, and the particular error messages you're getting in the log? -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Zack Haynes Sent: Fr...

Re: Executing separate SAS File from Main SAS File
See %include -----Original Message----- From: owner-sas-l@listserv.uga.edu [mailto:owner-sas-l@listserv.uga.edu]On Behalf Of tobyrathgeb@stanford.edu Sent: Tuesday, August 02, 2005 2:42 PM To: sas-l@uga.edu Subject: Executing separate SAS File from Main SAS File Hi All I was wondering if I can initiate execution of SAS code stored in a SAS file from my main SAS code. Help very much appreciated. Thanks Toby __________________________________________________________________________________________________________________________________ This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately. Ce courrier �lectronique est confidentiel et prot�g�. L'exp�diteur ne renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) d�sign�(s) est interdite. Si vous recevez ce courrier �lectronique par erreur, veuillez m'en aviser imm�diatement, par retour de courrier �lectronique ou par un autre moyen. ...

Re: how to read this file into sas #3
the MISSOVER infile option and the input statement trailing @ are useful in this situation. data work.family; infile cards MISSOVER; input family member @; do while(not missing(member)); output; input member @; end; cards; 1 3809 3810 3811 3812 2 3814 3815 3816 3 3817 3818 3819 3820 ;;;; run; proc print; run; On 9/14/06, liuyuanpku@gmail.com <liuyuanpku@gmail.com> wrote: > Hi, I just got a problem to read a txt file into sas. The structure of > the data in txt file is: > > family member > 1 3809 3810 3811 3812 > 2 3814 3815 3816 > 3 3817 3818 3819 3820 > > When I read it into sas, I want it in the following structure: > family member > 1 3809 > 1 3810 > 1 3811 > 1 3812 > 2 3814 > 2 3815 > 2 3816 > 3 3817 > 3 3818 > 3 3819 > 3 3820 > > How can I get this sas data? > Thanks a lot! > ...

Re: Reading PDF Files into SAS
Mona, There may be other discussions in the sas-l archives, but take a look at: http://groups.google.ca/group/comp.soft- sys.sas/browse_thread/thread/69a9305876211048/92b1c2c5e6adcf73? lnk=gst&q=pdf+tabachneck#92b1c2c5e6adcf73 or, in shortform: http://xrl.us/bena7b Art -------- On Tue, 31 Mar 2009 17:20:34 -0400, Mona <k_monal_99@YAHOO.COM> wrote: >Hi All, > >Is there a way to read a PDF file in SAS? > >TIA ...

RE: reading jpeg image file
Your file is certainly corrupted and photoshop succeed in reading while wxWindows is not so robust. Just save you file as a new jpeg file in photoshop, this will perhaps resolve your issue O.M. > -----Message d'origine----- > De: nkb [mailto:nkb@pacific.net.sg] > Date: vendredi 28 novembre 2003 13:48 > =C0: wx-users@lists.wxwindows.org > Objet: reading jpeg image file >=20 >=20 > Hi. >=20 > I wrote a program to read and display jpeg images. >=20 > I got an error when I tried to read a particular jpeg image=20 > which says=20 >...

Re: How to connect to Oracle database from SAS
And I have the following SAS items installed. ---SAS/OR ---SAS/AF ---SAS/QC ---SAS/EIS ---SAS/SHARE*NET ---SAS Enterprise Miner ---SAS/IntrNet ---MDDB Server common products ---SAS Integration Technologies ---Enterprise Miner Server ---Enterprise Miner Thin Client ---OR OPT ---OR PRS ---OR IVS ---OR LSO In the net, its given that I need to have SAS Access license, and I think I dont have it. So what is the alternative that can be used? Cherish cherish k <hawks_cherish@yahoo.co.in> wrote: Hi All, I have to connect to SQL server production database and convert the SQL data into SAS readable data. Can somebody tell/give me basic dummy code on how to convert some xyz file in oracle server to SAS work directory with same xyz name. Earlier is used to ask the systems team to convert it into txt file from which i used to import it into SAS readable format. What all things are needed for it. I connect to the development server like this sqlplus client/client@churndev and I know the following info about the location of the server (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.67.81)(PORT = 1521)). Can somebody help me to connect to the Development server instead of converting all the files into txt and then to sas readable format? If there is any other information that is needed to be known please let me know. Cherish --------------------------------- Explore your hobbies and interests. Click here to begin. --------------------------------- Best Jokes, Best Friends, Best ...

Re: how to read gzip file in SAS
On Thu, 1 Nov 2007 12:21:58 -0400, wraong <wrong.wang@GMAIL.COM> wrote: >Hi,all, > >I need to read gzipped files. I tried with filname command as bellow: > >filename medpar pipe 'gunzip -c E:\seer_med\200501\medpar91.txt.gz'; >/*reading in a zipped file*/ > >In the log file, it said "'gunzip' is not recognized as an internal or >external command, >operable program or batch file." > >How can I solve the problem? > >Thanks for kind help. > >Best, >Rong I don't think it's a SAS problem. Debug your GUNZIP invocation from a host OS command line. ...

Re: how to read this file into sas #2
Read the file in its orginal form and Proc Transpose is one alternative... On Thu, 14 Sep 2006 17:09:52 -0700, liuyuanpku@GMAIL.COM wrote: >Hi, I just got a problem to read a txt file into sas. The structure of >the data in txt file is: > >family member >1 3809 3810 3811 3812 >2 3814 3815 3816 >3 3817 3818 3819 3820 > >When I read it into sas, I want it in the following structure: >family member >1 3809 >1 3810 >1 3811 >1 3812 >2 3814 >2 3815 >2 3816 >3 3817 >3 3818 >3 3819 >3 3820 > >How can I get this sas data? >Thanks a lot! ...

Re: Reading RTF files with SAS
Arthur, It works great! Thanks! I'm up and running now. Jake On Wed, Mar 18, 2009 at 6:37 PM, Arthur Tabachneck <art297@netscape.net>wrote: > Jake, > > I've never looked at the macro, but take a look at: > > www2.sas.com/proceedings/sugi31/066-31.pdf > > Art > -------- > On Wed, 18 Mar 2009 18:32:33 -0400, Jake <johbee@GMAIL.COM> wrote: > > >Does anyone know if SAS can read RTF files? The reason I need > >to do this is to get a list of Titles from all the output in a bundled rtf > >vs. doing it manually. > > > >Thanks, for any information (publications, etc) > > > >Jake > ...

Re: Reading SAS files from other programs
Mark, SAS dataset layout is proprietary and unknown. SAS provides both ODBC and OleDB drivers for reading the datasets. Alan Alan Churchill Savian "Bridging SAS and Microsoft Technologies" www.savian.net -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Coleman, Mark Sent: Thursday, April 27, 2006 10:57 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Reading SAS files from other programs Greetings, I am a regular user of Mathematica from Wolfram Research, and a new user of SAS. I'm exploring the feasibility of reading native SAS files directly from Mathematica. Are native SAS files based upon SQL, or is some other proprietary file structure used? If so, does SAS offer some sort of ODBC driver? Thanks, Mark ...

Re: Is there a system option for OpenVMS SAS version 8 where a sas program can create an output file with a file attribute of "Stream_LF" so that these external files c
Charles Patridge <charles_s_patridge@PRODIGY.NET> wrote: > Is there a system option for OpenVMS SAS version 8 where a sas program can > create an output file with a file attribute of "Stream_LF" so that these > external files can be served through an Apache WebServer properly? > > Currently, what happens is when we create a CSV file, the Apache Webserver > wants to load the contents of this CSV file into a single cell for Excel. > That is, all OBS are treated as a SINGLE record and all the contents is > loaded into a single cell within Excel. > > T...

Re: help read this file into a sas dataset
I think, that's quite simple, but hard to say with that example. You seem to have special delimiters from your operating system (which one? There are several on the market!). What you can do to find out what are the delimiters, try to dump a few records with: data _null_; infile "xxxxx.log"; input; list; if _n_=10 then stop; run; You will get the records in char and hex. So you can find out, what's between your records / variables. It seems that the special delimiters are not between records, but between variables. So read the whole records in a long variable or use the input- buffer _infile_, then SCAN with the found out special delimiters in that records until nothing is left and write the result in some variables of your choice. a untestetd peace of code: length var $100 c1-c11 $50; infile "xxx.log"; input; array contents(*) $ c1-c11; i=0; do until (var=" "); i+1; var=scan(_infile_,i,"34"x); c(i)=var; end; .... Gerhard On Wed, 17 Oct 2007 06:27:14 -0700, adac1121@GMAIL.COM wrote: >Input file is a systems log- was generated by the operating systems- >xxx.log > >system bootBᡲun-level 33SB᡼ >rc2s2QB᡼ >shutdown~B᭳ystem boot >B᭏run-level 33SB᭸ >rc2s2TB᭸ >rc2s2B᭲c3s3+B� >rc3s3B� >sacscIB᭴ty >oncoJBᭌOGINcoconsoleJB� >zsmonPM10LB� >OGINdtconsoleNB᭺0LOGINdtconsole >B᭺0NLOGINdtconsoleQB᭺0 > >I can't get the same data as the above input file- >my output &...

Re: reading multiple excel files into SAS
What version of SAS are you running? On Wed, 7 Dec 2005 16:56:33 -0500, Ron Nixon <stribnixon@YAHOO.COM> wrote: >I have about 50 excel files I'd like to read into SAS and merge them as they >come in. All of the files have the same layout and the data starts at row >nine in my spreadsheet. I have SAS Access for PC file formats. Can anyone >suggest the correct sytax for doing this. I've just gotten SAS Access and >have not had a chance to use it and the documentation on this is not great. > >Ron ...

Re: How to connect to Oracle database from SAS #2
Hi All, I got a way to connect. Before i set up the ODBC connection by going to control panel --> Administrative tools --> Data Sources --> Add a new source and set the connection. May be in tnsnames.ora file you have to also set the connection. proc sql; connect to odbc(user=xxxx password=xxxxxx dsn='churndev'); create table TEST as select * from connection to odbc ( select * from table_name); quit; I got it from old archives :-) Cherish cherish k <hawks_cherish@yahoo.co.in> wrote: And I have the following SAS items installed. ---SAS/OR ---SAS/AF ---SAS/QC ---SAS/EIS ---SAS/SHARE*NET ---SAS Enterprise Miner ---SAS/IntrNet ---MDDB Server common products ---SAS Integration Technologies ---Enterprise Miner Server ---Enterprise Miner Thin Client ---OR OPT ---OR PRS ---OR IVS ---OR LSO In the net, its given that I need to have SAS Access license, and I think I dont have it. So what is the alternative that can be used? Cherish cherish k <hawks_cherish@yahoo.co.in> wrote: Hi All, I have to connect to SQL server production database and convert the SQL data into SAS readable data. Can somebody tell/give me basic dummy code on how to convert some xyz file in oracle server to SAS work directory with same xyz name. Earlier is used to ask the systems team to convert it into txt file from which i used to import it into SAS readable format. What all things are needed for it. I connect to the development server like this sqlplus client/client@...

Re: Reading PDF Files into SAS #12
Not completely off topic, but when researching tools to convert PDFs to text, one solution I came across was to take all of the PDFs you want converted, put them in a single directory on a publicly available website, and direct Google to index your site for searching on their main search engine. In the process of doing this, Google converts your PDFs to text for its indexing capabilities and makes that converted text available on Google's site (it does this conversion for other formats too like Microsoft Word Docs, PowerPoints, and other). Quite a clever little hack. I didn't try it, but I suspect they might even run some OCR on your PDF if necessary. Matt -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Savian Sent: Thursday, April 02, 2009 8:12 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Reading PDF Files into SAS On Apr 2, 6:27 am, procconte...@GMAIL.COM (SAS_learner) wrote: > Hello Richard, > > Yes there are lot of 3rd party tools, But IT people do not like them to > Install them on the Office machines atleast in few companies that I worked, > They did not like to install 3rd party software's as they are not validated > . So I had to look for these alternatives. > > thanks > SL > > > > On Wed, Apr 1, 2009 at 9:53 PM, Richard <richard.hoc...@gmail.com> wrote: > > On Apr 2, 3:56 am, procconte...@GMAIL.COM (SAS_learner) wrote: > > > hello Mona, > &...

Re: Reading French Characters from an Oracle Database
Answered my own question. In case anyone else happens to run into the problem, the solution was simply to set the encoding parameter within the infile statement. For example: infile 'c:\test.txt' dlm=',' encoding="utf-8" dsd firstobs=2; Art --------- On Wed, 5 Dec 2007 15:15:53 -0500, Arthur Tabachneck <art297@NETSCAPE.NET> wrote: >This problem was mentioned a couple of years ago, but the advice given >doesn't appear to work. > >I'm reading in a text file that was developed via an Oracle database, and >the file contains numerous French characters. I can see all of the >characters perfectly if I upload the file into Access, Word, Excel, etc., >but not SAS. > >I've tried changing the display font, but none of the ones I have appear >to be able to correctly display the file. > >Anyone have any clue or suggestion? > >Thanks in advance, >Art ...

Re: Reading PDF Files into SAS #8
On 4/1/09, Matthew Pettis <matt.pettis@thomsonreuters.com> wrote: > I second Nat on this -- I forgot about the 'scanned in' possibility. > You will need OCR in that case. Probably faster to just do the data entry the old fashioned way. ...

Re: read files on mainframe from pc sas
Kukda seems to want to avoid running SAS on the mainframe, at least as I read the note, so this otherwise straightforward solution does not meet his requirements. One solution that Ron Fehd has written about would be to have the mainframe files stored in HFS (Hierarchical File Storage) sets (( if memory serves)). These may be mapped as pc drives and can then be read by pc SAS. I suggest a search of our archives for HFS. A major question to me is "why not run SAS on the mainframe". Is this a cost issue or does Kukda simply want to avoid having to log onto a mainframe session and su...

Web resources about - Re: Reading an image file from an oracle database and storing - comp.soft-sys.sas

Database - Wikipedia, the free encyclopedia
A database is an organized collection of data . The data are typically organized to model aspects of reality in a way that supports processes ...

Database - Wikipedia, the free encyclopedia
... requiring information. For example, modelling the availability of rooms in hotels in a way that supports finding a hotel with vacancies. Database ...

Fearing no punishment, Denver cops abuse crime databases for personal gain
(credit: Noel Hidalgo ) Denver police officers performed searches on state and federal criminal justice databases that were not work-related ...

Open source database improves protection and performance
Most enterprises rely on databases in some form or another, but they can be vulnerable to attack from people looking to steal information. They ...

Seattle’s Tableau Software snaps up database-computing startup in Germany
Seattle’s Tableau Software has acquired HyPer, a database-computing startup that spun out of research at a university in Munich, Germany. As ...

NTTC's Liquid Products Database making steady progress
NTTC's Liquid Products Database making steady progress Modern Bulk Transporter NTTC is asking carriers to suggest “proprietary blends” for ...

Amazon Web Services Announces that over 1,000 Databases Have Migrated to AWS since January 1, 2016
Amazon Web Services, Inc. (AWS), today announced that the AWS Database Migration Service is now generally available.

Taiwan launches database on areas vulnerable to quake damage
BEIJING (AP) — Earthquake-prone Taiwan is launching a database to inform residents which areas might be susceptible to creating potentially catastrophic ...

Interior Dept Spent $15 Million On A Crime Database That Doesn’t Work
Interior Dept Spent $15 Million On A Crime Database That Doesn’t Work

Microsoft's SQL database software now runs on Linux
Remember when Steve Ballmer likened Linux to cancer, and the notion of Microsoft courting the open source crowd was virtually unimaginable? The ...

Resources last updated: 3/18/2016 10:38:14 AM