My understanding is that the file name you give in the control cards dataset DSN=***.******.FINAL.CNTRLM.DOC ( i.e. FILENAME="CONTRL-M_DOCUMENT.CSV" ) is the name to be given to the e-mail attachment by the SMTP server. The SMTP server has to access the actual z/OS dataset from JCL in order to include it.

My understanding is that the file name you give in the control cards dataset DSN=***.******.FINAL.CNTRLM.DOC ( i.e. FILENAME="CONTRL-M_DOCUMENT.CSV" ) is the name to be given to the e-mail attachment by the SMTP server. The SMTP server has to access the actual z/OS dataset from JCL in order to include it.

No. What I mean is that the JCL must contain the file (DSN=??) you've prepared on z/OS but the attachment name, given in the FILENAME='.....' control card can be entirely different and is the name the e-mail recipient will see.

I have found SMTP on z/OS to be EXTREMELY sensitive to the format and location of the control statements. If what you have isn't working, you will most likely need to experiment -- CONTENT-DISPOSITION and CONTENT-TYPE need to match the data file data, for example.

I have found SMTP on z/OS to be EXTREMELY sensitive to the format and location of the control statements. If what you have isn't working, you will most likely need to experiment -- CONTENT-DISPOSITION and CONTENT-TYPE need to match the data file data, for example.

What do you mean by content-disposition and content-type need to match the data file data...I changed the code and now the RC is zero but I sm not getting any mail....

No. What I mean is that the JCL must contain the file (DSN=??) you've prepared on z/OS but the attachment name, given in the FILENAME='.....' control card can be entirely different and is the name the e-mail recipient will see.

Garry.

I tried the code the way you have written but now I am not getting any mail and the return code is zero. ..

Can you show content of the z/OS dataset? Does it look like a .csv file?

The

Code:

.
QUIT

lines have to be concatenated after the z/OS dataset JCL statement.

Garry.

content of the dataset that has to be sent as attachment

Code:

***.***.FINAL.CNTRLM.DOC

NEW,***JOBS,JOBNAME,TABNAME,JOB DESCRIPTION,WORKING DAYS

earlier i had dataset in two lines the first line same as above and the second being the subset of the first doesnt have comma, so i tried removing the second line and ran even then it dint work out....