A REXX program is a text file, typically created using a text editor or word processor, that contains a list of instructions for your computer. REXX programs on OS/2 are interpreted, which means the program is processed line by line (like a batch file). Consequently, you don't need to compile and link REXX programs. To run a REXX program, all you need is OS/2 and the ASCII text file containing the program.
If you are familiar with programming languages such as C, Pascal, or Basic, you will find that REXX is similar. An important difference is that REXX variables have no data type and are not declared. Instead, REXX determines from context whether the variable is a string, for instance, or a number. Moreover, a variable that was treated as a number in one instruction can be treated as a string in the next.
REXX's flexibility in variable handling makes it easy for you to write programs quickly. Much of the boiler-plate instructions found in other languages is not needed. REXX keeps track of variables for you. It allocates and deallocates memory as necessary.
Another important difference is that you can execute OS/2 commands and other applications from a REXX program. This is similar to what you can do with an OS/2 Batch facility program. REXX, however, provides a more robust interface. Not only can you execute the command, you can also receive a return code from the command and use any displayed output in your REXX program. (The output normally displayed by a DIR command, for example, can be intercepted by a REXX program and used in subsequent processing.)
In addition, REXX can direct commands to environments other than the OS/2 operating system. Some applications provide an environment to which REXX can direct subcommands of the application. Some applications also provide functions that can be called from a REXX program. In these situations, REXX acts as a macro language for the application. The OS/2 Enhanced Editor is an example of an application that supports the use of REXX as a macro language.