Pages

Saturday, June 14, 2014

REXX Basics

What is REXX?

•REstructered eXtended eXecutor language
•Developed by M.F.Cowlishaw of IBM U.K.
•Introduced in 1983
•Highly versatile programming language
•Can  be intermixed with commands to different host environments

Setting up to Execute REXX Programs on TSO/ISPF

This is what you can do so that you will be able to execute your REXX program on MVS TSO/ISPF.

There are several ways that this can be done. 

1. The simpliest of them all, dumb way. 

If you do it this way, you can’t create and use REXX external subroutines. 
Briefly: no setup is done. 
You just put your REXX program in a PDS member or even in a sequential file. 
Then execute it this way from the command line of any ISPF panel: 

TSO EXEC 'the-name-of-the-PDS(member-name)' EXEC

2. The "Ideal way" from the point of view of the person executing the program. 
not so ideal for the technical support personnel.

Your REXX program is a member in a PDS that everyone has read access to. 
This PDS name is specified in the TSO Logon Procedure that is executed everytime you and everyone logs on. 
This is a part of it.

//TSOSTEP EXEC PGM=IKJEFT01
//SYSTSPRT DD TERM=TS 
//SYSEXEC DD DSN=the-name-of-the-pds,DISP=SHR
// DD DSN=name-of-another-pds,DISP=SHR


3. You wait till you get into ISPF. Then you type in the following in option 6, or on the ISPF panel command line, preceded by the word TSO:


ALTLIB DEACTIVATE APPL(EXEC) 
ALTLIB ACTIVATE APPL(EXEC) DA('name-of-your-REXX-PDS')

You have to do this on both halves of a split screen and every time you log on. 
A suggested way of doing this is to put the above command in a CLIST or REXX program, then execute the program. 
This example shows a CLIST.

ALTLIB DEACTIVATE APPL(EXEC) 
ALTLIB ACTIVATE APPL(EXEC) DA('name-of-your-REXX-PDS') 
This example shows a REXX program.

/* REXX */ 
"ALTLIB DEACTIVATE APPL(EXEC)" 
"ALTLIB ACTIVATE APPL(EXEC) DA('name-of-your-REXX-PDS')"

No comments:

Post a Comment