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: 4649
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 Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts Report cost in CA-dispatch Nileshkul CA Products 3 Wed Jun 07, 2017 10:32 pm
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am


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