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;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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