11-12-2014 03:10 AM
I am trying to read data from one of the following link
I can create HTML page by using proc http...
But can anyone suggest how to read the data directly from the above link...Please note that data is not saved in file format...It is just displayed in link and i want to read from that...
Thanks in advance...
11-12-2014 04:24 AM
11-12-2014 04:34 AM
What exactly are you trying to read from that page. It looks like a straight forward HTML document (right click and view source). If its something specific then you need to read it in as text and identify the elements you want to pull out, i.e. look for
"HANG SENG INDEX (^HSI)"
In the read in text, and then read and parse from there.
11-12-2014 08:32 AM
Well, you mention that you have: "I can create HTML page by using proc http..."
So you then just need to do a datastep with an infile. Read the whole text file in and using findc() or index() search for the data you are after. Once you know where it is then you parse the HTML tags to get the actual data.
11-12-2014 09:14 AM
You are connecting a encrypt URL . Check proc http documentation
Making PROC HTTP Calls by Using the HTTPS Protocol In order to make PROC HTTP calls by using the HTTPS protocol, you must configure a trust source that contains the certificate of the service to be trusted. This trust source and its password must be provided for the SAS session by setting Java system options using jreoptions. You can provide this information on the SAS command line or in a SAS configuration file. Use the following syntax. Be sure to enter the following entry on one line: -jreoptions (-Djavax.net.ssl.trustStore=full-path-to-the-trust-store - Djavax.net.ssl.trustStorePassword=trustStorePassword) The following example shows how to use the entry on the SAS command line. This example uses the Windows operating environment. Be sure to enter the following entry on one line: "C:\Program Files\SAS\SASFoundation\9.2\sas.exe" -CONFIG "C:\Program Files\SAS\SASFoundation\9.2\nls\en\SASV9.CFG" -jreoptions (- Djavax.net.ssl.trustStore=C:\Documents and Settings\mydir\.keystore -Djavax.net.ssl.trustStorePassword=trustpassword)