| Front Page | News Headlines | Technical Headlines | Planning Features | Advanced Search |
Robelle Sponsor Message

June 2004

Get the most out of your Robelle tools

Another Amazing Year for Suprtool

By Neil Armstrong

As you surely recall, last spring we released version 4.7 of Suprtool for both MPE and HP-UX. The new functions added at that time allowed Suprtool to break new ground in applications support: expanded Eloquence support, $Number to use free-form ascii numbers, data cleaning features, $Counter, $Total, $SubTotal, $Split, high-speed many-to-many links, and Extract from a table on HP-UX (as done on MPE earlier).

If you thought that was terrific, wait until you see this spring’s version 4.8. And most of the improvements apply equally to MPE and HP-UX. Suprtool version 4.8, with even more improvements, was released into production status during April.

Edit Function

Suprtool now has a $Edit function for formatting data, just like COBOL has. For example:

>ext a=$edit(int-field,”$$,$$$.99-”)
>ext b=$edit(int-field,”99,999.99-”)
>ext c=$edit(int-field,”cr99999.99”)
>ext d=$edit(int-field,”-$9999.99”)
>ext e=$edit(int-field,”**,***.99+”)
>ext f=$edit(int-field,”zz,zzz.99+”)
A = $11.11- B = 00,011.11-
C = CR00011.11 D = -$0011.11
E = ****11.11- F = 11.11-

A = $22.22- B = 00,022.22-
C = CR00022.22 D = -$0022.22
E = ****22.22- F = 22.22-

Split Function

Suprtool now allows up to 255 $split functions per task. The previous limit was 16, and the limit has been changed to assist in reading data from “PRN” files. You can now parse almost any field-separated data entry.

Consider the following Data:

Armstrong/ Neil/ Patrick
Green/ Bob/ Miller
Fritshaw/ Elizabeth/
Edwards/ Janine/
Armstrong/Arthur /Derek

You may notice that this is the format the Summit application uses to store names. The $split function can extract each token into separate fields. The syntax for the $split function is:

$split(Field,Start Character,occurrence,End Character,occurrence)

The following task will $split the data in the wholefield into three separate fields. This assumes that the file namefile is a self-describing file with a field called wholename.

>in namefile
>define lastname,1,30
>define firstname,1,20
>define middlename,1,20
>extract lastname = $split(wholename,first,”/”)
>extract firstname=$trim($split(wholename,”/”,”/”))
>extract middlename=$trim($split(wholename,”/”,2,” “,2))
>out names,link

The first extract statement tells Suprtool to extract the bytes from the field wholename, starting at the beginning (first keyword), and stopping at the “/” character. The second extract statement, tells Suprtool to extract the bytes between the first occurrence of the “/” character to the next occurrence of the “/” character, and then that string is trimmed of spaces as it is nested within the $trim function. The third and final extract statement tells Suprtool to extract the bytes beginning with the second occurrence of the “/” character to the second occurrence of the space character.

Fast Reads (HP-UX specific)

Suprtool now reads Eloquence databases up to five times faster. You can turn this option on by putting the command >Set FastRead on in the file /opt/robelle/suprmgr. This will invoke the FastReads for all Suprtool processes reading Eloquence databases.
Testing has shown improvements in CPU and wall time anywhere from two to five times. Your mileage may vary, of course, but we are encouraged by the reduction in disk accesses that this enhancement brings as well.

Dynamic Loading (HP-UX specific)

Another important enhancement for Eloquence is that Suprtool will now dynamically load whatever Eloquence routines you have on your system. The routines libimage3k.sl and libeqdb.sl are now loaded automatically as long as the SHLIB_PATH variable is set for you. (If you are a Summit user, relax, this variable is already set for you).
This means that if new features or bug fixes for Eloquence Image calls are installed on your system, they will immediately be inherited into the next invocation of Suprtool.

Findclean Function

Suprtool now has a $Findclean function to identify records with specific characters in it.

We recently added the $Clean function to primarily clean bad characters in text fields. This has been an extremely popular enhancement but many wanted to do investigative work and try to figure out what records had these bad characters, to hopefully find out where the “bad” data was coming from.

For this reason we have created the $FindClean function. $FindClean will return true if it finds a character defined using the Clean command.

>in cleansd
>clean “^9”,”^10”
>if $findclean(nonprint)

The above task will list the record if the field nonprint has a Tab (Decimal 9) or a Line Feed (Decimal 10) anywhere in the field.

You can Find and clean the “bad” characters from a field at the same time:

>in cleansd
>clean “^9”,”^10”
>if $findclean(nonprint)
>extract nonprint=$clean(nonprint)

HP-UX Specific Enhancements

Dbedit for HP-UX now works on Eloquence databases; and on Oracle databases in the ImaxSoft version of Suprtool. Entered through the Edit command, this module allows you to easily List, Update, Delete, Put and Change data entries by their key fields. This module makes it easy to add new data to a database, modify it, quickly find data that is related by key value, and automatically change a key value in all datasets.

The List command in Suprtool for HP-UX has a new File keyword that allows output to be directed to a file. The List command also has a new option to Append to an existing file.

The File option takes the next parameter as the filename:

>in test/file1sd
>list stan file myslist

If the file myslist exists, it will be overwritten, unless you specify the Append option. If you specify the Append option, the new report will be added to the file.

So if you want to combine two reports to the same output file, you just need to do the following:

>in test/file1sd
>list stan file myslist
>in test/file2sd
>list stan file myslist append

Suprtool’s Open command can now connect to a remote Oracle database.

Future Plans

For the rest of 2004 we plan to add new functions to Suprtool. MPE may be dying, according to some people, but we continue to add just as many new features to our software products for MPE. This year we are also looking to use our new dynamic loading feature to support more databases on HP-UX (through TurboIMAGE call-translation libraries).

Copyright The 3000 NewsWire. All rights reserved.