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
 

 

I have generated a report using REXX and want to send the

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
rahulbank

New User


Joined: 25 Sep 2008
Posts: 66
Location: Bengaluruuuuuu

PostPosted: Wed Dec 10, 2008 6:05 pm    Post subject: I have generated a report using REXX and want to send the
Reply with quote

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
View user's profile Send private message

superk

Moderator Team Head


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

PostPosted: Wed Dec 10, 2008 6:19 pm    Post subject: Reply to: I have generated a report using REXX and want to s
Reply with quote

What program are you looking for?

I found a few topics which may be relevant:

http://www.ibmmainframes.com/viewtopic.php?t=12103&highlight=smtp
http://www.ibmmainframes.com/viewtopic.php?t=17773&highlight=pkzip
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7935
Location: Bellevue, IA

PostPosted: Wed Dec 10, 2008 6:19 pm    Post subject:
Reply with quote

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
View user's profile Send private message
rahulbank

New User


Joined: 25 Sep 2008
Posts: 66
Location: Bengaluruuuuuu

PostPosted: Wed Dec 10, 2008 6:47 pm    Post subject:
Reply with quote

I am looking for SMTP to send mails as an attchement.
Back to top
View user's profile Send private message
rahulbank

New User


Joined: 25 Sep 2008
Posts: 66
Location: Bengaluruuuuuu

PostPosted: Wed Dec 10, 2008 6:55 pm    Post subject:
Reply with quote

I mean I want to use SMTP code to send attchments in mails.....
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7935
Location: Bellevue, IA

PostPosted: Wed Dec 10, 2008 7:01 pm    Post subject:
Reply with quote

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
View user's profile Send private message
rahulbank

New User


Joined: 25 Sep 2008
Posts: 66
Location: Bengaluruuuuuu

PostPosted: Wed Dec 10, 2008 7:25 pm    Post subject:
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Dec 10, 2008 7:34 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7935
Location: Bellevue, IA

PostPosted: Wed Dec 10, 2008 8:19 pm    Post subject:
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1458
Location: Azeroth

PostPosted: Tue Dec 30, 2008 2:18 pm    Post subject:
Reply with quote

Was searching for an online method of invoking SMTP.
Found the exact answer here... icon_biggrin.gif
Many thanks for Ofer71
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm


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