![[About]](e:\os2httpd_1.3.2\htdocs\rexxtipsntricks\about.gif)
![[Toc]](e:\os2httpd_1.3.2\htdocs\rexxtipsntricks\toc.gif)
0.9b (c) 1995 Peter Childs
I don't know of a real REXX compiler for OS/2 REXX. But because the REXX interpreter stores an tokenized copy of each REXX program in the EAs of the program, it is possible to delete the source code from REXX programs (see REXXCC). Another method to "compile" a REXX program is used by the program RxCLS ($). But this is also no real compiler.
To "compile" an Object-Oriented REXX program you can use the program REXXC.EXE which is part of Object-Oriented REXX. REXXC.EXE creates the token image and saves it in a REXX cmd. This method avoids the 64 K limit for the token image. (see also the Creating "compiled" programs for Classic REXX and Object REXX)
Another method to create a token image of your REXX program is to load the REXX program into the macro space and save the macro space into a file. This will produce a token image of your REXX program that you can reload into the macrospace and execute it from there. This method also avoids the 64 K limit of the EAs. (see REXXCC - a REXX "compiler") In this case you need an additional loader to load the token image into the macro space again before you can execute it.
Or use LoadMac.cmd to create and laod the token image:
REM *** Create the token image LOADMAC CLEAR ADD:myProg.CMD SAVE:myProg.IMG REM *** Load the image into the REXX macro space LOADMAC CLEAR LOAD:MyProg.IMG REM *** Execute the image REXXTRY call myprog myparms REM *** Drop the image from the REXX macro space LOADMAC DROP:MyProg REM *** or (if the image contains more than one macro) LOADMAC CLEAR
Inf-HTML End Run - Successful