Get the most out of your Robelle Tools
Suprtool Learns About AMXW
By Neil Armstrong and Bob Green
Recently we at Robelle have been busy integrating Suprtool for HP-UX with a very interesting migration product from Speedware called AMXW. The goal of AMXW is to reproduce the basic HP 3000 application environment (languages, file system, database, VPlus, and commands), so that you as the user do not need to rewrite your programs.
Since Suprtool already runs on HP-UX, why would you want to interface it to a library like AMXW? The answer is simple: to take advantage of the MPE-emulation, of course. For example, Unix does not have the concept of a record length for files (all files are just a string of bytes). If you intend for a file to start a new record every 80 bytes, you need to tell Suprtool/UX about this in your Input command; Suprtool cannot figure it out automatically, unless of course you are reading a self-describing file created by Suprtool. AMXW maintains the equivalent of the MPE file label for each emulated file, so it can tell any program the record size, data type, and other MPE attributes of the file, such as user labels.
Here is how Speedware describes AMXW:
AMXW is a complete tool designed to migrate HP e3000 COBOL, SPL, C, FORTRAN and Pascal application environments to the HP 9000, Integrity Itanium, Windows, Linux, Sun or AIX platforms. It automatically converts code for new compilers, which prevents developers from needing to modify their MPE-specific code. The combination of AMXWs automated code conversion, MPE shell and Intrinsics libraries gets you up and running on your new platform in no time.
Although designed to migrate a variety of 3GL applications, AMXW is particularly well suited for companies that rely on HP COBOL 85 applications. AMXW automatically converts programs, including source code, copy libraries and $include files, to work with the most popular and proven COBOL compilers, namely ACUCOBOL-GT (ACUCORP) and Server or Net Express (Micro Focus).
Applications migrated using AMXW perform and operate the same way as on the HP e3000, even after the databases have been upgraded to RDBMSs. Using native database, file and operating system access, AMXW provides the highest level of performance. Whats more, it includes two valuable components that allow application code to remain untouched. The MPE intrinsics library supports the most commonly-used MPE intrinsics. Therefore, concepts, such as environment variables, process creation and command execution remain untouched in the application, and run natively on the target platform. In addition to native UNIX, Linux and Windows commands, AMXWs MPE shell supports a wide range of MPE commands and functionality.
To take advantage of the MPE file functionality of AMXW, we put the MPE intrinsic calls back into the Suprtool/UX source code (we had removed them when we converted Suprtool for MPE to HP-UX). This means we now have calls to FOPEN, FREAD, FWRITE, FGETINFO, FCLOSE in Suprtool for HP-UX.
Once we worked out how to link to the proper AMXW library and get the parameters aligned, we were able to open a simulated-MPE file, call FGETINFO to find out the record size, sort the records and create a new simulated MPE file with the results.
How did we create the test data file for our first run? We ran the AMXW command shell and did a regular MPE :Build command. And how did we check the new output data file from Suprtool? Again we used the shell and did an MPE :Listf command to check the format and a :Print command to check the contents. Very cool.
Of course, AMXW does not emulate every feature of MPE. For example, it supports the HPFOPEN intrinsic, but not the mapped-file open option (we can always hope for this in a future update). However, since we already solved this issue for Suprtool for HP-UX we are still able to run under AMXW without missing any features.
More on the Command Shell
We re-inserted a call to the HPCICOMMAND intrinsic into Suprtool/UX and now we can execute MPE commands like :SHOWJOB from inside Suprtool/UX.
Commands we have used include BUILD, PURGE, RENAME, LISTF, PRINT, SHOWJOB, BUILD;TEMP, LISTFTEMP, and FILE equations.
You can set and use environment variables: SETVAR and SHOWVAR and hpcigetvar are supported.
Command files are also supported, I made a simple command file called status to do a showme and showjob, which I can execute from within Suprtool on HP-UX.
./suprtool SUPRTOOL/UX/Copyright Robelle Solutions Technology Inc. 1981-2004. (Version 4.8.10 Internal) THU, NOV 25, 2004, 7:13 AM >status USER: #S413,amxw.NEWLAB,DEMO (NOT IN BREAK) RELEASE: 8.04 AMXW CURRENT: THU, NOV 25, 2004, 7:13 AM LOGON: THU, NOV 25, 2004, 7:13 AM JOBNUM STATE IPRI JIN JLIST INTRODUCED JOB NAME #S413 EXEC 160 160 THU 7:13A amxw.NEWLAB 1 JOBS: 0 INTRO; 0 SCHEDULED 0 WAIT; INCL 0 DEFERRED 1 EXEC; INCL 1 SESSIONS 0 SUSP
Although we have not tested them, UDCs are supported as well.
AMXW also has support for IMAGE calls to Eloquence. However, we have turned off their TurboIMAGE interface as we directly support Eloquence and have our own high speed access. However, they also support Oracle/Sybase and MS SQL through the same IMAGE intrinsics.
So far our experience building an AMXW-version of Suprtool for HP-UX has been positive. Soon we plan to try the same thing for Qedit on HP-UX. Keep tuned for future updates on our experiences.
Copyright The 3000 NewsWire. All rights reserved.