View previous topic :: View next topic
|
Author |
Message |
niloyarp
New User
Joined: 04 Oct 2017 Posts: 1 Location: INDIA
|
|
|
|
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 |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
magesh23586
Active User
Joined: 06 Jul 2009 Posts: 213 Location: Chennai
|
|
|
|
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 |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
magesh23586 wrote: |
A Sample job for your reference.
|
(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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
|