CLE/P - Command Line Executor/Processor

Den CLE/P haben wir entwickelt, weil wir keine fertige Bibliothek gefunden haben, welche unseren Anforderungen an eine einheitliche Kommandozeile über alle Plattformen hinweg gerecht wird. Daher haben wir uns dazu entschlossen, einen entsprechenden Compiler zu schreiben, dessen Semantik über Tabellen gesteuert wird und der Propertyfile- und Kommandozeileneingaben in eine computerverarbeitbare, beliebig tief geschachtelte Datenstruktur überführt.

Das Resultat ist ein sehr mächtiges Werkzeug, welches im folgenden Kurz beschrieben ist. Die gesamte Schnittstellendokumentation, Programming Reference, das GIT-Repository und die Lizenz kann man unter Repositories herunterladen.

Den CLP/E stellen wir als OpenSource auf Basis einer Zlib basierten Lizenz jedem frei in Form eines GIT-Projektes zur Verfügung.

 

Description

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.

Feature

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) or 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