Here are the information statements resultant from the zipping code.
ZPAM000I VOLUME INFO LIST FULL, ADDITIONAL VOLUME INFO ENTRIES DISCARDED.
ZPAM030I OUTPUT Archive opened: TVDT.N2.VROL.UA5AV00
ZPAM000I VOLUME INFO LIST FULL, ADDITIONAL VOLUME INFO ENTRIES DISCARDED.
ZPAM253I ADDED File TVDT.N2.VROL.RUA5AV00
ZPAM254I as FIL2
ZPAM255I (DEFLATED 94%/94%) DATA SIZE 11,328,000; ZIP SIZE 640,444
ZPAM253I ADDED File TVDT.N2.VROL.BUA5AV00
ZPAM254I as FIL1
ZPAM255I (DEFLATED 93%/93%) DATA SIZE 17,525,000; ZIP SIZE 1,299,633
ZPAM140I FILES: ADDED EXCLUDED BYPASSED IN ERROR COPIED
ZPAM140I 2 0 0 0 0
and here is the emailing code. I used SAS here so that multiple attachments could be sent.
//STEP03 EXEC SASMSTR,REGION=32K,WORK='2000,1000'
//FT11F001 DD SYSOUT=* SAS LOG
//FT12F001 DD SYSOUT=* SAS PRINT
//FT13F001 DD SYSOUT=* SAS PUNCH
//REPORT1 DD DSN=USERID.MYFILE1.CSV,DISP=SHR
//REPORT2 DD DSN=USERID.MYFILE2.CSV,DISP=SHR
//SYSIN DD *
%LET MAILFILE1 = %SYSFUNC(PATHNAME(REPORT1));
%LET MAILFILE2 = %SYSFUNC(PATHNAME(REPORT2));
DATA _NULL_;
CALL SYMPUT("FDATE",LEFT(PUT("&SYSDATE"D-1,WORDDATE.)));
FILENAME LNOTE EMAIL
from=("username@domain.com")
to=("username@domain.com")
SUBJECT ="EWR REPORT - &SYSDATE"
ATTACH =
("&MAILFILE1" EXTENSION='CSV' TYPE='TEXT/CSV' NAME="REPORT1"
"&MAILFILE2" EXTENSION='CSV' TYPE='TEXT/CSV' NAME="REPORT2");
DATA _NULL_;
FILE LNOTE ;