Product Site

18.5. 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 is:

If you specify the outputfile, the language processor processes the inputfile and writes the executable version of the program to the outputfile. 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 to suppress the display of the information about the interpreter used, and the -e option to create the outputfile in base64-encoded format, suitable when a 7-bit encoding is required.

On Windows, the -s and -e options can alternatively be specified as /s and /e.

Note

You can use the in-storage capabilities of the RexxStart programming interface to process the file image of the output file.