Barry,

Hope this helps out!

Liz

---------------------------------------------------------------------------


PROBLEM OVERVIEW:

Traditionally, to print DTR graphic images, a supported graphics printer
must be connected to the printer port in the back of the terminal being
used. This causes several problems in that each terminal must have a
dedicated printer in order to print graphics, and a spooled print queue
cannot properly translate the graphics language used by Datatrieve into
an image.

The program below will display a Datatrieve plot file (in ReGIS code) to
a graphics terminal (VT125, VT240 or VT241).  Then it will read a
translation of the image from the terminal into a new disk file (in
SIXEL code).  The resulting file can then be printed to a queued,
spooled graphics printer (LA12, LA50, LA34-VA, or LA100).

The length of this article is approximately 320 lines.


ANALYSIS:

The primary cause for this inconvenience is that the graphics language
that DTR uses (ReGIS) is not interpreted by the print symbiont into an
image.  To provide print capabilities for DTR, a graphics printer must
be attached to the printer port of a graphics terminal.  The terminal
then translates the graphic language into a bit map that the printer can
interpret and use to produce a graphic output.

This program will capture that translation, and place it into a disk
file that can then be printed to a queued, spooled graphics print
device.


PROCEDURE:

1. Enter and compile the GET_PIC modules.  Design your DTR plot.
2. Create a hardcopy file of the DTR plot.  This is done with a command
   of the type: PLOT xxx ON FILE.DAT.
3. Invoke the GET_PIC.COM file from a graphics terminal (VT125, VT240,
   VT241) to create the translation.  It is recommended that the
   terminal characteristics include the following:
   SET TERMINAL/HOSTSYNC during execution.
4. Print the translated file on a queued graphics printer (LA12, LA50,
   LA34-VA, LA100).  It is recommended that the printer characteristics
   include the following: SET TERMINAL/HOSTSYNC/TTSYNC/PASTHRU/NOWRAP.
   Also, the hardware set-ups should be set to enable XON/XOFF signals.


PROGRAM NOTES:

The GET_PIC.COM file manages the output process.  It establishes
terminal characteristics, displays the ReGIS file on the screen, runs
the GET_PIC.FOR program, and resets the terminal at completion.  Do not
enter any spurious characters at the terminal while this procedure is
executing as they will become embedded in the translation file.  If you
are using a terminal server with a FORWARD SWITCH, the switch character
should be disabled to avoid trapping escape sequences as forward
requests.  Note that this program will properly translate simple bar
charts and line graphs, but may not be effective in reproducing complex
plots such as pie charts because of the way in which they are created on
the terminal.

The GET_PIC.FOR program retrieve a SIXEL translation of the graphic image
from the terminal and put it in a file that can then be printed on a
graphics printer.  During the translation, color information is lost from
the plot, and the resulting file will only be able to produce a
monochrome display.

There is a one-line difference between the VT125 version of the program,
and the VT240/VT241 version of the program that will allow for
differences in control sequence processing on each type of device.
This line in the program is bounded by 5 asterisks.  At this point, one
of the two lines shown must be removed so that the program can be used
for either VT125's or VT240/VT241's.  These items are not commented out,
so that if this modification is NOT made, there will be a compile-time
error.

CAUTION:  This sample program has been tested using VAX FORTRAN V4.1 on
VAX/VMS V4.1 with VAX DATATRIEVE V3.1.  However, we cannot guarantee its
effectiveness because of the possibility of error in transmitting or
implementing it. It is meant to be used as a template for writing your
own program, and it may require modification for use on your system.


