The SAS Output Delivery System and reporting techniques

Exporting PS file from mainframe to excel sheet using SAS-ODS

Reply
N/A
Posts: 0

Exporting PS file from mainframe to excel sheet using SAS-ODS

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
SAS Employee
Posts: 88

Re: Exporting PS file from mainframe to excel sheet using SAS-ODS

Posted in reply to deleted_user
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;
Ask a Question
Discussion stats
  • 1 reply
  • 1057 views
  • 0 likes
  • 2 in conversation