Hidden Value – August 2001

Q: I just purchased a "Jamaica" box to add to the one we have. However, I know that the one we have now uses Single-Ended SCSI drives (SE). This new one uses Differential SCSI drives. Can I "convert" the enclosure to use SE drives?

A: Bob Johnson replied:

The same "Jamaica" box is used for SE or FWD. The conversion is made externally via adapter cables to the interface. The FWD drives run better but you will need 2 I/O card slots for a 28696A controller.

Q: I have a group of all our job files that have embedded passwords that I now have to change. I'll have to make the same change again in about 6 weeks. Is there a simple way of changing all 250+ files other than individually editing each one?

A: Several people pointed out this is easy to do if you have MPEX. Several other people noted that it is possible to write a CI script to do the job. To which Doug Werth replied:

No need to write your own command scripts to do this. We have them already written. Go to http://www.beechglen.com and click on Freeware. There is a command script that uses EDITOR and another that uses QUAD to emulate the MPEX functionality.

Paul Christidis, in addition to supplying a CI script, questioned:

Why do have embedded passwords? You may want to take a look at the "JOBSECURITY" command, as it has been enhanced to allow streaming of jobs, under appropriate circumstances, without prompting for passwords.

It turns out the original questioner chose the "JOBSECURITY" approach.

Q: Does anyone know of a way to locate the existence of any CI vars via a prefix? I've tried the BOUND evaluator, but it doesn't seem to work with the @ symbol in the same manner as DELETEVAR FRUIT_@ does (I may be doing it wrong too).

A: Patrick Santucci replied:

No search needed, because SHOWVAR *does* support wildcarding, which you probably already knew. So you could do:

SETJCW CIERROR 0
SHOWVAR FRUIT_@ >$NULL
IF CIERROR = 8116
# "No match found for this variable set. (CIWARN 8116)"
...
ELSE
...
ENDIF

Q: We use buildacct to create a job stream that can be used to recreate the accounts, groups and users on our system. Is there an equivalent tool that can create Posix directories and their permissions?

A: Patrick Santuci and Michael Berkowitz replied:

Yes there is, that would be "BULDACCT.PUB.SYS". It has been enhanced in version A.50.25 in patch (5.5 MPEKXY7C) (6.0 MPEKXY7D) for all HFS directories. :BUILDACCT %HELP will yield all the gory details of how to use it.

Q: Does anybody know of a little utility program that can be placed in a batch job that would then prompt the console for a reply and it would then set a variable based on the reply before moving on?

A: Donna Garverick replied:

The "INPUT" CI command has been enhanced with the "CONSOLE" option to direct prompts to the physical console (LDEV 20). It is available as a patch to 6.0 and 6.5, but is included in 7.0.

Q: I forget the syntax for continuing a command line in a jobstream. Of course the line I have to continue is much longer than the example below but is the syntax correct, in particular the "&" and the "!" at the beginning of the continued line?

!FCOPY FROM = XYZ.MYGROUP.OLDACCT; &
! TO = ABC.MYGROUP.NEWACCT

A: Several people responded in the affirmative, but there was some question as to the total length allowed. Jeff Vance, CI Architect, gave the definitive answer:

The current maximum length for a CI command is 511 characters. This applies to JCL, interactive input, redirected file input, COMMAND and HPCICOMMAND intrinsics, UDCs and command files. The CI accepts up to 9 additional continuation lines, after the initial input line. Blanks before (to the left of) the ampersand are significant and are not stripped or reduced. Leading blanks in subsequent continuation lines are removed and do not count towards the 511 character limit.

Q: Neither CTRL-A nor CTRL-B works on the console. What could be causing this?

A: Doug Werth replied:

Verify that "LINE MODIFY" and "MODIFY ALL" are not enabled on the console. These modes can interfere with the CTRL-A and CTRL-B functionality. Press the USER/SYSTEM key followed by MODES. The only mode you want enabled is "REMOTE MODE".

Q: Is it okay to have one printer with the same name and two different ldevs? I want to pre-convert a printer from the DTC that it is on now to a networked printer with IP address and of course I don't want to change the name of the printer. Does this make sense or not?

A: John Burke replied:

Yes, it works fine. You can even have one name for two physically different printers. As for what you are doing (switching from DTC printer to network), I usually do it on the fly:

1. create the appropriate new entry in npconfig
2. clear out the queue and stop the spooler on the DTC "printer"
3. change it to a terminal in nmmgr, validate and dynamically re-configure
4. go into ioconfig and delete the class name(s) for the printer
5. add the new network printer ldev
6. add the class(s), exit ioconfig and you are done
7. cycle the spooler (STOPSPOOL/STARTSPOOL) - some people find this step necessary. In any event, it cannot hurt.

Q: Is traceroute available in MPE?

A: James Hofmeister replied (as of late June):

Yes,

6.0 NSTFDY3 General Release.
6.5 NSTFDX5 General Release.
7.0 NSTGD45 Beta Test Patch.

The file name for traceroute is: TRACERT.PRVXL.TELESUP

Q: After adding devices for network printers in SYSGEN (planning to use DOIONOW later), I looked at the LOG4ONLN.PUB.SYS file and found it has some stuff from prior work. Can I edit (ie delete the old commands) the LOG4ONLN.PUB.SYS file or do I have to delete it and redo my AD commands in SYSGEN?

A: Doug Werth and Ron Horner replied:

You can edit LOG4ONLN. It is nothing more than a script that is passed to IOCONFIG. You will need to use something other than EDITOR due to the default record size of 512 bytes. Or you can FCOPY it to a file with a smaller record width and then use EDITOR to make your changes.

Q: Within a CI script I need to ECHO a string that has both greater than (>) and less than (<) characters. The CI is interpreting them as CIOR. How can I get around this?

A: Mark Bixby, Keven Miller and Guy Paul replied:

You need to "escape" the less then and greater than signs with the "!" (aka "bang") character so they won't be interpreted as CIOR characters:

Q: I just installed Java for the first time. When I try anything, including ":java -version" I get a whole bunch of "UNRESOLVED EXTERNAL" messages. Did I do something wrong?

A: Matt Shade replied:

Excerpt from JDK 1.2.2 page at http://jazz.external.hp.com

Java will run on MPE/iX 6.5, 6.0 or 5.5. If you have not previously installed Java on this system, you may find that certain POSIX libraries are missing. This will typically show up as unresolved externals when trying to run Java. If you have this problem, download the LIBS.hp3000 script below and run it on your system to create the necessary libraries.

Go to http://jazz.external.hp.com/src/java/jdks/JDK1.2.2.html and look at the very bottom link.

Q: How can I determine the submitter of a job in the "WAIT" or "SCHED"uled state?

A: Jeff Vance and Larry Simonsen replied:

You can use the JINFO function. For example,

setvar submitter JINFO(the_job_num, "StreamedBy")

Enter :help jinfo for the details.

Q: I need to build one or more directories on the fly. Is there a way within the CI to build a Posix directory?

A: John Burke replied:

Use the NEWDIR command.

Q: I'm trying to create a STORE job, but the fileset description part goes on for multiple lines. Is there a better way to do this?

A: Jonathan Backus replied:

With MPE STORE you can back reference a file containing the fileset(s) to store. The syntax is, for example, "^BRBACK1.group.acct1". You can also do a SETVAR, as in "SETVAR flist "@.@.acct,@.@.acct2", and then reference then new variable in the backup (i.e., "STORE !flist;..."). I use this second option with a standard little miscellaneous backup job I have. That way all I have to do is adjust the SETVAR line and stream it. I also use the "flist" variable in a TELL command so I get notified at my terminal when it's done, and what it was doing.

Q: I have a bunch of files on my PC that I want to FTP to an HP e3000. They need the 'option' added to the end so that the file will be built correctly, i.e.:

;rec=-80,1,f,ascii;code=1052

Does anyone know the syntax to use this option with the MPUT? I have tried numerous variations and can't get it to work.

A: Elizabeth Thayer and Neil Armstrong replied:

You could do it by modifying the bldparms file in arpa.sys. Modify the first entry and then change back when done as it will affect all ftp transfers. You cannot add the "rec=" on a mput.

Q: We are preparing to migrate our data center from one site to another. In preparations for this the network adminstrator has set up a new segment and assigned the HP e3000 a new IP address. What they are planning is to have each server answer to both the old and the new address during the interim and then to stop using the old address after the move. I do not see where this can be done in nmmgr. Is this type of thing even possible?

A: Chris Bartrum replied:

You can't run multiple IP addresses on a 3000 LAN card. What we did when we were in the same situation was to tell one of our NT servers to PROXY the old IP address redirecting it to the new address. This allowed us to switch IP addresses on the 3000 with minimal fuss. After a while, we went to the logs on the proxy box to see who was still accessing the old IP address (folks using HOSTS files typically) so we could fix their machines as time permitted.

Q: If I do this:

:PRINT <circular file>;START=-2;END=-2

I get the error msg "END= record number has been ignored. (CIWARN 9084)"

MPE/iX interpretation:

"An invalid ending record was specified. Evidently, you specified zero as the record number to stop printing it."

Anyone know how to print the second-to-last record of a circular file?

A: Jeff Vance replied:

I did some digging and it is a bug. PRINT calls the FFILEINFO intrinsic to get the device type. PRINT expects device types of 0,1,2,3 to be disk files. Guess what? The device type, returned by FFILEINFO for a CIR file is 4. I patched the code (on a test system) to handle 4 and ":PRINT cir;end=-2" works fine.

I don't know if FFILEINFO is returning the correct device type (4), and thus the bug is in PRINT, or if FFILEINFO should be returning a number in 0..3. At this point I don't have a work-around.

Q: Why can't I find the profile file with the shell find command? Is it because the file is in use? Am I better off using LISTFILE instead?

shell/iX> callci listfile /etc/p@

PATH= /etc/
profile profile.bak profile.local protocols

shell/iX> find /etc -name p*

Unknown option "profile.bak"
Usage: find directory ... expression

A: Richard Trapp and Mark Klein replied:

Put the "p*" in quotes so the shell doesn't explode p* into all matching files on the command line:

find /etc -name "p*"

Q: The shell has me confused. When doing things such as man xxxx, man seems to want something un-intuitive. At the "--more--" prompt, a carriage return gets me the next line of the man page, PageDown gets me about 25 lines, control-y exits but leaves echo turned off, etc. Should I use a different terminal emulation?

A: Mark Bixby replied (tongue firmly in cheek):

The ---more--- prompt is completely intuitive to Unix users.

Press the space bar to page down.

If you want it to just type everything out without stopping, do this before using man:

export MANPAGER=cat

See "man man" for details.