Distributing Programs without Source

Open Object Rexx comes with a utility called rexxc. You can use this utility to produce versions of your programs that do not include the original program source. You can use these programs to replace any Rexx program file that includes the source, with the following restrictions:

  1. The SOURCELINE built-in function returns 0 for the number of lines in the program and raises an error for all attempts to retrieve a line.
  2. A sourceless program may not be traced. The TRACE instruction runs without error, but no tracing of instruction lines, expression results, or intermediate expression values occurs.

The syntax of the rexxc utility on Unix systems is:


The syntax of the rexxc utility on Windows systems is:


If you specify the outputfile, the language processor processes the inputfile and writes the executable version of the program to the outputfile (a binary file). If the outputfile already exists, it is replaced.

If the language processor detects a syntax error while processing the program, it reports the error and stops processing without creating a new output file. If you omit the outputfile, the language processor performs a syntax check on the program without writing the executable version to a file.

You can use the s option (-s or /s) to suppress the display of the information about the interpreter used.

You can use the e option (-e or /e) to base64 encode the resulting binary file which makes it possible to deploy it in environments where usually character transformations take place on scripts before Rexx gets them for execution.

Note

Binary files produced by rexxc can be run only on an interpreter of the same bitness and the same (or higher) language level as that of the rexxc that created them.