Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

JCL to send a mail with an attachament(dataset as report)

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
prasanth_urs

New User


Joined: 04 Dec 2006
Posts: 44
Location: Pune,India

PostPosted: Mon Aug 04, 2008 5:45 pm    Post subject: JCL to send a mail with an attachament(dataset as report)
Reply with quote

Hi all,

I have to create a job which will send a mail with an attachment. The attachment will be a dataset A.B.C.

Please help.

Thanks
Prasanth
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Mon Aug 04, 2008 5:52 pm    Post subject: Reply to: JCL to send a mail with an attachament(dataset as
Reply with quote

This previous topic might be a good starting point.

Also see the MVS Mail page.
Back to top
View user's profile Send private message
jsathishbabu84

New User


Joined: 07 Jun 2007
Posts: 22
Location: India

PostPosted: Tue Aug 05, 2008 11:06 am    Post subject:
Reply with quote

Hi,

You can also use XMIT for sending attachments in different formats(.HTML, .TXT etc.)

Regards,
SJ
Back to top
View user's profile Send private message
prasanth_urs

New User


Joined: 04 Dec 2006
Posts: 44
Location: Pune,India

PostPosted: Tue Aug 05, 2008 11:18 am    Post subject:
Reply with quote

Hi jsathishbabu84,

please give the jcl in detail using XMIT....

Many thanks in advance.

Prasanth
Back to top
View user's profile Send private message
mshivashankar007

New User


Joined: 03 Aug 2007
Posts: 2
Location: hyderabad

PostPosted: Tue Aug 05, 2008 3:01 pm    Post subject:
Reply with quote

use this job card and try once ,,,,if u know SAS utility
//STEP0300 EXEC SAS,
// REGION=4104K,
// OPTIONS='ERRORS=0,EMAILSYS=SMTP,EMAILHOST=SMTP.AICI.COM'
//WORK DD SPACE=(CYL,(30,50),,,ROUND)
//FT12F001 DD COPIES=1
//SYSIN DD *

DATA REPORT;
FORMAT DATE1 MMDDYY8.;
CALL SYMPUT ('HDATE',PUT(TODAY(),MMDDYY8.));
FORMAT EMAILDATE MMDDYY8.;
PUT "!EM_SUBJECT!" "HDATE11";
FILENAME MYFILE EMAIL
FROM= (......mail id's )
TO= (..mail id's..)
")
ATTACH=("file attach here" )
TYPE= "TEXT/PLAIN";
DATA REPORT;
SET REPORT;
FILE MYFILE;
PUT "!EM_SUBJECT!" "OVER AGE REPORT FOR APPLIED INDUSTRIAL - &HDATE";
PUT " ";
PUT " ";
PUT "THIS EMAIL CONTAINS AN OVER AGE REPORT FOR AIT .";
MONTHS.";
PUT " ";
RUN;
QUIT;
*
Back to top
View user's profile Send private message
jsathishbabu84

New User


Joined: 07 Jun 2007
Posts: 22
Location: India

PostPosted: Tue Aug 05, 2008 3:43 pm    Post subject:
Reply with quote

Prasanth,

Find the sample JCL below,

//MAIL EXEC PGM=IKJEFT1B,DYNAMNBR=50
//SYSEXEC DD DISP=SHR,DSN=SYSU.XMITIP.EXEC
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//XYZ DD DSN=(Dataset name to be attached as file),DISP=SHR
//SYSTSIN DD *
%XMITIP(email id) -
SUBJECT 'Subject of mail' -
FORMAT TXT - (indicates as text file attachment) -
MSGDS 'Dataset name which has message for body of mail' -
FILEDD (XYZ) - (DD Name of the DSN given in JCL)
FILENAME (ABC.TXT) - (Filename to be mentioned in the mail)
FROM email id
/*

Regards,
SJ
Back to top
View user's profile Send private message
prasanth_urs

New User


Joined: 04 Dec 2006
Posts: 44
Location: Pune,India

PostPosted: Wed Aug 13, 2008 11:25 am    Post subject:
Reply with quote

Hi SJ,

Thank you for the jcl...
but could you please tell me, the use of SYSU.XMITIP.EXEC.
This differs from job to job.
so please tell me how to find out the SYSEXEC.

Please help this is urgent..

Thanks
Prasanth.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Aug 13, 2008 9:22 pm    Post subject:
Reply with quote

Hello,

If it is urgent, you would probably get faster answers from your local support people. . .

These people can also tell you if xmitip has been installed on your system and the names of any required datasets.

Because installation is optional (many places do not have xmitip installed) and it is completely configured locally, someone on your system will need to tell you what the datasets are named.

SYSU.XMITIP.EXEC is the dataset that contains the rexx code for xmitip - on that system. It would almost surely be a different dsn on your system.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts Detailed Transaction History report f... Kyle Carroll CICS 5 Tue Oct 18, 2016 12:42 am
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Reading data from PS file and send it... rajatbagga All Other Mainframe Topics 18 Fri Sep 23, 2016 12:51 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us