BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi ,

I tried to send the SAS dataset to excel in Mainframe SAS using ODS HTML. But its not working fine. And also i have tried using the EXPORT facility. But the saslog says " the Export facility is not avaiable in this os". I used the version
NOTE: Copyright (c) 1999-2001 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software Release 8.2 (TS2M0)
, Site 0036505002.

HTMLSource code:-
-------------------------------
FILENAME OUT "&indexo1..RM81261.M&mon.&year2"
DISP=(NEW,CATLG,DELETE)
SPACE=(27998,(1500,750),RLSE) UNIT=SYSDA;
ods html FILE="&indexo1..RM81261.M&mon.&year2" Trantab=ascii;
proc print data=xlssam;
run;
ods html close;
FILENAME Repemail EMAIL TO=("&emailid")
SUBJECT="⊂"
TYPE='text/html'
ATTACH=("&indexo1..RM81261.M&mon.&year2"
NAME="&indexo1..RM81261.&suppid..&mon.&year2"
extension="xls");
2 REPLIES 2
Cynthia_sas
Diamond | Level 26
Hi:
There are some known issues with SMTP mail and the mainframe.
http://support.sas.com/kb/3/691.html
http://support.sas.com/kb/17/059.html

I don't know whether you're running into those issues or whether the problem is with your invocation of ODS HTML or with your macro variable resolution.

I don't believe that Proc Export works on the mainframe, so ODS HTML or ODS CSV or ODS TAGSETS.EXCELXP may be your only choice. Here is a tip sheet on using ODS with the mainframe:
http://support.sas.com/rnd/base/ods/templateFAQ/MVSODS3.pdf (page 13)

My advice would be to contact Tech Support on this email issue.

cynthia
OS2Rules
Obsidian | Level 7
Hi:

We use the ExcelXP tagset on our z/OS mainframe to create spreadsheets and then e-mail them without problems.

I think you need to add the "Content Type" to the email options:

EXT="XLS" CT="application/octet-stream"

Remember that the file on the mainframe is in ASCII not EBCDIC so opening the file there will show garbage. You really have to download the file in binary and then open it on your PC to read it correctly.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 1228 views
  • 0 likes
  • 3 in conversation