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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 2265 views
  • 0 likes
  • 2 in conversation