EQ Eloquence B.07.10 Release Notes
Overview / Eloquence QUERY3K

Eloquence QUERY3K

The Eloquence QUERY3K utility is intended as a replacement for the MPE QUERY/iX utility. QUERY3K is designed to be closely compatible and to require only minimal changes to existing QUERY scripts. However, as QUERY3K does not run on top of MPE some minor changes may be required to adapt your existing QUERY scripts to the system environment.

This version differs substantially from the B.07.00 QUERY3K version that is available on HP-UX. The original source code is now fully converted to C and was enhanced/fixed to be portable across different platforms. Also some minor bugs were fixed.

Please refer to the section titled "Known problems/limitations" below for any known issues and platform-specific notes.

Please send any feedback or problem reports to the Eloquence support at support@marxmeier.com.

This document describes the differences from the original QUERY version.

The documentation for QUERY/iX is available from the HP web site at the location below:


Running QUERY3K

The Eloquence QUERY3K executable is called query3k and located in the bin subdirectory of your Eloquence installation. The Eloquence installation should have added this directory to your PATH.

With QUERY3K as with the original QUERY commmands are passed through stdin, either interactively or by redirecting stdin from a file. As with QUERY input files must in ASCII format and may have line numbers. Any information past column 72 is ignored.

On MPE QUERY may be used interactively or with a script file as below:


The QUERY3K equivalent is one of the options below:

In any case the input is read from the specified file.

For interactive usage simply run the query3k executable:

 $ query3k
 B.07.10 Eloquence QUERY3K  WED, MAR 16, 2005,  5:23 PM
 Copyright 2004-2005 Marxmeier Software AG
 Copyright 2004 Hewlett-Packard Development Company, L.P.


Redirecting the output

The QUERY3K output may be redirected by using the QSLIST or LP environment variables. If both are specified the QSLIST environment variable takes precedence.

The QSLIST environment variable by default specifies the name of an output file. The LP environment variable by default specifies a process to send the output to (such as the spooler). If neither is defined, any O=LP output is sent to the default printer queue (equivalent to LP=lp or LP=qlp on Windows).

This is a rough equivalent to file equations on MPE. Any of the environment variables may be set as below:

This causes the output (in case of O=LP) to be redirected to the file outfile. In case the file exists it is replaced.

This causes the output (in case of O=LP) to be appended to the file outfile. In case the file does not exist it is created.

This causes the output (in case of O=LP) to be sent to the specified command (using a pipe). On the Windows platform the qlp command may be used as a replacement for lp.

A typical definition for the LP environment variable on HP-UX or Linux would be something like below:

 LP="lp -onb -s -dprinter 2>/dev/null"
On the Windows platform the equivalent is:
 LP="qlp -s -dprinter"
This sends the output to the printer queue "printer", suppresses the printing of banner pages, does not output the print job id on the screen and discards any spooler error messages.

Please note that environment variables need to be set before executing query3k (possibly marked as "exported" by the command shell) and cannot be defined in the QUERY script.

Using file equations (file name aliases)

Aliases to file and database names in QUERY3K may be established in two ways:

  1. An environment variable may be specified that defines the file name.

    For example:

     $ export REPORT=report.q
     $ query3k
    This accesses the file "report.q"

     $ export DB=sample
     $ query3k
     > b=DB
     PASSWORD = >>
     MODE = >>5
    This accesses the database "sample"

  2. The QUERY3K :FILE command may be used to specify an alias for a file or database name.

    For example:

     $ query3k
     > :FILE REPORT=report.q
    This accesses the file "report.q"

     $ query3k
     > :FILE DB=sample
     > b=DB
     PASSWORD = >>
     MODE = >>5
    This accesses the database "sample"

For additional information on the :FILE command please refer to the section on file equations below.

File equations in QUERY3K (:FILE, :LISTEQ, :RESET commands)

QUERY3K performs a partial evaluation of the :FILE command and supports a limited equivalant of the MPE "file equation". This might be used to specify the QUERY3K output (QSLIST) or file access from QUERY3K (eg. through XEQ). The :RESET and :LISTEQ commands are also supported in addition to :FILE.

The following syntax is recognized:

 :FILE <designator>=<file reference>[;DEV={DISC|LP}]
Where <designator> specifies a logical file name and <file reference> specifies the path/name of a file (with an optional open mode). It may also specify an operating system command that any output is sent to. Additional parameters may be present and are ignored.

Unless specified with a DEV=LP clause, any file equation will default to specify a file (DEV=DISC is implied).

The following examples specify different targets for the QSLIST file that is used by QUERY3K to specify the printer output.

 :FILE QSLIST=report.txt
Send the output to the file report.txt

Same as above

 :FILE QSLIST=">>report.txt"
Append the output to the file report.txt

 :FILE QSLIST="|pr -2 -h 'QUERY3K output'|lp -s 2>/dev/null"
Send the output to the specified command. This example causes output to be formatted in two columns and then printed.

Send the output to the printer (as specified with the LP environment variable).

A similar result may be achieved by specifying environment variables _before_ starting QUERY3K.

For example:

 export QSLIST=">> report.txt"
 export QSLIST="|pr -2 -h "QUERY3K output"|lp -s 2>/dev/null"
 export LP="|lp -onb -s 2>/dev/null"
Note that any environment variables must be set (and possibly exported by the shell) before starting QUERY3K. It is not possible to define an environment variable from QUERY3K.

Example QUERY script

Original script:


Equivalent QUERY3K script using the POSIX rm instead of the MPE PURGE command (note: the initial rm is not strictly necessary as QUERY3K by default overwrites existing files):

:rm -f SNPEDCR

$ query3k < SNPEDC

Please note that EDCOPEN.QEDDB is a file in the local directory. Specifying a group in the file name has no special meaning.

Converted to a shell script:

# execute with the POSIX shell
QSLIST=SNPEDCR query3k <<!!

Known problems/limitations

The following problems/limitations are currently known:

History of Changes

The following changes were incorporated in the B.07.10 QUERY3K release:

The following changes were incorporated in QUERY3K-B0710-B4:

The following changes were incorporated in QUERY3K-B0710-B3:

The following changes were incorporated in QUERY3K-B0710-B2:

The following changes were incorporated in QUERY3K-B0710-B1:

© 2005,2006 Marxmeier Software AG - 2006-01-12