Sunteți pe pagina 1din 2

REXX REXX

REXX
Com-plete supports only non-TSO REXX environments; it invokes IRXJCL internally in order to execute
a REXX script. Please refer to the IBM TSO/E REXX Reference documentation to learn more about the
difference between TSO and non-TSO REXX environments.

Activating REXX Support in Com-plete


z/OS
In order to enable REXX, simply add the following DD statements to the Com-plete startup JCL:
//SYSEXEC DD DISP=SHR,DSN=your.rexxexec.library
//SYSTSPRT DD DUMMY

Executing REXX scripts involves a large number of load modules, many of which are reentrant. It is
therefore highly recommended to allow automatic loading of reentrant modules into RESIDENTPAGE.

z/VSE
1. Add a LIBDEF PROC,SEARCH= lib.sublib statement to the Com-plete startup for the library
containing the REXX PROCs.

2. Add the following entries to the sysparms:


RESIDENTPAGE=ARXCMPTM
RESIDENTPAGE=ARXCONAD
RESIDENTPAGE=ARXEFVSE
RESIDENTPAGE=ARXEMSG
RESIDENTPAGE=ARXJCLAD
RESIDENTPAGE=ARXOUT
RESIDENTPAGE=ARXPARMS
RESIDENTPAGE=ARX00ENU
RESIDENTPAGE=ARX01ENU
RESIDENTPAGE=ARX02ENU
RESIDENTPAGE=ARX03ENU
RESIDENTPAGE=ARX04ENU
RESIDENTPAGE=ARX05ENU

3. Make sure UREXX is catalogued with at least 148K , PV and AF.

Using Dataset Allocation Functions (z/OS)


Since Com-plete does not support TSO REXX environments, TSO commands like ALLOCATE, FREE,
etc. will fail with a return code of (-3) when executed in REXX scripts under Com-plete. You can use
BPXWDYN for dynamic allocation functions; see the IBM documentation Using REXX and z/OS UNIX
System Services for details.

1
REXX Running REXX EXECs

Warning:
Extreme care must be taken when using dynamic dataset allocation
functions under Com-plete. You should always keep in mind that the
scope of DD names is the address space. This means, if two users
change the allocation of the same DD name simultaneously, then they
override each other’s allocation, causing unpredictable results. If you
change the allocation of a DD name used by Com-plete itself, you are
likely to cause a crash of Com-plete.
Software AG recommends that, whenever possible, you let
BPXWDYN chose a SYSnnnnn DD name for a dynamically allocated
dataset, having the DD name returned to the REXX script using the
RTDDN(gennedDD) parameter of BPXWDYN.

Example:
/* REXX *** */
Parse Arg dsn .
xrc = bpxwdyn("ALLOC DA("dsn") RTDDN("mydd") SHR")
If xrc <> 0 Then Do
Say "Allocation failed, RC=" || D2X(xrc,8)
Return xrc
End
Say "Here’s the contents of the file:"
"EXECIO * DISKR" mydd "(STEM in. FINIS)"
Do i = 1 To in.0
Say in.i
End
bpxwdyn("FREE FI("mydd")")
Exit

Running REXX EXECs


Com-plete provides a utility program UREXX that acts as an interface to REXX, handling input from and
output to the terminal. In order to run a REXX EXEC, simply type at the command prompt:

*UREXX execname args

Another way to use REXX in Com-plete is as a CGI scripting language with the HTTP server, as
described in section Using REXX in Programming CGI Requests in the Com-plete HTTP Server
documentation.

S-ar putea să vă placă și