Hidden Value – November 2001

Q: Within FTP, SITE STREAM works for me from one MPE/iX box to another MPE/IX box. But what about using it from an NT DOS FTP session? The remote help for SITE makes it appear as though it should work.

A: John Burke replied:

From a Win2k machine (and presumably also an NT machine), after connecting to a MPE/iX system, enter

    quote site stream FILENAME

to stream the job FILENAME.

Q: I need an example of how to verify that an INPUT variable conforms to a specific format. For instance, this input should be 10 numeric characters:

INPUT _CN;PROMPT="Paste or type 10-digit Customer Number here : ";READCNT=10

I'm looking for CI code to do the test.

A: Keven Miller and Tracy Pierce both showed what to do, but the most aesthetically pleasing answer (you know what I mean if you ever programmed in APL) was from Jeff Vance:

setvar num ""
while len(setvar(num,input("Paste or type...",,10))) <> 10 or &
not numeric(num)
endwhile
# now we have a 10 digit string in the 'num' variable ...

Q: In the days of old, one way to increase the speed of your logon was to block your UDC files as high as possible to reduce the number of disc I/Os that were needed. Will this have any effect on MPE/iX 6.5+ or can I leave it alone?

Jeff Woods and Jeff Vance replied:

MPE/iX reads disc in a multiple of 4k pages, attempts to cache frequently used pages, and, when using a serial read via the file system API, to read multiple pages at a time. I would expect that blocking factor has no noticeable impact on UDC performance but that ensuring the file is allocated in a single (or as few as feasible) extents would. Contiguous disc pages can be read together (up to some maximum limit) but parts of the file scattered around one or more discs will obviously require separate reads.

Also, minimizing the number of cataloged UDCs (both number of separate files and number of UDCs within a file) does cause a noticeable increase in logon performance.

Q: After recently updating our HP system we began to get the following error messages displayed on the system console:

/#J1/176/ Stat on "/etc/bootptab" No such file or directory

What does this mean?

A: Peter Osborne and Mark Bixby replied:

If you are not using bootp, comment out the "bootps dgram....." line in your INETDCNF.NET.SYS file. Then restart JINETD.

Q: I just downloaded and applied the patch to a MPE/iX 6.5 PP2 system (along with all the other GR'd patches that patchman found) that delivers Apache 1.3.9 (had been using 1.3.4 for a long time). Now Apache does not run and I get the following error message in error_log repeated several times per second:

[alert] (22)Invalid argument: setuid: unable to change to uid: -1

I don't see anything about this is the archives. Anybody know what has gone wrong?

A: Mark Bixby replied:

Newer versions of MPE Apache starting with 1.3.9 have become aware of the User and Group directives in httpd.conf, and apparently the default User and Group in the old 1.3.4 httpd.conf was bogus. See the new /APACHE/PUB/conf/httpd.conf.sample that the Apache 1.3.9 patch should have created on your system for the correct values of User and Group.

Q: Does anyone know of a command file or utility where I can input a jobname, like JINETD, and get its corresponding spool files?

A: Larry Simonsen, Mark Bixby and David Darnell replied:

:listspf o@;seleq=[jobname=jinetd]

Q: I want to use the first six characters in a file as a var, but I can't figure out how to do it.

A: Jon Backus replied:

If the file is a simply ASCII file then you could do "INPUT var;READCNT=6<file" and it would read the first six characters contained within the file.

Q: If NMMGR has been set up to require a password, how do you get rid of it? I know you need to run NMMGR in maintenance (or character) mode to set up a password, but typing 'password<cr>' does nothing.

A: John Burke replied:

Check out NMSTART.PUB.SYS

Doug Werth of Beechglen first mentioned this some time ago on 3000-L. The tip was included in the Hidden Value column of the 3000 NewsWire and was made part of the Best Of ... compilation from last year. This compilation, plus all columns since, are available in searchable form at <plug?>www.burke-consulting.com</plug?>

Q: We have a user whose UDC file contains an OPTION LOGON UDC. Sometimes this user streams a batch job and, in this case, the OPTION LOGON interferes with the rest of the job. Is there any parameter which can be used in the job that will prevent execution of the OPTION LOGON UDC?

A: Jon Backus replied:

There isn't a job parameter but you could modify the UDC to check to see if the process is a session or a job (if "!HPJOBTYPE" = "J" then) and then skip the parts you don't want executed for jobs.

Jeff Vance added:

If a session is created from within a job, HPJOBTYPE will be "S" in that session. To detect this more unusual case, HPTYPEAHEAD can be set to true. This will work in a "normal session" but will fail with CIWARN 8174 in a session coming from a job.

Q: I would like to run 'touch.hpbin.sys' as part of a logon UDC to update the 'access' date/time of all the files in my group. However, I am struggling to run this program with the correct parameters in a non-shell way.

A: Steve Miller and Ted Ashton replied:

Wildcarding in Posix is actually controlled by the shell - the shell expands the wildcarding and passes the program the result. What I have done in similar cases is actually run the shell with the -c parm to pass it the command I want.

:sh.hpbin.sys "-c 'touch /ACCOUNT/GROUP/*'"

Q: (from the same thread as above) Is there a method or utility available to change a file's dates to a user-specified date (other than changing the current date on the system)?

A: Steve Miller replied:

Use a -t option with touch and specify the date and time in YYYMMDDHHMM format.

:sh.hpbin.sys "-c 'touch -t 200109151030 myfile'"

should set the mod and access date/time to 09/15/2001 10:30 am for myfile. Add the "-a" option to just change the access date.

Q: We will soon be replacing our disc drives and will need to do a store and restore. When using Turbo Store and three tape drives, which way is the fastest, a serial or a parallel store/restore? We are also open to any suggestions on how to ensure an easy move of the data (we will be using buldacct to create the directory and catalogs).

A: Gilles Schipper replied:

Probably parallel would be best for speed. It is not necessary to use buldacct to create your directory and catalogs. Storing and restoring your directories is much better. You really only need to use buldacct if migrating groups/accounts from one volume set to another.

Using buldacct for any other purpose will cause you more grief than you want, particularly if you utilize posix directories (and they are used whether you know it or not).

John Burke added:

I agree with Gilles about the DIRECTORY option being easier and less prone to error in your situation, but would add

1. If you are using user volumes, you must EXPLICITLY LIST all volume sets including the system volume set. From the HELP subsystem:

DIRECTORY: Specifies that the system accounting directory plus all HFS directories are to be stored. This option requires System Manager (SM) or system supervisor (OP) capability. If ONVS or SPLITVS is not specified, the DIRECTORY defaults to writing ONLY the system directory. Otherwise, the directories of the specified volume sets are written. This allows operators and managers to store or copy private volume sets in their entirety.

2. It doesn't hurt, and is in fact a good idea, to run BULDACCT occasionally - just in case.

Q: I have Samba running on 3 HP e3000s and have been running it for some time. Now, all of a sudden, I cannot connect to one of the HP e3000s. At the client I get the message: "The semaphore timeout period has expired." In log.smb I get the message: "Error writing 4 bytes to client. -1. Exiting". Any thoughts?

A: John Clogg replied:

I got that message from Samba when I first set up the RESLVCNF.NET file, thus enabling DNS name resolution. The problem, it turned out, was that the HOSTS file is no longer used, and our DNS server did not have a LOCALHOST entry. Make sure you have a LOCALHOST entry with address 127.0.0.1.

[Editor's note: I asked the above question and when John Clogg's note jogged my memory, I replied.]

Ah, he says, "they" were fiddling around with DNS last night and deleted the localhost entry. Now, if you read my initial post, you are asking yourself why did Samba/iX work on the other two systems? The answer is that one uses a HOSTS file and not DNS and the other has the NSSWITCH beta patch installed and was able to transparently use the HOSTS file when DNS failed on localhost. I knew it had to be related to what "they" did since I am not a big believer in coincidence but since I've been using Samba for over four years I'd forgotten about the localhost issue.

Q: We have a job stream that has the following:

SETJCW @.0 (no space before or after the '.'0)

On-line, I see that this resents all existing JCWs to 0, but can someone explain this syntax for me? I would understand:

SETJCW @=0

A: Duane Percox and Donna Garverick replied:

Ask MPE for HELP,

delimiter One or more punctuation characters or spaces, except % and ! and -. Whatever character is used will
delimit the name and value.

Stan Sieler offered a caution about the difference in SETJCW and SETVAR,

setvar foo $100 worked as expected (setting foo to 256)

and

setjcw foo $100 set it to decimal 100!

Q: What I want is to be able to do a listf and have the result returned to a system variable as a delimited string. For example, if I do a listf I get the following:

FILENAME

A B C D E F
G H I

I would like to create a variable that would look like: 'a,b,c,d,e,f,g,h,i'

A: Donna Garverick presented a nice CI script to accomplish the above, but Mark Bixby one-upped her with a one-line shell command,

INVENT3K:/BIXBY/PUB$ var=$(ls | tr "\n" ',' | sed -e s/.$//)