The SAS Output Delivery System and reporting techniques

Renaming Email Attachments

Reply
N/A
Posts: 0

Renaming Email Attachments

Is it possible to rename a file when attaching it to an email?

I am sending the file from a mainframe dataset.

I currently using code like so:

ATTACH=("G741270.DATASET.NAME" EXT='CSV');

I would like to rename the file to something like "latest data file.csv"

is there a RENAME= option I could use?


thanks,
Frequent Contributor
Posts: 102

Re: Renaming Email Attachments

Use the NAME= and EXTENSION= options in the ATTCH= clause of the email filename to cause the attachment to be received with a different name.

See http://support.sas.com/onlinedoc/913/getDoc/en/lrdict.hlp/a002058232.htm
SAS Super FREQ
Posts: 8,742

Re: Renaming Email Attachments

Hi,
I have to admit that my mainframe days are fading into the past, but wasn't there a utility program called IEBCOPY or something that you could use? As I remember, spaces are not valid in mainframe dataset names, but it seems to me that you could use mainframe utilities to rename the file from:
G741270.DATASET.NAME to LATEST.DATA.FILE

Or even better, just use the name you want in your SAS program (if you are using SAS to create G741270.DATASET.NAME ). The only way that I can think of to do it with SAS is to issue an X command that issues a TSO command to do the rename OR an X command to invoke a CLIST, but if you're doing this in batch JCL, then you might need a different approach.

This is probably a question that is best answered by Tech Support, since they are better in tune with how to do things on the mainframe these days.

cynthia
Ask a Question
Discussion stats
  • 2 replies
  • 283 views
  • 0 likes
  • 3 in conversation