View previous topic :: View next topic
|
Author |
Message |
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 123 Location: argentina
|
|
|
|
Hello, Im thinking in studying some of this language but I cannot see practical examples of its use.
Can you tell me about some programs that you use in order to see what can it do? |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2012 Location: USA
|
|
|
|
Code: |
/* REXX */
Say "Hello, World!"
Return 0 |
|
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2012 Location: USA
|
|
|
|
A sample more complex than Hello, World!
ibmmainframes.com/viewtopic.php?t=65373
There are approx. 100500 other samples at this forum, plus approx. 100500100 more samples at other locations. To say nothing about the books, and manuals. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Quote: |
thinking in studying some of this language |
I am curious of what practical tasks you do in other languages. Can you give examples? That is, I am not interested in code snippets, but rather what requirements you meet. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1231 Location: Bamberg, Germany
|
|
Back to top |
|
|
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 123 Location: argentina
|
|
|
|
Pardon me, I did not make clear that I was asking for useful programs for a mainframe programer. |
|
Back to top |
|
|
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 123 Location: argentina
|
|
|
|
this is fantastic, thanks. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2012 Location: USA
|
|
|
|
Ali_gezer wrote: |
Pardon me, I did not make clear that I was asking for useful programs for a mainframe programer. |
What is the difference between “a useful program”, and “a useless one”? |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1231 Location: Bamberg, Germany
|
|
|
|
sergeyken wrote: |
What is the difference between “a useful program”, and “a useless one”? |
It's in the name "use less". |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
The original poster said he was referring to useful programs for a mainframe programmer... this is not a one-size-fits-all type of situation. For example, some people are managing the operating system while others are doing database stuff.
The best approach is that when you encounter a problem, to try to solve it with rexx. And by using it, you can learn it. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
This topic reminds me of myself 22 years ago. I had just obtained a PC C compiler and was wondering what I could do with it. Just devising ideas and writing programs to implement the ideas eventually gave me lots of experience. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
My approach is is leverage my laziness. Many of my Rexx programs originated from my desire to automate some of the boring and labour intensive tasks that are part of a programmer’s life. For example, extracting job output from SDSF and saving in in a permanent PDSE used as an archive. You can do it manually via the XDC command, but that gets tedious after the first 50 times. So I automated it using Rexx, for my own benefit at first, and now my whole team uses it. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1231 Location: Bamberg, Germany
|
|
|
|
don.leahy wrote: |
For example, extracting job output from SDSF and saving in in a permanent PDSE used as an archive. You can do it manually via the XDC command, but that gets tedious after the first 50 times. So I automated it using Rexx, for my own benefit at first, and now my whole team uses it. |
Mind to share? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
re: "My approach is to leverage my laziness"
Same here! (I am retired now... ups my laziness to a whole new level) |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
Joerg.Findeisen wrote: |
don.leahy wrote: |
For example, extracting job output from SDSF and saving in in a permanent PDSE used as an archive. You can do it manually via the XDC command, but that gets tedious after the first 50 times. So I automated it using Rexx, for my own benefit at first, and now my whole team uses it. |
Mind to share? |
If it was up to me, yes. But I am bound by strict IP rules imposed by my employer. The contract says that they own everything I create. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
@don.leahy
How do you store, the entire job under its jobname? What happens next time the same jobname is encountered?
Is it a batch program or run from ISPF? |
|
Back to top |
|
|
JPVRoff
New User
Joined: 06 Oct 2009 Posts: 41 Location: Melbourne, Australia
|
|
|
|
don.leahy wrote: |
Joerg.Findeisen wrote: |
don.leahy wrote: |
For example, extracting job output from SDSF and saving in in a permanent PDSE used as an archive. You can do it manually via the XDC command, but that gets tedious after the first 50 times. So I automated it using Rexx, for my own benefit at first, and now my whole team uses it. |
Mind to share? |
If it was up to me, yes. But I am bound by strict IP rules imposed by my employer. The contract says that they own everything I create. |
Even if you do it at home, in your spare time, on your Hercules "mainframe"? |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1231 Location: Bamberg, Germany
|
|
|
|
JPVRoff wrote: |
Even if you do it at home, in your spare time, on your Hercules "mainframe"? |
You will not have to have some authorities to check your Software Licenses. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Don is bound by it, mainly through his strong ethics. Kudos to Don. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Quote: |
How do you store, the entire job under its jobname? |
We did not have production jobs where I worked, so I never had to use GDGs. Perhaps that is the first choice.
An alternative would be to use data sets with a hierarchical naming convention:
Code: |
hlq.jobname.D22011.T151200.jobnum |
|
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
Willy Jensen wrote: |
@don.leahy
How do you store, the entire job under its jobname? What happens next time the same jobname is encountered?
Is it a batch program or run from ISPF? |
I use the job number as the member name. It’s not guaranteed to be unique because it eventually rolls over, but your chances are good. The tool maintains a log data set that stores the job name along with the job number. This serves as an index on the archive PDSE, and makes navigation easy.
The tool runs in both batch and online modes, depending on the option selected on the ISPF panel that kicks off the process. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
Pedro wrote: |
Quote: |
How do you store, the entire job under its jobname? |
We did not have production jobs where I worked, so I never had to use GDGs. Perhaps that is the first choice.
An alternative would be to use data sets with a hierarchical naming convention:
Code: |
hlq.jobname.D22011.T151200.jobnum |
|
I considered that, but we wanted to store all the output in a single PDSE. A typical project uses multiple PDSEs, usually one per test cycle, where a cycle might consist of 500 jobs. I used the job number as the member name, as it is nearly unique for most practical purposes. It’s also not very user friendly so the tool maintains a log data set that is updated as jobs are added to the archive PDSE. The log contains job name, job number, MAXRC, start/end date/time, etc. |
|
Back to top |
|
|
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 123 Location: argentina
|
|
|
|
don.leahy wrote: |
My approach is is leverage my laziness. Many of my Rexx programs originated from my desire to automate some of the boring and labour intensive tasks that are part of a programmer’s life. For example, extracting job output from SDSF and saving in in a permanent PDSE used as an archive. You can do it manually via the XDC command, but that gets tedious after the first 50 times. So I automated it using Rexx, for my own benefit at first, and now my whole team uses it. |
I was refering to this kind of use of the language.
Can you give some more examples? I find useful this programs of yours.
Thank you in advice. |
|
Back to top |
|
|
|