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