I think you will need to use the filename(), fopen(), fread(), fget() functions, and check return codes. Here is an example: data urls; input url:$100.; datalines; http://support.sas.com/techsup/ http://support.sas.com/techsup/service_intro.html http://support.sas.com/techsup/ ; run; data want; set urls; length text $ 10; rc1=filename('urlref',url,'URL','lrecl=3200'); if rc1=0; fid=fopen('urlref','S'); if fid~=0; rc2=fread(fid);/*reading 1 line*/ if rc2=0; rc3=fget(fid, text, 10);/*reading 10 characters*/ rc4=fclose(fid); putlog rc1= fid= rc2= rc3= text= rc4= _ERROR_=; run;
... View more