BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

I have a ps in mainframe which has HTML file. Now i want to export it to my PC in Excel format through SAS program. Is it possible to achieve this. I am not a professional SAS programmer. Expecting a reply as early as possible.

Thanks,
MS
1 REPLY 1
Chevell_sas
SAS Employee
It appears that you have the file created already. Since this file is created already, you can use the FTP Access method along with the data step to move the file from the mainframe to the PC. On the PC, if you give this an extension of .XLS, the file will be opened in Excel since Excel can read HTML files. Note that this does not create a native Excel formatted file. The step below reads the HTML file and write it back out to the file specified with the filename statement and the FTP access method.

ods listing close;

filename temp ftp 'location/xxx.xls'
user='joebloe' host='hostname'
pass='xxx'
recfm=v
prompt debug;


filename in "some.html.file";

data _null_;
infile in ;
input;
file temp;
put _infile_;
run;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 2649 views
  • 0 likes
  • 2 in conversation