Migrating Suprtool Tasks from MPE to HP-UX

Suprtool
By Neil Armstrong

Recently I was asked why Suprtool for HP-UX doesn't work or even exist, when our web site had references to the product all over.

I was incredulous, but apparently someone had been saying that Suprtool for HP-UX did not exist!!!!

Well nothing could be further from the truth, since we ported Suprtool to HP-UX over 10 years ago. And what is even more important is that we have some great new enhancements and options available.

One of the frequent questions recently is "what are the differences between MPE and HP-UX?" It is evident that many customers recognize the investment that they have in their Suprtool code and want to know the types of changes they need to make in order for it to work on HP-UX.

Differences Between MPE and HP-UX

We have tried to make the MPE and HP-UX versions of Suprtool as compatible as possible. This section describes how Suprtool/UX is different from Suprtool/MPE.

Databases

Suprtool for HP-UX currently works with three databases; these are Eloquence, Oracle and Allbase.

Currently, by default you can use the standard Image commands against Eloquence. The "standard Image" commands in Suprtool are: Base, Get, Delete, Put, Update and any of the Dbedit commands.

We have the option to use these same commands against Oracle databases using Suprtool with the IMAXSoft option. This means that you can port your scripts directly over from MPE to HP-UX with very few changes. Of course you must acquire the OpenTurbo product from IMAXSoft (but their call conversion libraries are also handy for converting an IMAGE database and associated programs to Oracle quite painlessly). Here is the web link:

http://www.imaxsoft.com/

We are also working with another vendor to utilize their libraries, which will give us another option for migration. The goal here is to open even more database options for Suprtool/UX, such as DB2 support.

If you have your own call conversion library, please email me and we would be glad to look at supporting it in Suprtool/UX:

And, we are working on a generic option that should work for anyone who has their your own libraries that convert Image calls to Oracle (or any other database); providing instant Suprtool support instead of having to contact Robelle and wait a month for a new R&D pre-release.

All of these options are slated for the production version of Suprtool 4.8 and are available starting with the pre-release version 4.7.12, due by the end of February, 2004.

If you do not want to use the IMAXSoft option or another call conversoion library, you can still access Oracle using Suprtool's Open and Select commands. These commands correspond to the Base and Get commands, so the script conversion from MPE to HP-UX can be mostly mechanical.

If you had a script on MPE that reads a whole database:

base mydb
get orders
out orders,link
xeq
This would be:
open oracle username password
select * from orders
out orders,link
xeq

Record Length

On MPE, Suprtool can obtain the record length of a file. On HP-UX, there is no concept of an official record length, because a file consists of a string of bytes. In Suprtool/UX there are two ways to determine the record length, if a data file actually consists of a regular repeated pattern of "record length" data bytes:
  1. Specify the record length with the Rec parameter of the Input command.
  2. Use self-describing files.
If the specified record size is incorrect, Suprtool/UX cannot detect the mismatch. The most common symptom of an incorrect specification in size is an offset of one or more characters in each field.

Line Feeds

In MPE, there is no separator between records in a file. In HP-UX, there may not be a separator, or there may be a line feed between each record. For Suprtool to correctly read a data file, it must know whether the line feeds are present. You can specify whether or not a file has line feeds via the LF or NOLF options in the Input command.

Suprtool and STExport allow control over whether or not line feeds will be written to the output file or not. For details please see the Output Commands for both Suprtool and STExport.

Duplicate Output Files

If the output file already exists (and you haven't requested the Erase or Append option), Suprtool has to decide what to do. This is how Suprtool/UX handles duplicate output files:
  1. In Suprtool/UX, the duplicate output file processing takes place at the beginning of a task (in Suprtool/MPE it occurs at the end).
  2. If Suprtool/UX is in batch, it purges any existing file with the same file name (Suprtool/MPE chooses a new output file name of the form OutputNN). If the Suprtool/UX task is on-line, it prompts the user to purge the file.
  3. When Suprtool/UX purges a data file, it always deletes any associated .sd file, even if the output option is not Query or Link.

Missing Features

The following Suprtool features on MPE are currently not available in Suprtool/UX:
  • Extracting a range of fields from an SQL database
  • Link command (Suprlink exists as a separate program)
  • Export command (STExport exists as a separate program)
  • Table Command with the File option only works for SD files
  • Hints are not available
  • Out= option of the Listredo command
  • Output Ask, Num,Key, and Num,Query
  • Output Temp (There are no temporary files in HP-UX)

Update on Features

This year we managed to add Output=Input and Totals to a file to Suprtool version 4.9 and we are working on the list above more this year as well.

Neil Armstrong, Suprtool Architect, November 2005