Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Want to learn REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
Author Message
saara

New User


Joined: 12 Jul 2005
Posts: 5

PostPosted: Tue Jul 12, 2005 11:43 pm    Post subject: Want to learn REXX
Reply with quote

I am new to REXX..new to mainframes too...I am interested in learning REXX and to develop some tool using REXX. I know there is a manual out there but I would like to learn it practically. Could someone let me know where to start and how to start. I need to know where exactly to write the code and how to start executing it. Some commands to help me walk around screens as well as guidance and advise on some books would be highly appreciated
Back to top
View user's profile Send private message
References
PostPosted: Tue Jul 12, 2005 11:43 pm    Post subject: Re: Want to learn REXX Reply with quote

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 2999
Location: Charlotte,NC USA

PostPosted: Wed Jul 13, 2005 6:58 am    Post subject: Re: Want to learn REXX
Reply with quote

saara wrote:
Could someone let me know where to start and how to start.

The best way is to look at the other existing REXX exec's at your site and pick them apart to see how they work. Take a look at the REXX exec's posted here.

Otherwise, I'd start by writing a simple file copy exec (copy all input records to output). Then, modify the records a bit. Add some parameter input to change the output further. Write the output in reverse order. Setup some looping structures. Create a formatted report.

Delve into using REXX in other environments (TSO, ISPF, Netview, Automation, etc.).
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 2999
Location: Charlotte,NC USA

PostPosted: Wed Jul 13, 2005 7:07 am    Post subject: Re: Want to learn REXX
Reply with quote

An easy way to run a REXX exec:
Code:

//STEP1    EXEC PGM=IEBGENER
//SYSUT1   DD *,DLM=@@
/* REXX */
Say "Hello, world"
Exit 0
@@
//SYSUT2   DD DSN=&&PDS(PROG1),DISP=(,PASS),UNIT=VIO,
//         SPACE=(CYL,(1,1,1),RLSE)
//SYSPRINT DD SYSOUT=*
//SYSIN    DD DUMMY
//*
//STEP2    EXEC PGM=IRXJCL,PARM='PROG1'
//SYSEXEC  DD DSN=&&PDS,DISP=(OLD,PASS)
//SYSTSPRT DD SYSOUT=*
//SYSTSIN  DD DUMMY
//*
Back to top
View user's profile Send private message
saara

New User


Joined: 12 Jul 2005
Posts: 5

PostPosted: Wed Jul 13, 2005 9:35 pm    Post subject: Re: Want to learn REXX
Reply with quote

Thanks for the sample code. Could you please tell me what will this do. Also please let me know how to execute this..should i just submit or is there any other way to execute it...
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 2999
Location: Charlotte,NC USA

PostPosted: Wed Jul 13, 2005 11:54 pm    Post subject: Re: Want to learn REXX
Reply with quote

The sample job you would just submit.

It will display the text "Hello, world" on the terminal (the SYSTSPRT DD is used for the terminal output).
Back to top
View user's profile Send private message
Edgar Ye

New User


Joined: 11 Apr 2005
Posts: 1

PostPosted: Wed Jul 27, 2005 8:54 am    Post subject:
Reply with quote

Sara ? I think i should know you . I am interested in REXX and new to REXX too ,
I have some references about it , pls feel free to contact me .
Back to top
View user's profile Send private message
vijayamadhuri

Active User


Joined: 06 Apr 2005
Posts: 188

PostPosted: Wed Jul 27, 2005 9:27 am    Post subject: Re: Want to learn REXX
Reply with quote

I have some material may be it could help
Back to top
View user's profile Send private message
saara

New User


Joined: 12 Jul 2005
Posts: 5

PostPosted: Wed Jul 27, 2005 8:14 pm    Post subject: Re: Want to learn REXX
Reply with quote

VM,
Thanks a bunch for ur user guide. I have started with my rexx learning and have started a bit of writing code as well. I am interested in developing some tool using REXX. I also need to know how to add my PDS in SYSEXEC so that I can come up with a tool and just say a command to execute it instead of going to the member to execute it.

Edgar,
Nice to know you too are starting to learn. Do send me any reference material that you have for begining with REXX.
Back to top
View user's profile Send private message
krishna vijay

New User


Joined: 29 Aug 2005
Posts: 2

PostPosted: Mon Aug 29, 2005 2:31 pm    Post subject: Re: Want to learn REXX
Reply with quote

vijayamadhuri wrote:
I have some material may be it could help



hi,
i am new to rexx as well as mainframes. can u send me the references or whatever u have.......?

thank u

kris
Back to top
View user's profile Send private message
fonrob

New User


Joined: 30 Jul 2003
Posts: 3

PostPosted: Sat Oct 01, 2005 2:35 am    Post subject:
Reply with quote

the sample job does not get executed becase it does not have a job card

you need something like this depending on your shop


//Z90FHR1 JOB (V4Z900000P,Z90,2),'TEST JOB FOR ME',MSGCLASS=Y,
// TIME=1,NOTIFY=Z90FHR1
Back to top
View user's profile Send private message
surya1

New User


Joined: 21 Sep 2005
Posts: 1

PostPosted: Sat Oct 01, 2005 11:50 pm    Post subject:
Reply with quote

i have already included the job card.. still this doesnt work..
Back to top
View user's profile Send private message
Kevin

Active User


Joined: 25 Aug 2005
Posts: 256

PostPosted: Wed Oct 05, 2005 3:39 pm    Post subject: Re: Want to learn REXX
Reply with quote

This is a quote from another Forum that is quite nice:

Quote:

This is a common problem for new users; they don't understand the difference between Rexx and ISPF or TSO and ISPF. You absolutely need to understand those differences before you can use the services of ISPF within a Rexx exec or any other kind of program.

In a nutshell:

* Rexx is a scripting language available on many, many platforms. One of the places it can run is z/OS (MVS). Within z/OS it can run in many environments such as batch, CICS, USS and TSO. If you want to use TSO services, you must be running under TSO (not IRXJCL).

* TSO is the underlying foundation to the user 3270 and command interfaces for MVS. When you sign on to a terminal with your TSO id, you are using TSO. Similarly, when you run IKJEFT01 (or IKJEFT1A, etc) in batch you are also running TSO. Rexx can run outside of TSO but if you want to use TSO commands like ALLOC, FREE, DELETE, etc. you need to be running in a TSO address space and invoke the Rexx exec from TSO.

* ISPF is an add-on that runs under TSO. It has its own set of services for doing things like editing files, displaying panels and the like. It requires TSO but has its own programmable services accessed in Rexx via Address ISPEXEC. ISPF services can also be accessed through most other programming languages (COBOL, Assembler, C, APL, etc) but ISPF, and hence TSO must be there too.

It is very common to see questions phrased as "I am new to Rexx... how do I do "? They are not the same thing (though you can usually use Rexx to tell ISPF to do . It may seem like a picky detail, but if you want to find out where to look for answers, you need to know what component does what you are looking for.

One other misconception about ISPF is that it is driven only by CLISTs or Rexx. I often see people say 'look for the CLIST that drives option X" and that is often good advice, but very rarely is IBM or other vendor code written in Rexx. Usually it is a compiled program in COBOL or Assembler so looking for source is not helpful.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 2999
Location: Charlotte,NC USA

PostPosted: Sun Oct 09, 2005 8:13 am    Post subject: Re: Want to learn REXX
Reply with quote

Just found this link to a REXX Tutorial:

http://www.kilowattsoftware.com/tutorial/rexx/#Introduction
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1