Focal Point
[SOLVED] Can I send a file via email to a pc?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/201105991

August 04, 2009, 11:33 AM
webmeister
[SOLVED] Can I send a file via email to a pc?
I am running a vey old version of mainframe FOCUS, Rel. 7.1. My question/plight: I have a program that holds an output file in Excel format. I need to e-mail that Excel file to a user. How would I go about doing this in an older release of mainframe FOCUS?

Thank you - looking forward to hearing from all of you.

This message has been edited. Last edited by: Kerry,


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
August 04, 2009, 11:48 AM
ac1
I think you can do it with JCL:


//*------------------------------------------
//*   SEND MAIL FILE text
//*------------------------------------------
//STEPERR  EXEC PGM=IEBGENER                      
//SYSIN    DD  DUMMY                              
//SYSPRINT DD  SYSOUT=A                           
//SYSUT1   DD  DISP=SHR,DSN=XX.XXXX.MAIL(MYLIST)  
//         DD  *                                  
SUBJECT: XXXXXXXXXXXXXXXXXX
mime-version: 1.0          
content-type: text/plain;  
content-disposition: attachment;             
//         DD  DSN=WW.HHHHH.DATASET,DISP=SHR 
//*                                          
//SYSUT2    DD  SYSOUT=(Z,NETSMTP)           


Dataset MYLIST :

helo mvaa                                    
mail from:<xxxx§yyy.com>     
RCPT TO:<user§yyy.COM>        
data                                         
from:   xxxx§yyy.com         
to:     user§yyy.COM          
cc:                                          




FOCUS 7.2.0S1
Mainframe - MVS 390
Excel, Flat file

Italy
August 04, 2009, 12:33 PM
webmeister
AC1,

Thank you for the suggestion... I'll take your sample and modify it for my test and see what happens. I appreciate your reply.

My daughter just came back from a trip to Italy and she loved it. She wants to come back.


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
August 04, 2009, 01:01 PM
webmeister
ac1,

I tried what you suggested, however, nothing comes to my outlook e-mail. I only see messages that the job routed something to SMTP, but that's about as far as it gets. If you have any suggestions, I would love to hear them.

Thanks again!


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
August 04, 2009, 02:04 PM
Francis Mariani
I assume the mail server has to be specified somewhere in the JCL, or is it pre-defined to the mainframe somehow?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
August 04, 2009, 02:27 PM
webmeister
It is specified somewhere in the JCL, as in this case in ac1's reply.

quote:
//SYSUT2 DD SYSOUT=(Z,NETSMTP)



Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
August 04, 2009, 03:49 PM
Diptesh Patel
The mail server is referenced via the domain name immediately following HELO. In ac1's example, it was "mvaa"
You may need to check with your system folks what the domain name for your environment is. The //SYSUT2 DD SYSOUT=(Z,NETSMTP) indicates that Z is the JES class used for SMTP processing. Again, your systems folks should be able to give you the value for that.


Diptesh
WF 7.1.7 - AIX, MVS
August 04, 2009, 04:04 PM
webmeister
Hi, Diptesh, and thank you for replying. I have confirmed those items, but it might be that we don't have SMTP. Do you know of a way that I can check to see if our mainframe has SMTP installed and ready to use? Some of our systems are really quite old, and I just was wondering... perhaps I don't have the use of SMTP.....


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
August 05, 2009, 09:21 AM
Diptesh Patel
Webmeister:
I may be mistaken, but I think SMTP comes with the MVS operating system. However, it needs an SMTP server (software) running. It is possible that your environment may not have it. Your mainframe systems folks should be able to verify whether it is set up.
There are also other third party email utilities that are available. Maybe your company has one of those?
If your windows environment has SMTP available, I think FTP can kick off a command file (looking for documentation). If that is the case, you could FTP the Excel file, then another FTP that executes a cmd file which sends the email. I know this is a roundabout way, but that's what is needed sometimes!


Diptesh
WF 7.1.7 - AIX, MVS
August 05, 2009, 10:04 AM
webmeister
Diptesh,

Thank you for replying.... it does look like we don't have SMTP. The other possibility you mentioned sounds interesting.... can you please tell me more, or point me to where I can get more information? We are using WS-FTP.

Thanks again.


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
August 05, 2009, 02:50 PM
Diptesh Patel
Webmeister:
Sorry, it is not FTP, but a home-grown product we have at my company that allows us to kick off command files.
However, here is another option.
1. FTP your Excel report to a server somewhere.
2. Create a Windows script that will check for the existence of the Excel file. If it exists, the script will use SMTP on Windows to send the email with attachment, then delete the file.
3. On any PC (that will be logged on to the network when the excel file is FTP'd), use the Scheduled Tasks (Start... Settings...Control Panel) to schedule the script to run at whatever time (or time interval) you choose.
If you do not have SMTP on Windows, there are freeware products that you can use. A couple of examples are 'bmail' and 'Free SMTP Server' (from softstack).


Diptesh
WF 7.1.7 - AIX, MVS
August 05, 2009, 03:49 PM
webmeister
Thank you again Diptesh,

I appreciate you taking the time to reply and make suggestions. I am somewhat following the FTP track, i.e., assign the user to a server and then using JCL, FTP-ing my output file to a server, where the user can determine if the file exists there or not,

Sounds like a sensible solution, yes?


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO