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 editor@3000newswire.com, or fax them to 512.331.3807.

I need to perform a “tobyte” on a set of files. I have been doing the following manually for each file:
shell/iX> tobyte -at ./abcd.html abcd.new
shell/iX> rm abcd.html
shell/iX> mv abcd.new abcd.html
I’d like to use wildcarding, but apparently I’m misunderstanding how it works. The wildcarding I’m used to (such as mv *.html newhome/*.html) doesn’t seem to work with tobyte.

Gavin Scott replies:

The thing you have to keep in mind is that in Unix/Posix, wildcards are simply a convention implemented by the shell programs. They are not an OS concept as they are in MPE.

When you type a command like ‘ls a*’, the shell expands the wildcard before passing the command line to the program. So if you have files a1, a2, and a3 in the current directory when you execute the above command, what the shell executes is ‘ls a1 a2 a3’. The ‘ls’ command has no clue that you originally entered the command with wildcards. Also, if you have a lot of files, it’s very easy to overflow the command buffer with too many characters of filenames.

Something like ‘mv *.html newhome’ will work, since the destination is taken as the last parameter, and if it is a directory the files are put into that directory with their same names. A command like ‘mv a* b*’ will likely give you one of the two errors: mv: target “b*” must exist if there are no files named b<something> or mv: target “b<something>” must be a directory if any files starting with b exist, unless the last named one happens to be a directory – in which case all your a<something> and b<something> files will end up in that directory!

I hate to sound like a dummy, but what the heck is ‘HWMPUT’? I’ve even checked our manuals and can’t find anything.

Wirt Atmar replies:

There’s absolutely no reason for you to feel like a dummy on this one. HWMPUT stands for “high-watermark put (first).” It is a relatively recent enhancement that was put into IMAGE at the suggestion of Mike Hornsby of Beechglen Development. Mike’s customers tend to be large HMOs who process large numbers of records. The rationale behind HWMPUT was that with this flag set, all new records (new DBPUTs) would start at the “high-watermark” and move forward, into previously unused space in IMAGE datasets.

The advantage of doing this would be that all of these chronologically-entered records would have very good “locality” (i.e., they would be physically next to each other on the discs), and thus much faster to read and retrieve than if they were simply filling up all of the empty spaces in the dataset first, as is the default condition in IMAGE – and therefore wind up being scattered all over a disc, in a much more fragmented fashion.

If you use the restore ;directory method to recover users, how do you get their UDCs reset?

Gilles Schipper replies:

I suggest the following:

1. :restore *t;;directory (note two consecutive semi-colons) This restores all directories – including one system directory, Posix directories, and any volume set directories you may have. This step restores no other files.

2. :restore *t;@.@.@;show=offline;keep;olddate;create. This restores all other files. If you are sure you do not want any files restored to your non-system volume sets, you can simply VSCLOSE uservolumesetname prior to 2 or 1 above, and ignore the many lines of error messages which will accompany each file not restored. It may be better to simply exclude those filesets. That way, the only legitimate FILES NOT RESTORED would be those that already exist. Any other reason should be cause for concern.

After completion of step 2, you will have all your UDCs in place the next time you log on. To get your networking back, you will need to first perform a START NORECOVERY. This method is far easier and less error-prone than using BULDACCT to unnecessarily rebuild your directory. In fact, the only time I would use BULDACCT is if I did not have a directory available on a store tape, or if I was moving accounts/groups to or from non-system volume sets.


Copyright 1998, The 3000 NewsWire. All rights reserved.