Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
sending email from jcl using the mailid present inside a fil

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

New User


Joined: 04 Oct 2017
Posts: 1
Location: INDIA

PostPosted: Tue Oct 10, 2017 12:32 pm    Post subject: sending email from jcl using the mailid present inside a fil
Reply with quote

Hi,
My requirement is to process a file and send certain details via mail. The mailid is present in a certain file. How do i extract that mailid from the file and send it to that specific mailid.
Back to top
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1932
Location: UK

PostPosted: Tue Oct 10, 2017 3:45 pm    Post subject:
Reply with quote

You will be processing a data set not a 'file'. Read the data set, extract the mail id and write it to another data set. Use this data set as part of your mailing commands.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8200
Location: East Dubuque, Illinois, USA

PostPosted: Tue Oct 10, 2017 7:29 pm    Post subject: Reply to: sending email from jcl using the mailid present inside a fil
Reply with quote

Quote:
How do i extract that mailid from the file and send it to that specific mailid.
Write a program in the language of your choice to read the data set and use it to create the SMTP commands to send an email; run the commands through SMTP (assuming it is running at your site -- most sites run SMTP these days). Note that the specific job class and writer name to use are site-dependent, so no one on this (or any) forum can tell you what to use for SMTP -- only someone working at your site can tell you those vital pieces of information. SYSOUT=(B,SMTP) is common but by no means universal!
Back to top
View user's profile Send private message
magesh23586

Active User


Joined: 06 Jul 2009
Posts: 211
Location: Chennai

PostPosted: Wed Oct 11, 2017 2:50 am    Post subject: Reply to: sending email from jcl using the mailid present inside a fil
Reply with quote

A Sample job for your reference.

Code:

//PSTEP01  EXEC PGM=SORT                         
//SORTIN DD *
abcd@bfgh.com 
eefg@hggg.com   
//SORTOUT  DD DSN=&&TEMP,                         
//            DISP=(,PASS,DELETE),               
//            UNIT=SYSDA,                         
//            SPACE=(CYL,(1,1),RLSE)             
//SYSIN  DD *
OPTION COPY                                                           
OUTFIL REMOVECC,HEADER1=('%XMITIP (-'),                               
       BUILD=(1,80,SQZ=(SHIFT=LEFT,LEAD=C'<',TRAIL=C'> -')),           
       TRAILER1=(') -',/,                                             
                 '   FROM  ABCD@EFGH.COM  -',/,     
                 '   NOMSG   -',/,                                     
                 '   FILEDD DDNAME1 -',/,                               
                 '       SUBJECT "REPORT FILE IS ATTACHED"')           
//SYSOUT DD SYSOUT=* 
//IKJEFT   EXEC PGM=IKJEFT01,                                       
//             DYNAMNBR=100                                         
//*                                                                 
//SYSIN    DD  TERM=TS                                               
//SYSEXEC  DD  DSN=(QUALIFIER).XMITIP.EXEC,      ==> your xmitip lib                           
//             DISP=SHR                                             
//SYSTSIN  DD  DSN=&&TEMP,DISP=(OLD,DELETE,DELETE)                   
//DDNAME1   DD  DSN=FILE.DATA,        ==>         your data file
//             DISP=SHR                                             
//SYSPRINT DD  SYSOUT=*                                             
//SYSTSPRT DD  SYSOUT=*                                             
//SYSTERM  DD  SYSOUT=*                                             
//SYSOUT   DD  SYSOUT=* 
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 227
Location: Maryland

PostPosted: Wed Oct 11, 2017 7:08 pm    Post subject: Re: Reply to: sending email from jcl using the mailid present inside a fil
Reply with quote

magesh23586 wrote:
A Sample job for your reference.

Code:
. . .

(Matthew 7:6) wrote:
The Principle: Casting Pearls Before Swine.

"Do not give what is holy to dogs, and do not throw pearls before swine, lest they trample them under their feet, and turn and tear you to pieces." .
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8200
Location: East Dubuque, Illinois, USA

PostPosted: Wed Oct 11, 2017 7:33 pm    Post subject:
Reply with quote

magesh23586, since XMITIP is not part of z/OS and must be installed as an independent software vendor product, what does niloyarp do if XMITIP is not installed at that site? Your JCL will be completely useless if XMITIP is not available, and not all sites have it installed.
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 Rexx to send an email without SMTP Se... upendrasri All Other Mainframe Topics 12 Sun Nov 19, 2017 7:59 pm
This topic is locked: you cannot edit posts or make replies. Comparing current time with the time ... arunsoods SYNCSORT 1 Mon Oct 30, 2017 4:07 pm
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am
No new posts EMAIL using IEBGENER - SMTP parasmalik20 JCL & VSAM 4 Tue May 23, 2017 12:19 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us