IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Can you give me examples of programs using rexx?


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ali_gezer

Active User


Joined: 06 Apr 2021
Posts: 101
Location: argentina

PostPosted: Sat Nov 20, 2021 12:02 am
Reply with quote

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

Senior Member


Joined: 29 Apr 2008
Posts: 1523

PostPosted: Sat Nov 20, 2021 1:57 am
Reply with quote

Code:
/* REXX */
Say "Hello, World!"
Return 0
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 1523

PostPosted: Sat Nov 20, 2021 2:06 am
Reply with quote

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

Global Moderator


Joined: 01 Sep 2006
Posts: 2351
Location: Silicon Valley

PostPosted: Sat Nov 20, 2021 2:07 am
Reply with quote

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

Active Member


Joined: 15 Aug 2015
Posts: 807
Location: Bamberg, Germany

PostPosted: Sat Nov 20, 2021 9:49 am
Reply with quote

Samples of useful things done w/ REXX can be found for ex at Mark Zelden Website. Link http://mzelden.com/mvsutil.html
Back to top
View user's profile Send private message
Ali_gezer

Active User


Joined: 06 Apr 2021
Posts: 101
Location: argentina

PostPosted: Sat Nov 20, 2021 8:05 pm
Reply with quote

Pardon me, I did not make clear that I was asking for useful programs for a mainframe programer.
Back to top
View user's profile Send private message
Ali_gezer

Active User


Joined: 06 Apr 2021
Posts: 101
Location: argentina

PostPosted: Sat Nov 20, 2021 8:05 pm
Reply with quote

Joerg.Findeisen wrote:
Samples of useful things done w/ REXX can be found for ex at Mark Zelden Website. Link http://mzelden.com/mvsutil.html


this is fantastic, thanks.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 1523

PostPosted: Mon Nov 22, 2021 12:17 am
Reply with quote

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”? icon_biggrin.gif
Back to top
View user's profile Send private message
Joerg.Findeisen

Active Member


Joined: 15 Aug 2015
Posts: 807
Location: Bamberg, Germany

PostPosted: Mon Nov 22, 2021 11:50 am
Reply with quote

sergeyken wrote:
What is the difference between “a useful program”, and “a useless one”? icon_biggrin.gif

It's in the name "use less". icon_wink.gif
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2351
Location: Silicon Valley

PostPosted: Tue Nov 23, 2021 2:53 am
Reply with quote

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

Active Member


Joined: 30 Nov 2013
Posts: 918
Location: The Universe

PostPosted: Tue Dec 07, 2021 11:34 pm
Reply with quote

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

Active Member


Joined: 06 Jul 2010
Posts: 729
Location: Whitby, ON, Canada

PostPosted: Sat Dec 11, 2021 8:48 pm
Reply with quote

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

Active Member


Joined: 15 Aug 2015
Posts: 807
Location: Bamberg, Germany

PostPosted: Sun Dec 12, 2021 2:54 am
Reply with quote

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

Global Moderator


Joined: 01 Sep 2006
Posts: 2351
Location: Silicon Valley

PostPosted: Mon Dec 13, 2021 12:38 am
Reply with quote

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

Active Member


Joined: 06 Jul 2010
Posts: 729
Location: Whitby, ON, Canada

PostPosted: Thu Dec 30, 2021 5:00 am
Reply with quote

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

Active Member


Joined: 01 Sep 2015
Posts: 596
Location: Denmark

PostPosted: Thu Dec 30, 2021 4:56 pm
Reply with quote

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

New User


Joined: 06 Oct 2009
Posts: 36
Location: Melbourne, Australia

PostPosted: Tue Jan 11, 2022 9:08 am
Reply with quote

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

Active Member


Joined: 15 Aug 2015
Posts: 807
Location: Bamberg, Germany

PostPosted: Tue Jan 11, 2022 3:45 pm
Reply with quote

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

Global Moderator


Joined: 01 Sep 2006
Posts: 2351
Location: Silicon Valley

PostPosted: Tue Jan 11, 2022 11:03 pm
Reply with quote

Quote:
I am bound by ...


Don is bound by it, mainly through his strong ethics. Kudos to Don.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2351
Location: Silicon Valley

PostPosted: Wed Jan 12, 2022 4:45 am
Reply with quote

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

Active Member


Joined: 06 Jul 2010
Posts: 729
Location: Whitby, ON, Canada

PostPosted: Wed Jan 12, 2022 5:16 am
Reply with quote

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

Active Member


Joined: 06 Jul 2010
Posts: 729
Location: Whitby, ON, Canada

PostPosted: Wed Jan 12, 2022 5:26 am
Reply with quote

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

Active User


Joined: 06 Apr 2021
Posts: 101
Location: argentina

PostPosted: Fri May 27, 2022 10:45 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts ISPF END or EXIT in Rexx CLIST & REXX 13
No new posts Issues with executing a REXX MACRO th... TSO/ISPF 4
No new posts pass data as symbolic parameter from ... CLIST & REXX 2
No new posts CICSPLEX - REXX EYU#API1 CICS 3
No new posts Can you tell me what functionality yo... CLIST & REXX 28
Search our Forums:

Back to Top