CLE/P - Command Line Executor/Processor

We developed CLE/P because we didn't find an existing library meeting our requirements for a consistent command line over all platforms. We decided therefore to build such a compiler which is table-controlled and which transforms property files and command line inputs into a machine-processable data structure of arbitrary nesting depth.

The result is a very powerful tool briefly described in the following. The full interface documentation, programming reference, the GIT-repository, and the license can be downloaded from repositories.

We are posting CLP/E as OpenSource on the terms of a Zlib-based license, making it freely available to everyone in the form of a GIT project.



With the command line executor (CLE), you can simply realize a complex command line through the definition of some tables. No programming is required to get the values parsed and stored in a free defined data structure.

For this, a compiler with its own language was implemented to provide the same command line interface on each available platform. This command line parser (CLP) is used by the CLE. Both components provide extensive help for each command and many other support functions.

For a provided list of commands, the CLE uses a dedicated command line processor (CLP) to make all these commands available, together with several built-in functions.

To achieve this, a table must be defined where each row describes one command. This table provides the input for the execution function doing the command line interpretation. The whole library consists of only one function and a structure to define the command table.

Beside the specified user defined commands, the CLE provides several powerful built-in functions listed below. All built-in functions contain a manual page to get more information at runtime.

Based on the keyword, the short help message and the detailed description, the built-in function GENDOCU can be used to generate a complete user manual. Based on this capability, the CLE completely describes itself.

The self explanation of the whole program was one of the main targets of this general command line interface. To understand this interface specification it is adviseable to read the CLP documentation.


Below you can find a (possibly incomplete) list of the CLE features.

  • Support of an unlimited amount of commands
  • Support of hidden commands (not documented)
  • Includes a lot of useful built-in functions
  • Simple owner management to differentiate configurations
  • The logical program name can be defined freely
  • Case sensitive or insensitive command line interpretation
  • Output file can be defined (stdout, stderr, or a real file)
  • Complete trace file management for CLP and commands
  • The look and feel can be defined freely
  • Syntax, help and manpage support for program, commands and arguments
  • Extensive documentation generation in AsciiDoc format for the user manual
  • Powerful property file management (generation, activation, ...)
  • Simple configuration data management (own environment variables)
  • Automatic key word shortening for arguments
  • Support of a lot of data types like
    • Number (decimal, hexadecimal, octal, binary and time)
    • Float (decimal in all variants)
    • String (binary text/ASCII/EBCDIC/HEX or zero terminated)
    • Object (Structure)
    • Overlay (Union)
    • Array (List (realized as simplified notation))
  • Support of constant definitions used as selection of values over keywords
  • Internal calculated values are available as link (amount of values in an array, length of a string, object identifier in overlays, ...)
  • The main table for a command can be defined as object or overlay
  • Keyword, help message and detailed description can be defined freely for the program, each command, argument or constant definition
  • Aliases for each argument can be defined and are handled as options for the same value.
  • Available and usable on each platform including WIN, UNIX, MAC, ZOS, VSE, ...


Built-in Functions

All these built-in functions are available of one's own accord

  • SYNTAX - Provides the syntax for each command
  • HELP - Provides quick help for arguments
  • MANPAGE - Provides manual pages (detailed help)
  • GENDOCU - Generates auxiliary documentation
  • GENPROP - Generates a property file
  • SETPROP - Activate a property file
  • DELPROP - Remove a property file from configuration
  • GETPROP - Show current properties
  • SETOWNER - Defines the current owner
  • GETOWNER - Show current owner setting
  • SETENV - Defines environment variables over the config file
  • GETENV - Show the environment variables set over the config file
  • DELENV - Delete environment variables in the config file
  • TRACE - Manage trace capabilities
  • CONFIG - Shows the current configuration settings
  • GRAMMAR - Shows the grammar for commands and properties
  • LEXEM - Shows the regular expressions accepted in a command
  • LICENSE - List license information for the program
  • VERSION - List version information for the program
  • ABOUT - Show information about the program