|
Hello All,
I am trying to have a jpeg image from WWW as input and then store it in my
PC. But unable to do so.
Tried the below code,
filename www url '
http://europe.nokia.com/PRODUCT_METADATA_0/Products/Phones/N-series/N9-00/images/nokia_n9-00_black_main-overview.jpg';
data _null_;
infile www url recfm=n;
length byte $1;
input byte $char1.;
file 'c:\picture845.jpg' recfm=n;
put byte $char1. @;
run;
The output file c:\picture845.jpg was a 4KB file & unable to open it..
Whereas the original file on the WWW was 25KB.
Some other attempts that I have made to approach the above requirement are,
*-> reading HTML data from a website & the code works fine,*
Filename www url 'www.yahoo.com';
data _null_;
infile www url end=eof;
input;
file 'c:\html.txt';
put _infile_;
run;
*-> **Was able to successfully read an image stored locally and then store
it locally in another place, using below code*
filename picture 'C:\Documents and Settings\All Users\Documents\My
Pictures\Sample Pictures\sunset.jpg';
data _null_;
infile picture recfm=n;
length byte $1;
input byte $char1.;
file 'c:\picture.jpg' recfm=n;
put byte $char1. @;
run;
Please let me know your thoughts on how to save a picture on the internet
into local computer.
Thanks for viewing,
Vasanth.S
|