Unix Tips for HP e3000 Sites

Porting Qedit from MPE to HP-UX

The May Robelle Tech column in the 3000 NewsWire is about the technical challenges in porting the classic Qedit editor from the HP 3000 to the HP 9000, something that Robelle accomplished over 10 years ago.

Doing a Conversion to UNIX? Check Robelle Resources

"We use Suprtool to migrate data from the HP3000 IMAGE databases to ASCII text files which are then imported into Oracle, Excel, or Access databases on the UNIX and NT server platforms. Using Suprtool to do the data extraction for this conversion is fast and flexible without taking a lot of the HP3000 resources." - Stella Leong, Programmer/Analyst, California Teachers Association

Benefits of Suprtool in a Conversion: Convert data efficiently
· Export to other platforms and applications: UNIX, NT, PC the Internet and Intranet.
· Verify data accuracy quickly. Save hours of time in finding invalid data.
· Quick listing of extracted data complete with counts, totals and headings.
· Merge information from multiple data sets.

"…I am loath to work on an HP3000 that doesn't have Suprtool. The hours, if not weeks and months, Suprtool has saved me over the years makes it a real bargain in my book…." Dave Kalb, Total Bank Technology Solution, Inc.

HP-UX 11 Rated Tops

The HP-UX 11 operating system was rated tops among competing UNIX versions by researchers at DH Brown Associates.

SAPdb: a test drive

We have installed the SAPdb enterprise-class open-source database and put it through some initial tests.

SAPdb is designed for the business enterprise, with 24x7 uptime, scalability and high performance in mind. There are no limitations on database sizes or on the number of users. SAPdb is ACID compliant (fully supports ISO-SQL 92 Standards) and includes all RDBMS and enterprise features expected in an open DBMS such as Views, triggers, foreign keys, constraints of various kinds, stored procedures, versioning, hot backups, etc. ODBC and JDBC drivers are supported.

Click the link above for a full report.

HP-UX at Robelle

Read the latest on Robelle products for HP-UX, latest research, links to HP-UX resources on the net, plus tips for migrating from MPE to HP-UX.

UNIX Quickstart for MPE Users

Robelle column from the 3000 NewsWire magazine with everything an MPE person needs to know for their first week on HP-UX.

Suprtool and HP Eloquence

The IMAGE-like database, HP Eloquence, is supported on HP-UX and is now supported in Suprtool. Click the link to read the latest status.

Book Review: Advanced Programming in the Unix Environment

From Robelle's Encyclopedia for HP Users: if you are writing software for UNIX, you must get this book by Richard Stevens ( Addison-Wesley, 1992, Amazon link). It is jam-packed with readable and illuminating programming examples.

For the example programs and include files, visit this web site.

click for more on suprtool/ux

NewsWire: Suprtool/UX--An Old Friend

The January 2002 issue of the 3000 NewsWire contains an column by Bob Green about our Suprtool product on HP-UX.

We are prepared to support Suprtool on MPE/iX as long as customers demand it, and we hope that is a long time. But we also have Suprtool on HP-UX and have had it for many years. We are even doing research right now to improve it to make migrating applications more convenient (news of that research in the weeks to come).

Suprtool from Robelle is already widely used to help integrate HP 3000 systems with HP-UX systems by sharing data. For example, one Robelle customer uses Suprtool/iX and Suprtool/UX to distribute their data from the 3000 to a nationwide network of HP-UX boxes, and then bring new data back to the 3000 for integration. If you decide to migrate some apps to HP-UX, Suprtool/UX will be there for you.

Click the link above to read the entire column.

Where Are My Temporary Files

When migrating from MPE to HP-UX, one common question is "where are my temporary files?". Unix doesn't have the "temp" and "perm" domains like MPE. Instead, Unix uses a random filename in the /var/tmp directory to function as a temporary file.

To generate a random filename from the Unix shell, you can make use of the environment variables PPID (the process ID) and RANDOM (special variable that returns a different number each time you reference the variable).

This example shows how to use a Unix "temp" file with Suprtool. This technique will also work in other scenarios where you have multiple instances of a program running and each require their own unique filenames.

Also, Suprtool cannot access Unix shell variables yet, so you have to put the Suprtool commands in a file, then run Suprtool with stdin redirected. In this example, we show a simple case of selecting data from a file. We used a here-document (<<) in the example, so be sure to include the EOD string as shown.

cat <<EOD >$tmpuse
input datafile,reclen 80,lf
define key,1,8
if key="packard "
output $tmpout
/opt/robelle/bin/suprtool <$tmpuse

Feedback on this article:

This article generated quite a bit of feedback on the Robelle-L discussion list.

First, Glenn Cole (glenn_cole@non.hp.com) asked:

Under "Unix: Where Are My Temporary Files," it would be nice to hear the difference between /var/tmp and /tmp. (Actually, until this note, I did not know that /var/tmp exists!)

and Hans of Robelle replied:

According to HP's "HP-UX 10.0 File System Layout White Paper" (at http://docs.hp.com/hpux/onlinedocs/5963-8942/5963-8942.html) : /tmp is for "System Generated temporary files", while /var/tmp is for "Application Generated temporary files"

Further down, they elucidate: "/tmp is for system-generated temporary files. The contents of /tmp are usually not preserved across a system reboot. The choice of whether or not /tmp is cleaned up at boot time is left to the customer.The /tmp directory is private. Since many sites will delete files from /tmp at boot time, files that must be preserved should not be placed in the /tmp directory. Application working files should go in /var/tmp or /var/opt/. Files generated by the OS that must be preserved across reboots should go into the /var/tmp directory. "

...And yet further down, under /var/tmp: " /var/tmp /var/tmp is for user temporary files generated by commands in the /usr hierarchy. Files located here are preserved between system reboots. Temporary files generated by applications installed under /opt/ will use /var/opt/ for temporary files."

AFAIK, the same structure applies to HP-UX 11.x (but not to 9.x and older....)

and Ted Ashton (ashted@southern.edu) concluded:

I'd say you're still okay with /tmp. The different flavors of Un*x have different definitions of /tmp. Some have /var/tmp; some have /usr/tmp; some have neither, but all have /tmp. With due respect to the docs, if /tmp were really meant to be strictly for system files, wouldn't it have its permissions set so that mere mortals couldn't write to it?

HP-UX For MPE Users

You can download Neil Armstrong's paper from our web site and get a cram course in HP's UNIX, designed for people who have an MPE background. For example, here is Neil's description of variables:

We are used to the concept of system variables on MPE. On HP-UX we have a similar concept called environment variables. As the name implies, these variables describe your environment. Some typical MPE variables are HPPATH, HPACCOUNT, and HPGROUP.

Some very common environment variables on HP-UX are the PATH (same as HPPATH), TERM, and MANPATH variables. TERM, which describes your type of terminal, is checked by programs that use the Curses library, such as the vi editor. MANPATH is similar to PATH, but aids the "man" utility in searching for documentation pages.

These variables must be "export"-ed for any child process to reference them. Otherwise they are private to the current process. Environment variables can be inherited by a child process from its parent. The parent process, however, cannot reference variables created or changed by the child process once the parent process becomes active again. This is quite different from MPE and means that a child process cannot pass back results in a variable; the typical alternative is a file.

On MPE we reference a variable by preceding the name of the variable with an exclamation point. On HP-UX you precede the name of the variable with a dollar sign ($).

To read the rest of Neil's paper, download the PDF file.

For another paper on the same topic, visit Shawn Gordon's web site.