[USflag] The American Programmer [USflag]

Books on Mainframe Programming
Mainframe Manuals and Tutorials
System Abend codes, Sqlcodes, VSAM/QSAM codes
Everything about the IBM AS/400 Midrange Computer - iSeries
Everything about CICS
Everything about COBOL
Everything about DB2 and SQL
Everything about IMS
Everything about Java and JavaScript
Everything about JCL and JES
Everything about REXX
  Sorting in REXX: The Bubble Sort
  REXX Password Generator
  Using REXX to capture displayed output of TSO command
  Count records in REXX
  REXX program to calculate present value of money
  REXX function to format a number in currency format
  REXX function to produce a fixed-length number
  REXX program to produce lottery numbers
  REXX: what does your phone number spell?
  REXX Practice Problems.
  Just Enough REXX Tutorial
  Setting up to Execute REXX Programs on TSO/ISPF
  How to execute a REXX program
  REXX Boolean operators
  Comparison of CLIST language and REXX
  REXX Comparison operators
  REXX Debugging: the TRACE verb
  Reserved REXX Variables
  Executing REXX through JCL.
  Writing ISPF Edit Macros in REXX
  REXX program to unload a PDS
  REXX book: The REXX Language on TSO
  REXX Functions Book
  QMF Procedures Written in REXX
  Using REXX Subroutines with the QMF Calc panel
  REXX error codes (RC)
  REXX programming language manuals
  Books on REXX programming
  The REXX Files
Everything about zOS, VSAM, Tivoli, Assembler
Everything about TSO, ISPF, Spufi
Site Map and Site Search

           Home   > REXX   > Setting up REXX

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. Your technical support personnel will be able to tell you which way is best for you at your company, or suggest another way.

1. The simple, 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.

//SYSEXEC DD DSN=the-name-of-the-pds,DISP=SHR Could be SYSPROC
// 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:


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.


This example shows a REXX program.

/* REXX */


4. You (and everyone else) has a "setup" program written in REXX or CLIST.
This program is executed automatically every time you log on.
It allocates and/or concatenates your PDS to the DDNAME SYSEXEC or SYSPROC.
This can be a real pain if it isn’t done right, but it’s generally worth the time and trouble to do it.
It finds out the names of PDS’s currently allocated to the DDNAME SYSEXEC or SYSPROC and adds the REXX PDS to the list.
The REXX PDS can be a private one belonging to the user currently logged on, in which case it will have to conform to naming standards.
Download catnate.txt from "here"
This is not a simple program. It is not advisable to mess with it unless you have a very good, in depth understanding of REXX and TSO/ISPF. If you don't know what you're doing, don't use it.

5. Setting up a PF key.
Please turn off ISPF Keyslists before setting up this PF key.
Step 1: Create a SETUP member in edit
First specify your preferences, Then type in the program.
EDIT userid.REXX.EXEC(SETUP) - 01.00
Cmd ===> rec on;number off;caps on;nulls on all;hilite rexx CSR
****** ***************************** Top of Data ******************************
==MSG> -Warning- The UNDO command is not available until you change
==MSG> your edit profile using the command RECOVERY ON.
'''''' /* REXX SETUP */
'''''' TRACE C
****** **************************** Bottom of Data ****************************

type in this short REXX program:
Type SAVE on the command line, then PF3.

Set up a PF key to run your SETUP program.
Type KEYS on any panel.
Press ENTER until PF13 appears first on the screen

PF Key Definitions and Labels - Alternate Keys
Command ===>

Note: Definitions and labels below apply only to terminals with 24 PF keys.

PF14 . .
PF15 . .
PF16 . .
PF17 . .

PF13 label . . PF14 label . . PF15 label . .
PF16 label . . PF17 label . . PF18 label . .
PF19 label . . PF20 label . . PF21 label . .

PF22 label . . PF23 label . . PF24 label . .

Press ENTER key to display primary keys. Enter END command to exit.

Press PF3 to save
Press PF13 to see if it works
Needs to be done only once during a logon session
If you log off, or split the screen, you have to do it again

Now press PF13 (shift + F1 on most terminal emulators)
You can now use REXX programs.
You have to press PF13 again any time you split the screen or leave and come back into ISPF.

[Books Computer]

Home Books for Computer Professionals Privacy Terms |
Site Map and Site Search Programming Manuals and Tutorials The REXX Files Top of Page |