View previous topic :: View next topic
|
Author |
Message |
rahulbank
New User
Joined: 25 Sep 2008 Posts: 66 Location: Bengaluruuuuuu
|
|
|
|
1. I have generated a report using REXX and want to send the same as an attachment via email. ALso I have many reports so I want to zip amd send them through rexx. Can someone show me the program. I searched the same in the forum but was unsuccessful. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Mainframe zip packages are not free -- you'll have to find out if there is one available already or not; if not it'll cost your organization. Unix System Services supports tarballs, pax files, and gzip/gunzip can be installed -- but none of them is an exact replacement for a zip program.
I don't know enough about REXX and emails to advise you on sending it as an attachment. |
|
Back to top |
|
|
rahulbank
New User
Joined: 25 Sep 2008 Posts: 66 Location: Bengaluruuuuuu
|
|
|
|
I am looking for SMTP to send mails as an attchement. |
|
Back to top |
|
|
rahulbank
New User
Joined: 25 Sep 2008 Posts: 66 Location: Bengaluruuuuuu
|
|
|
|
I mean I want to use SMTP code to send attchments in mails..... |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Code: |
HELO <domain.name>
MAIL FROM: <domain.name>
RCPT TO: <user.name@domain.com>
DATA
FROM: anything
TO: ROBERT SAMPLE
SUBJECT: TEST ATTACHMENT
MIME-VERSION: 1.0
CONTENT-TYPE: TEXT/PLAIN
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=FILE.TXT
// DD DSN=TTSSRS0.JCL.CNTL(EMAILATT),DISP=SHR
// DD DSN=TTSSRS0.JCL.CNTL(EMAILAT),DISP=OLD |
will send a text attachment -- the contents of file TTSSRS0.JCL.CNTL member EMAILATT. The EMAILAT member contains the trailing period required by SMTP.
How to do this in REXX, however, is not a question I can answer. |
|
Back to top |
|
|
rahulbank
New User
Joined: 25 Sep 2008 Posts: 66 Location: Bengaluruuuuuu
|
|
|
|
The EMAILAT member contains the trailing period required by SMTP.
How do I do that?
How to do this in REXX, however, is not a question I can answer.
Actually I thought SMTP is to do with rexx. I do not know abt rexx and so asked this question. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
First, you can generate JCL from within REXX, as in the following example:
Code: |
QUEUE "//"USERID()"ML JOB (23610,0,0668),'MAIL',MSGCLASS=X, "
QUEUE "// MSGLEVEL=(1,1),CLASS=S "
QUEUE "//* "
QUEUE "//SMTPSEND EXEC PGM=IEBGENER "
QUEUE "//SYSPRINT DD SYSOUT=S "
QUEUE "//SYSOUT DD SYSOUT=S "
QUEUE "//SYSIN DD DUMMY "
QUEUE "//SYSUT2 DD SYSOUT=(B,SMTPSERV) "
QUEUE "//SYSUT1 DD * "
QUEUE "HELO AFLMVS "
QUEUE "MAIL FROM:<MOSTEAM@MOSTEAM.COM> "
QUEUE "RCPT TO:<"TOADDR"> "
QUEUE "DATA "
QUEUE "SUBJECT: Job failed "
QUEUE JOBID "failed "
QUEUE MESSAGE
QUEUE "END OF MAIL "
QUEUE "/* "
QUEUE "// "
QUEUE
"SUBMIT *" |
At the other hand, you can invoke IEBGENER directly from within REXX, as in the following example:
Code: |
ADDRESS TSO "EXECIO * DISKR SORTOUT (STEM JOBS. FINIS"
ADDRESS TSO "FREE FI(SYSIN SYSPRINT)"
QUEUE "helo MVSHOST"
QUEUE "mail from:<MVSUser@MVSHost.xyz.com>"
QUEUE "rcpt to:<ofer.f@mosteam.com>"
QUEUE "data"
QUEUE "From: MVSUser@MVSHost.xyz.com"
QUEUE "To: ofer.f@mosteam.com"
QUEUE "Subject: Test message from MVS using SMTP "
QUEUE " "
QUEUE "This is a line in the body of the note."
DO MM = 1 TO JOBS.0
QUEUE JOBS.MM
END MM
ADDRESS TSO "ALLOC F(SYSUT1) TRACKS SPACE(5) REU"
ADDRESS TSO "ALLOC F(SYSIN) DUMMY"
ADDRESS TSO "ALLOC F(SYSPRINT) DA(*)"
ADDRESS TSO "ALLOC F(SYSUT2) SYSOUT(B) WRITER(SMTP) REU"
ADDRESS TSO "EXECIO" QUEUED()" DISKW SYSUT1 (FINIS"
ADDRESS ISPEXEC "SELECT PGM(IEBGENER)"
|
O. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
SMTP is Simple Mail Transfer Protocol. It is a standard for sending emails across the Internet. It has absolutely nothing to do with REXX, which is a programming / scripting language used on multiple platforms. REXX can be used to send mail via SMTP but REXX is also used for many other things which have nothing to do with SMTP -- and IEBGENER can be used to send an SMTP email without anything to do with REXX.
Google RFC 2821 and RFC 2822 to find out about SMTP -- one of the requirements is that email data lines must end with a period on a line by itself. If it doesn't, you don't get mail sent. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Was searching for an online method of invoking SMTP.
Found the exact answer here...
Many thanks for Ofer71 |
|
Back to top |
|
|
|