CUBE is a REXX procedure used to modify a CONFIG.SYS-like ASCII file (the Target File), based on a set of CUBE's commands (the Procedure File).

CUBE was initially developed to automatically create/update CONFIG.SYS or STARTUP.CMD files. It may be integrated in dynamic processes used to customize PS/2 configurations. Any other ASCII file (such as profiles, commands files, etc...) may also be customized with CUBE.

CUBE has its own set of commands (described below) that provide editing functions at the line and string levels. This set of commands includes ADD, REPLACE and DELETE functions.

Most of CUBE's commands require identification of the Target File line they act upon: the line will be identify by its leftmost characters (as many as necessary for a precise or generic identification) starting from column 1. This was inherited from the CONFIG.SYS type of file CUBE was created for. However, the option '*ID', wherever available, tells CUBE to identify the Target File line as any line containing the identification string, starting at any position. Furthermore, the command LINEID may specify that leading characters in Target File lines should be ignored (stripped) for identification.

Commands in a Procedure File may be further customized at CUBE's execution time: strings may contain 'variables' names that will be replaced by their current value at execution time. This is known as 'substitution' and comes in two flavors: command line substitution and environment variable substitution.

Command line substitution: values of variables are passed in the command line. Environment variable substitution: values of variables are those of currently defined OS/2 environment variables at CUBE's execution time. Substitution in CUBE's commands always occurs, while substitution in a Target File line only occurs if this line is processed by a CUBE's command.

Variable names are always identified by delimiters: any single character you wish, unique for a given variable name, to avoid conflict with other characters in a string or system interpretation. Variable names ARE case sensitive.

Other CUBEs and resources

Greg Jarvis maintains an alternate CUBE, which is a forebear to the one here. His CUBE family page is ‚Äčhere.

Last modified 3 weeks ago Last modified on Aug 27, 2020, 2:52:21 AM