Click here for TSG sponsor message

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 directly to us here at the NewsWire. Send your tips to rseybold@zilker.net, or fax them to 512-657-3264.

MPE has a RENAME command for files but none for groups or accounts. The RESTORE command allows files to be stored to a specific group and account, but this can be a laborious approach in a situation where all that is required is to change an account name or group name. Are there any tools that provide this capability?

HP’s Mike Yawn replies:
The Posix shell is great for this kind of thing. Posix can move all the files for you in one swell foop, but won’t actually create an MPE group. So the easiest thing to do is:
:newgroup target.account
:sh
shell/iX> cd /ACCOUNT/SOURCE
shell/iX> mv * /ACCOUNT/TARGET

Greg Stigers adds:
I checked this, and mv does leave the original ownership intact, which may not be what one wants. However, chown “-R NEWOWNER.NEWACCT:NEWACCT /NEWACCT/NEWGROUP” from CI, or the same command without the quotes from the shell, appears to do the trick for each file in the group. I think that what chown calls owner – NEWOWNER.NEWACCT – is MPE’s creator, and what chown calls group, NEWACCT, is MPE’s group ID. One more way to skin the proverbial cat; either approach depends on what you have available and are comfortable using.

You will want to be sure that the accounts and groups exist as you want them first, or you will get HFS directories on your system volume set, which are a bit trickier to move.

Of course, you may or may not have [Vesoft’s] MPEX, which probably does this beautifully.

Pat Sarkar adds for those who don’t use Posix:
The easiest way to do this is by using DSCOPY if you have full NS/3000:
DSCOPY source-file.group.account;destination-file.group.account;MOVE.

How can I use two tape drives with a plain old FOS Backup? When tape in the first drive fills up, I want to start using the tape in a second drive.

Gilles Schipper replies:
Start with
:file t1;dev=7
:file t2;dev=8
Then use this command to store files to 7 then 8 after EOT is reached on 7:
:store fileset;;(*t1,*t2);show;
To store files to 7 and 8 concurrently, use
:store fileset;;(*t1),(*t2);show;......
I believe with both of these options, both tape drives must be of the same type.

Our goal is to keep user data on the user volume set. But programmers often forget and just enter NEWGROUP <groupname> without specifying the ONVS option. Is there something that can help in this? Also, update/install jobs often run, add groups and do so without regard to user volume sets. This uses up space on the system volume set.

HP’s Jeff Vance replies:
I know of several large customers who have the same basic problem: their developers need to be able to create groups, but they forget to specify the VS name or they intentionally bypass VS limits by creating the groups on the system volumeset.

My goal in creating the NEWACCT and NEWGROUP UDCs (on CSY’s Jazz Web site) was primarily to address your concern. Using these UDCs, the SM only needs to specify the NEWACCT command once and automatically: 1) The account is created on the system volume set with FILES=0, 2) The account is created on the target volume set 3) The PUB group on the system volume set has FILES=0 applied and is homed to the target volume set, and 4) the PUB group is created on the target user volume set. But you only needed to enter a single NEWACCT command.

SMs and AMs also need only enter the NEWGROUP command once. 1) The group is created on the system volume set, 2) The group is created on the appropriate user volume set, 3)The group on the system volume set is homed to the user volume set 4) If the parent account has not been created on the user volume set, and the user has SM cap, the account will also be created on the target volume set.

The appropriate user volume set is determined by a config file that maps group or account names to a volume set. This config file can be automatically created via a supporting script, or you can use an editor. If the config file is missing or if there is no match for the desired group (or account), the user is prompted for the correct volume set name. At this point the user can also append this new volume set mapping to the config file so it is easy to keep it current.

I need to keep track of the last date that a user has logged into the system. How can I do this?

Stan Sieler replies:
You can “roll your own” last-logon-date by doing the following:
1) Create a group called LASTLOGN in the accounts you’re interested in.
2) Add an account-wide logon UDC (or add to the existing one):

CONTINUE
/SYS/HPBIN/TOUCH ../LASTLOGN/!HPUSER

Then, you can later use the following command:

LISTF @.LASTLOGN, 3

I have a VPlus screen that errors out once a week. The program that run the VPlus is in RPG. Is there a way to redirect the error message to go to a file/printer instead of the fields on the screen?

Gary Biggs replies:
Depending on the error, try running your program as

:file l;dev=lp
:run faultypg;stdlist=*l

Place this in a UDC that your users always run. Any runtime aborts(the most common cause of this type of problem) will be printed on the system printer.

Ewart North adds:
We used to have to do a similar job using COBOL. Set up a file equate and then run the program with $stdlist file equated:

file p;dev=lp
run myprog.group.account;stdlist=*p

where myprog is the program whose output I want to capture.

Once the error message has been produced, it is redirected to file “P” and not the VPlus form, and you can look at the message using any editor.

We are running a 16 bit ODBC ARPA process and I need to drop the processes from CS to DS. I know the variable to set, but it’s not working. How do I do this?

Joe Geiser replies:

ODBC is run on the 3000 by way of a listener job, a batch job which “listens” in on a particular Sockets port. Take it to the DS queue, then change the ;PRI=CS to ;PRI=DS in the !JOB record of the jobstream.

In my experience, however, it is advised that listeners run in the CS subqueue with terminals, or tune ES to overlap the lower part of CD and the upper part of DS, so that online users do not impact possible online ODBC users and client-server/Web-enabled applications. It should probably also be set to oscillate instead of decay as well. This is especially true if using the application over a WAN, or if the user load on the network and/or the 3000 is especially heavy, so that responses are issued before timeouts kick in.

I have a print job that needs to print portrait on a LaserJet 5siMX. How do I change from landscape mode to portrait for this one printout? I want the ability to print differently for any given printout. There must be some control characters I can pass to the printer within each output file.

Gary Jackson replies:
Assuming you are referring to a LaserJet that is attached to an HP 3000 on a network connection, use an environment file. You will find them in HPENV.SYS. The ones that work best begin with PCL. If you need something a little different, copy the environment file and modify it using the PCL escape codes to make it do what you want.


Why does Samba/iX need a TZ variable set?

HP’s Lars Appel replies:
Like the Posix Shell and many Posix related utilities, the Samba/iX programs need to know about your local timezone to be able to display and handle date and time information correctly. This also applies to certain C/iX or Fortran/iX and even Cobol II/iX programs (if they are using certain $CONTROL POST85 functions).

The TZ variable is used to supply this timezone information. It can be set in the MPE/iX Command Interpreter with the SETVAR command or in the Posix Shell with TZ=xxx (and typically an export TZ). Notice that there is a default setting for TZ in /etc/profile which is used by the Posix shell (when launched via XEQ SH.HPBIN.SYS -L) that may still be TZ=GMT0, and thus not match your needs!

For Samba/iX it is sufficient to add an appropriate SETVAR TZ command to the JSMB and/or JNMB jobs (or JINETD, if you use that as listener). But in general it might be better to add an appropriate SETVAR TZ to your system-wide logon UDC and check /etc/profile to not override this with an undesired value. (The Posix Shell inherits CI variables into its environment but can modify the local copies thereafter).

An example for Germany is SETVAR TZ “MEZ-1MESZ” which specifies middle European time with daylight savings during certain periods of the year. See TZTAB.LIB.SYS for other possible values and their definitions.

You can also find more information regarding TZ usage and values in the HP Cobol II/iX Reference Manual, the HP C/iX Library Reference Manual, the HP Fortran 77/iX Reference Manuals as well as the MPE/iX Developer’s Kit Reference Manual.