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. How much information can a 2400-foot reel of tape contain -- in theory? Maybe the better question is whats the equation for calculating this? John Zoltak replies: The actual density is 6250BPI (bits per inch), so it would be 6250 x 12 inches x 2400 feet = 180,000,000, or 175.78 Mb (a Mb is 1,024,000 bytes).We can use this calculation as bytes, because the tape has nine tracks, one for each bit plus parity. But practically, I measured and found that on good tapes I consistently got 140Mb. Is there a way in MPE to compare the contents of two files to see if they are the same? James Clark, Jr. replies: Use the command Andreas Schmidt adds: You can use comm from the Posix
shell: comm locates identical lines within files sorted in the same collating sequence, and produces three columns; the first contains lines found only in the first file, the second lines only in the second file, and the third lines which are in both files. In the options, -1 suppresses lines that appear only in file1; -2 suppresses lines that appear only in file2; -3 suppresses lines that appear both in file1 and file2. Is there any way to make a 3000 program execute when a user logs in, just like .profile does in many operating systems? Jim Phillips replies: On the HP 3000 you would set up a User Defined Command file (using a text editor) that looks like this:
Then you would hook the users you wanted to the UDC by issuing the SETCATALOG command: SETCATALOG UDC;USER=USERNAME We have several processes which require us to copy files from one 3000 to the other. Are there any parameters (or other tools) which will allow DSCOPY to keep the creation dates and times from one system when copied to another? I was searching for a parameter similar to the KEEPAMDATES or KEEPATTR parms which can be used in Vesofts MPEX COPY command. Donna Garverick replies: DSCOPY all on its own wont preserve the date and time stamps as far as I know. There are other free tools that might do this (quoting from Michael Hensley, Mark Bixby and others): MOVER (formerly RYDER): Found in the TELESUP account, and several versions are in PUB.FREEWARE; various incompatible versions exist, some of them with the same version number! It fully preserves MPE file attributes and account structure. LZW: On the FREEWARE tape, contributed by Telamon. Versions are available from Telamon for a large number of platforms. Preserves MPE file attributes, and some account structure. POSIX tar and compress: Bundled with POSIX on MPE/iX 5.0 and later. Files can be exchanged with MPE, Unix, and PCs. Does preserve MPE attributes as of MPE/iX 5.5 (including timestamps) but only if also unpacking on MPE/iX 5.5 or later. MPE/iX 5.0 tar is unable to extract and reconstruct MPE attributes from a 5.5 tar file. John Burke adds: The only way I know how to do it is via a STORE/RESTORE, using HPs or third party utilities. Now, if their store/restore utility allows for store-to-disk, then they can store the files to disk, DSCOPY the resulting file to the archive machine and then restore with the OLDDATE option. Kind of kludgy, but should be workable. How do I remove the UDC
setting for a user if it is no longer necessary? Is there any way to make a
message print on the screen such as Loading XYZ program within
the UDC file? For your first question, SETCATALOG ;user=<user ID> To make the message print on the screen,iInclude the following just before your programs :RUN statement:
This assumes that youre
executing the UDC from a terminal. If youre executing it from within
a batch job, and you want the message to display on the system console,
substitute TELLOP for the ECHO. HPs Jeff Vance adds:
John Burke replies: Ah, an issue recently near and dear to me, since I am loath to reboot any of our systems just to clear up a hung session. You do not say though what you mean by a hung session; however, one piece of advice in general from bitter experience: NEVER, NEVER, NEVER do an ABORTJOB on a VT session that may be in a compromised state; instead, use NSCONTROL KILLSESS=#Snnn If you use ABORTJOB first and it does not work, then you are hosed. (Thats a highly technical term). Ive never had NSCONTROL KILLSESS=#Snnn fail to abort a session when used first on VT sessions. By the way, if you do not know for sure if it is a VT or DTC session, NSCONTROL KILLSESS=#Snnn will do no harm to DTC sessions, giving you only a DSERR. On DTC connections, some
combination of ABORTJOB, ABORTIO, and, if all else fails, a reset of the
port either through TERMDSM or OPENVIEW DTCMGR has always worked for me.
(Well, at least since MPE/iX 5.0.)
Try this command file: This is an important POSIX/Unix concept: when you type a command in the shell (pretty much any Unix shell), the shell expands the wildcards. Utilities like grep do not know how to process filenames with embedded wildcards. They do handle a list of filenames, though. For example, if you type: The MPE CI doesnt do wildcard expansion. Some commands (like PURGE), and some utilities (like DSCOPY) handle wildcarded filenames on their own. Learning this concept is key to using the Posix utilities from the CI. How do I get PSCREEN to output to disk?
You could double the characters so they are preserved when passed via INFO=. The patch MPEKX44C (current) or MPEKX76A (PowerPatch 4, MPE/iX 5.5) or MPEJXQ1 (original) give you the QUOTE() CI string function. Thus you should be able to do:
QUOTE() returns the input string with all quotemarks doubled. Is there a way to list files by date and time? I also want to see them in sequence of date and time.
In the Posix shell, you can use ls -lt; from the CI (the : prompt), you can type :ls.hpbin.sys -lt; or, if HPBIN.SYS is in your HPPATH, simply type :ls -lt.
You can do this with MPEX, a third-party product from Vesoft. Even if your shop is not likely to purchase such products in the near future, this one is well worth any investment. Its not tiered, so that the cost is reasonable no matterwhat size machine you have. Out of the box even MPEX will
not do it, but you could create customized routines for MPEX to do it. I
have created MPEX routines that will produce sorted listings of a fileset
by creation date, modification date, access date, sectors ascending and
sectors descending. |
|||||
Copyright 1998, The 3000 NewsWire. All rights reserved. |