Browse Prior Art Database

NSL-Enabled Message Variable Substitution

IP.com Disclosure Number: IPCOM000111053D
Original Publication Date: 1994-Feb-01
Included in the Prior Art Database: 2005-Mar-26
Document File: 4 page(s) / 106K

Publishing Venue

IBM

Related People

Steitz, JE: AUTHOR [+2]

Abstract

Error, warning, and informational messages require that dynamically-generated data be included within the message that is finally presented to the user. Most of these messages are in the form of sentences, and the dynamic data may appear anywhere with in the message.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

NSL-Enabled Message Variable Substitution

      Error, warning, and informational messages require that
dynamically-generated data be included within the message that is
finally presented to the user.  Most of these messages are in the
form of sentences, and the dynamic data may appear anywhere with in
the message.

      As human interpreters know, sentence struture varies
significantly between languages, and when a given message is
translated from one natural language into another, the original order
of inclusion of the dynamic pieces of data may change.  It is not
feasible to modify the program that supplies the dynamic data each
time the message repository is translated to a language requiring a
different inclusion order.  The technique presented here allows
substitution of the dynamic data, but involves no modification to
message-issuing programs, nor does it use a non-portable message
precessing program.

      The essence of the method lies in the use of a specialized set
of arrays, the most important of which is the "transfer array."  By
the use of the "transfer array," the following advantages can be
achieved:

o   Previous methods require that substitution values be converted to
    output format before submission to the message formatter, this
    method allows all forms of data acceptable to the output
    function.

o   Some previous methods require multiple passes over the argument
    list, this method requires only one.

o   This method allows for doing the message analysis in a
    preprocessor and storing the results as an integral part of the
    "compliled" message.

o   This method ensures that the message file can be translated at
    any time to any language with no requirement to make any changes
    to any code that either issues or formats messages.

o   A convenient way of representing messages in a repository is in a
    form directly usable by the built-in text formatting and output
    routines supplied by the programming language in which the
    programs are written.  The method presented here uses the C
    library printf() format string and allows all of the
    ANSI-Standard conversion operators to be used, thus making it
    very portable to many hardware/software/operating system
    platforms.

o   Although this method is based on C, the technique is applicable
    to other languages as well.

The Message Repository

The messages in the message repository are in the form of a C
printf() control string enclosed in quotes.  The data type of the
corresponding argument is encoded in the conversion specification and
that data type must be one of the basic C v...