Hi All,
I am trying to read data from one of the following link
https://in.finance.yahoo.com/q?s=%5EHSI&ql=1
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...
-Urvish
"Internal Server Error" when trying your URL.
Update: replace the ^ with %
Hi,
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.
In the interst of time, may I ask how to read and parse "HANG SENG INDEX (^HSI)" from the given URL?
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.
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)
Xia Keshan
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.