How to Send Pdf to email id Using Batch JCL

The below JCL sends PDF ( report which is present in a data set ) to a email id you want to send. Receiver will get an email with PDF as an attachment.

JCL for XMIT pdf

//???????X JOB (????????,????,1439,9999,9999),XMITIP-SAMPLE,
// CLASS=?,MSGCLASS=?,
// NOTIFY=???????,COND=(0,NE)
//*
//* First step is IEBGENER creating a sample
//* report by copying SYSUT1 data to SYSUT2.
//*
//* Second step picks up PASSed SYSUT2 and
//* E-Mails the report on bluebar paper.
//*
//* Comments are at the bottom.
//*
//TESTRPT EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD *
1Sample report heading
Sample single space
Sample to be messed up with overprint
+Sample overprint
0Sample double space
-Sample triple space
//SYSUT2 DD UNIT=V3390,SPACE=(TRK,(15,15)),DISP=(,PASS)
//*
//EMAIL EXEC PGM=IKJEFT1B
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
%XMITIP ?????????@????.edu +
ASA FORMAT PDF/DD:PDFCONFG +
FROM UserID@OS390.????.edu +
SUBJECT 'Sample Report Attached &cdate' +
MSGT 'Sample Report Attached\for &cdate.' +
FILEDD REPORT +
FILEDESC Sample_Report +
FILENAME &cdate_Sample.pdf
//SYSPROC DD DISP=SHR,DSN=SYS?.XMITIP.EXECFB.V544
//REPORT DD DISP=SHR,DSN=.TESTRPT.SYSUT2
//PDFCONFG DD *
ORIENT Landscape
PAPER Letter/BlueBar
BG Textmark/Bottomup/Black/Yellow/30/Sample
LM 0.5
RM 0.2
TM 0.2
BM 0.2
FONT 9/Courier/100
LPI 8
CC Yes
HLQ ???????
//

References

Get new content delivered directly to your inbox.

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.