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');

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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