filename out TEMP;
/*libname icic '/home/mravi/work/icici';*/
proc http
url='https://www1.nseindia.com/live_market/dynaContent/live_watch/option_chain/optionKeys.jsp?
symbolCode=-10006&symbol=NIFTY&symbol=NIFTY&instrument=-&date=
-&segmentLink=17&symbolCount=2&segmentLink=17'
out=out
method="get";
run;
data new;
infile out truncover;
input var $5000.;
run;
I recommend that you keep the URL all on one line:
filename out TEMP;
/*libname icic '/home/mravi/work/icici';*/
proc http
url='https://www1.nseindia.com/live_market/dynaContent/live_watch/option_chain/optionKeys.jsp?symbolCode=-10006&symbol=NIFTY&symbol=NIFTY&instrument=-&date=-&segmentLink=17&symbolCount=2&segmentLink=17'
out=out
method="get";
run;
data new;
infile out truncover;
input var $5000.;
run;
Are you using SAS OnDemand for Academics for this? You might be running out of space or otherwise running afoul of a policy to download large data. Or, perhaps your environment cannot connect outside a firewall? Try this test to confirm.
In general, the code works in SAS Studio (I tried in SAS Studio in SAS Viya v2022.09)
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.