HiddenValue
Click here for The Support Group Sponsor Message

HiddenValue

November, 1997

Hidden Value details commands and procedures in MPE that can improve your productivity with HP 3000 systems. Get a free NewsWire HP 3000 Always Online cap -- submit your MPE tip to directly to us here at the NewsWire. Send your tip to rseybold@zilker.net, or fax them to 512-657-3264.

Compiled by John Burke

In the "yet another way Posix can shoot itself in the foot" category, I tried this:
:echo awk 'BEGIN{print "Hi there"}' >jpdtmp :save jpdtmp
:file jpdtmp,old
:sh < *jpdtmp
Something like this caused my session to hang, unabortable by abortjob, nscontrol;killsess, or abortcon. Furthermore, the directory entry for jpdtmp seems to be locked up by this process in such a way that any other process attempting to access the file (including :listfile or :store) hangs in the same unbreakable state. HP's Response Center tells me a reboot is my only option. Is there any other way out?

Mark Bixby replies:
Replace the following:
:file jpdtmp,old
:sh <*jpdtmp

With:

:sh JPDTMP

Or just do it all with a single quote-nasty command, no temp files required:
:sh '-c ''awk ''''BEGIN {print "Hi there"}'''''''

Mixing CIOR with POSIX stdin/stdout sometimes results in trouble. I don't know what more you can try to abort the hung session. Well, maybe you could try the POSIX 'kill -9' command against the sh PID. This will kill sh under HP-UX, but I've never tried it on MPE.

In the past I was able to copy databases through a DS line by specifying the FCODE (-400 and -401). Now I would like to do the same basic function through an FTP connection. Does anybody know how to do this or if it can even be done? I am currently at MPE/iX 5.0 on both ends of the connection.

HP's Jeff Vance and Jim Hofmeister reply:
The ability to FTP PRIV files is available on MPE/iX 5.5 Express 3.

HP's Lars Appel adds:
You might try using MOVER -c0 to create an archive file containing the database files, transfer this via FTP (use bytestream mode), and unpack the files on the target system using MOVER again. Just make sure to use the same MOVER version on both systems (check EOF).

I have a problem record in a 1.5 million record dataset. Using QUERY I can filter to that specific record and use the NUMBERS command to get that record's specific relative record number or something like it. The problem is I can't figure out exactly what those numbers mean since NUMBERS is undocumented. I want to be able to use a DBGET mode 2 to "fix" the record.

Michael Berkowitz replies:
The "NUMBERS" command in QUERY can be used after a find and shows two numbers. The first is the dataset number, the second is not a relative record number, but an absolute record number that can be used in a DBGET mode 4 retrieval.

How can I use Posix name spaces to separate classes of files within an account? What I have in mind is separating development elements, such as compile jobs, from production elements such as batch processing jobs.

Gavin Scott replies:
This is not quite what you asked for, but consider something like:
:NEWLINK /GAVIN/FAKE,/GAVIN/PUB

Now if I refer to X.FAKE.GAVIN it gives me X.PUB.GAVIN! You can't do a :LISTF in @.FAKE.GAVIN, but any access that will follow the symbolic link will work. The MPE code that does file.group.account resolution doesn't seem to care whether any of the filename components are really groups/accounts or simply symbolic links.

So you could have a DATA1 and a DATA2 group in an account and have all the programs access everything out of the DATA group which would be a symbolic link to one or the other as needed. I'm sure there are other things than :LISTF that wouldn't work though.

Symbolic links are useful in lots of "pure MPE" places that people don't usually think of using them because they are perceived as a "Posix" feature.

I want to take all my disks, system volume set, and the user volumes, and move them to another machine that has no disks. How can I best do this?

Lars Appel replies:
You might use SYSGEN to create two different config groups in the SYS account, one for the old system (e.g. CONFOLD), and one for the new system (e.g. CONFNEW). To create the new config you might start with one of the existing config templates, e.g. CONF9x8.SYS for 3000/9x8 systems. Use BASEGROUP to open it, adjust IO to your needs and KEEP it as CONFNEW.

Just make sure that every disk gets an LDEV in the new config. Paths and LDEVs (except for LDEV 1) do not need to be the same on the new system. MPE/iX will notice (and "collect") all available volumes during bootup (as long as they are "visible" by a configured LDEV number).

Shutdown the system, plug disks into the new box, power it on, boot from the primary path (or enter the appropriate path for LDEV 1) and at the ISL prompt do a START NORECOVERY [NOSYSSTART] GROUP=CONFNEW.

You might also need to adjust NMCONFIG with NMMGR as a different system will probably have the LAN cards at a different physical path. In case you make a copy of NMCONFIG, make sure it stays on LDEV 1 (FILE;DEV=1).

Today we had to replace LDEV1 on our HP3000, after which we did an INSTALL. Then we did
RESTORE *T;/;DIRECTORY;SHOW;KEEP;OLDDATE
The MPE-filespace was restored normally. But the HFS filespace was not restored. RESTORE told me to use CREATE=PATH which I then did. But what can this mean for the functioning of my network? The DIRECTORY is on my STORE tape -- so what went wrong?

Wolfgang Kinscher, Gilles Schipper and Jeff Kell reply:
If you are planning an install keep this in mind: Do not specify the option "DIRECTORY" with a partial (DATE>=) backup. STORE will not put the HFS directory structure on tape. Do the following instead: STORE ;*T;DIRECTORY stores all of your MPE/HFS directories on tape. Then do your partial backup without DIRECTORY option

After the install first restore your DIRECTORY with RESTORE *T;;DIRECTORY, then restore your partial and your latest full backup respectivly.

How can I find out programmatically whether DDX has been enabled for a given TurboIMAGE dataset? Was Mode 202 enhanced to give this information?

Jerry Fochtman replies:
For detail datasets, DBINFO mode 205, which is an expansion of mode 202, provides the information you seek. Basically the qualifier is either the dataset name or number. Specifically, examine half-word 27 to determine if the detail set has DDX enabled.

How can I extract values from the middle of a system variable? I am able to use POS to get the byte position of the string that I want to extract, but none of my subscripting seems to work. I have tried the following two, and a number of variations on the theme:
setvar l,hpstreamedby[15:6]
setvar l,hpstreamedby(15,6)

Ted Ashton and Michael Gueterman reply:
Use the STR function instead: STR(string,starting position, # of characters). For example, calc STR(HPSTREAMEDBY,15,6). All of the expressions were added to the HELP subsystem not too long ago, so you can do a HELP FUNCTIONS to get a list of those available.

I have a list of files that I want to run a command against. So I LISTF,6 the file argument into CHANGEME, and SAVEd it. Then I started my WHILE loop, INPUT NEXTFILE<CHANGEME, and ALTFILE !NEXTFILE [parms]. I got "Invalid character in MPE file name." What did I do wrong?

Jeff Woods replies:
The traditional (pre-CIOR) method for handling this is to use a file equation including ;NOCCTL;DEV=DISC on a file equation referenced for the output of the :LISTF command. The modern (i.e. cool and trendy) method is to use redirection and the LISTFILE command:
:LISTFILE fileset@,6 >listfile

LISTFILE supports the HFS namespace and some other handy features that LISTF doesn't.

I have a program that uses the CREATEPROCESS intrinsic. It was working fine in compatibility mode, but after I compiled it to native mode a client gets a create error # 17. I can run it on my system and it works fine. The process it is trying to start is a compatibility mode program. Both are COBOL programs. Why is this happening?

Tom Renz, Jim Alton, Stan Sieler and Philippe Di Monte all reply:
Did you change the 'items' and 'itemnums' parameter from S9(4) COMP (16-bit) to S9(9) COMP (32-bit) arrays in the native version? CREATEPROCESS is one of the very few intrinsics whose parameters substantially changed between MPE V (or CM) and MPE/iX.

Since moving to MPE/iX 5.5, I've noticed sessions coming in with an LDEV of less than 20. This creates a problem with Speedware, specifically Reactor. How can I resolve this?

Gilles Schipper replies:
Starting with 5.5, you can specify the starting LDEV of Non-Nailed pools. Refer to the 5.5 Communicator, page 10-72. This should provide you with an acceptable workaround to your Speedware problem.

I need to know more about file/directory ownership for Java and perl. I've recently installed these on a system running MPE/iX 5.0. The file permissions appear to be okay, but the ownership is a problem. I was manager.sys when I did these installations and this ownership seems to prevent the users from accessing necessary files.

Mark Bixby replies:
Despite what you may have thought initially, the ownership is OK, it's the permissions that are probably the problem. I like to use "chmod 755" for public directories, "chmod 755" for public executables, and "chmod 644" for all other public files in a read-only environment.

If the general public needs to be able to create/purge files from directories, or write to log files, you'll need "chmod 777" for the directories and "chmod 666" for the log files. As always, think twice before you allow general write access.

I received the following error message when trying to work on an XL:
LinkEd> XL XL=NMXL.XL
The MAPPING OPTIONS for the file are not correct. (FILE OPEN ERROR -462)
File System message 462
ATTEMPT TO OPEN/CREATE FILE "NMXL.XL" FAILED (LINKERR 1112)
What does this geek-speak mean?

Stan Sieler and Steve Dirickson reply:
It's possible that someone has the NMXL.XL file open already, probably in use as a code file. A LISTF , 2 should show an "*" on it. LINKEDIT tries to map the file open as a read/write data file. The loader tries to map the file open as a code file -- you can't do both simultaneously.


Copyright 1997, The 3000 NewsWire. All rights reserved.