Product SiteDocumentation Site

18.4. 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:

>>-RexxC--inputfile--+------------+--+----+--------------------><
                     +-outputfile-+  +-/s-+

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.

Note

You can use the in-storage capabilities of the RexxStart programming interface to process the file image of the output file.
With version 2.1, the tokenized form has changed. All Open Object Rexx editions contain a utility called RxMigrate that can be used to change old tokenized forms to the new one. The recommended procedure is to create a new tokenized file from the original source with the new version of Open Object Rexx. However, if the source code is no longer available, RxMigrate can be used to convert the old tokenized file. The syntax of the RxMigrate utility is:

>>-RxMigrate--inputfile--outputfile----------------------------><