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
 

 

Need Rexx/DB2 Program to send mail as XLS attachment

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Divakar R

New User


Joined: 19 Feb 2013
Posts: 9
Location: India

PostPosted: Sun Feb 24, 2013 7:39 pm    Post subject: Need Rexx/DB2 Program to send mail as XLS attachment
Reply with quote

We have a requirement to retrieve few rows from DB2, and to generate an email attachment as XLS file. Also Needs to know how to run it in test environment?

I'm a beginner in REXX programming. And also I know how to do it in jcl, Here I need to code only in REXX.


Please advise on how to code this kind of Programs.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Sun Feb 24, 2013 8:03 pm    Post subject: Reply to: Need Rexx/DB2 Program to send mail as XLS attachme
Reply with quote

You will make the most out of the question You ask
when dealing with <common> issues related to the zOS platform

asking how to code from scratch an application is out of the bounds of forum questions

usually we gladly share our experience on problems we have faced ( and usually also quickly )

chances to receive specific advice for this kind of requirements are usually pretty slim

also the problem should not have been assigned to a beginner

anyway if You really have the need proceed for stages and little steps

usin DSNREXX start fetching the rows You need,
google on how how to create using REXX an XML file
googlr on how to send an EMAIL with attachment using REXX or ...
better involve the powers of Your organization in order to INSTALL the
XMITIP package ( google for it )
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Sun Feb 24, 2013 9:07 pm    Post subject:
Reply with quote

XLS is a specific file format which Microsoft uses over 1000 pages to describe. You would be MUCH better off either (1) getting your site to buy a package that runs on the mainframe to generate XLS files, or (2) write comma-delimited data and let Excel convert the comma-delimited data to XLS.

There is much, both on this forum and the Internet, on doing what you want -- yiou need to spend some time doing research.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Mon Feb 25, 2013 9:19 am    Post subject:
Reply with quote

Hi Divakar,

You don't need rexx to do this. I don't understand why even rexx is needed.

What you need is,
1. Unload data in a CSV/External format, which would open the file in excel when the attachment is double clicked.
2. A JCL step to send an mail, which you can ask your support team.

As the size of the email attachment gets bigger, it is not advisable to send that much of data through an email from mainframe, in that case you may have to FTP it to a specific location.

Thanks,
Sushanth
Back to top
View user's profile Send private message
Divakar R

New User


Joined: 19 Feb 2013
Posts: 9
Location: India

PostPosted: Mon Feb 25, 2013 10:23 am    Post subject: Reply to: Need Rexx/DB2 Program to send mail as XLS attachme
Reply with quote

Hi Sushanth,

Thanks for your reply.

Here as they are following the same from so long. They don't want me to change the way they are. Can anyone atleast tell me how to execute REXX in Test environment? Even in the pgm , We have arg parm receiving thru JCL.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Mon Feb 25, 2013 11:47 am    Post subject:
Reply with quote

Hi Divakar,

Below are couple of links pointing to more links which would answer your question,

JCL To Execute A REXX Program

How to execute REXX code

Quote:
Can anyone atleast tell me how to execute REXX in Test environment?

If you are working in a Plex environment, you would have production in a different plex and development in different plex, so if you have your rexx code in dev plex and run it there, means you are running your code in test environment, there is nothing like SSID in DB2 where you specify the environment, you want to run the program in.

If your are working in a multi-Lpar system, where production and development are in different lpar, same thing applies as above, if you have your rexx code in test lpar and run it there, means you are running your code in test environment

Let me know if i have misunderstood your question.

Regards,
Sushanth
Back to top
View user's profile Send private message
Divakar R

New User


Joined: 19 Feb 2013
Posts: 9
Location: India

PostPosted: Tue Feb 26, 2013 2:11 pm    Post subject: Reply to: Need Rexx/DB2 Program to send mail as XLS attachme
Reply with quote

Hi Sushanth,

Yes, We are working in a multi-Lpar system, where production and development are in different lpar.

As of now, I can able to run REXX pgm. Thanks alot.
In our project we dont have any Debuggers, Is there any way to debugg REXX pgms? If so, Can you kindly expalin (apart from displays) ?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Tue Feb 26, 2013 2:16 pm    Post subject: Reply to: Need Rexx/DB2 Program to send mail as XLS attachme
Reply with quote


  1. Write Good Code
  2. Check all Return Codes etc
  3. Enrico has provide very nice examples of "wrappers" for different "environments"
  4. Use Trace in its variants
  5. If you still feel the need for a debugger, your program is either too complicated, or not good enough
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Tue Feb 26, 2013 2:17 pm    Post subject: Reply to: Need Rexx/DB2 Program to send mail as XLS attachme
Reply with quote

if You had cared to look at the manuals You would have discovered the wonders of the
TRACE statement icon_cool.gif
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Feb 26, 2013 6:37 pm    Post subject:
Reply with quote

hello and welcome to the forum,

Quote:
Here as they are following the same from so long.
Why not simply clone one that already works and modify for your requirement?
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 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
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm


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