View previous topic :: View next topic
|
Author |
Message |
Divakar R
New User
Joined: 19 Feb 2013 Posts: 9 Location: India
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
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 |
|
|
Divakar R
New User
Joined: 19 Feb 2013 Posts: 9 Location: India
|
|
|
|
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 |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
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 |
|
|
Divakar R
New User
Joined: 19 Feb 2013 Posts: 9 Location: India
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
- Write Good Code
- Check all Return Codes etc
- Enrico has provide very nice examples of "wrappers" for different "environments"
- Use Trace in its variants
- If you still feel the need for a debugger, your program is either too complicated, or not good enough
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
if You had cared to look at the manuals You would have discovered the wonders of the
TRACE statement |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|