BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I am sending an email from the mainframe with 2 files attached. One is a PDF and the other is XLS.
I have used 2 attach statements as so:

ATTACH=("CPMS.D72.CSD.DALIB.RESULTSP" CT='APPLICATION/PDF' EXT='PDF')
ATTACH=("CPMS.D72.CSD.DALIB.RESULTSX" EXT='XLS');

When I receive the email only 1 of the attachments has the extension applied. The other has no extension.
If I swap the 2 attach statements around, the other file has its extension.
Does anyone know how I can give both files their extensions?
2 REPLIES 2
deleted_user
Not applicable
Are you using the attach parameter twice? My emails from z/OS use the attach parameter just once and I have never had this problem e.g.

ATTACH=("CPMS.D72.CSD.DALIB.RESULTSP" CT='APPLICATION/PDF' EXT='PDF' "CPMS.D72.CSD.DALIB.RESULTSX" EXT='XLS');
JohnH
Fluorite | Level 6
I also find that the type=image/gif works well for the pdf or rtf or xls file. See below:

filename outbox email
to='john.c.hennessey@ssa.gov'
subject='batch output'
attach=("ais.p2222jch.outpdf" type='image/gif' extension='rtf' "ais.p2222jch.tran" type='text/plain' extension='txt');

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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