HP3000-L Archives

August 2000, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Glenn Cole <[log in to unmask]>
Reply To:
Glenn Cole <[log in to unmask]>
Date:
Mon, 21 Aug 2000 03:57:06 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (194 lines)
John Dass writes:

>I would like to know the following on the MPE iX 5.5
>system that I am using - any pointers will be greatly
>appreciated.

You came to the right place.  (How did you hear about this group?)
I'll take a first crack at your questions.

>1. Clear Screen command : Is there a CLS or CLEAR
>    command in MPE? I cannot find similar command.

I cannot tell if you're coming at this from a DOS or a UNIX perspective,
but for this query it doesn't really matter.

The short answer is that MPE does not have a built-in CLS or CLEAR command,
but you can roll your own pretty easily.

I'll assume that you have some means of creating text files on the 3000.
Personally, I swear by Qedit (the older, non-Windows version), though
opinions vary.

The direct answer to your question is to enter the following into a file:

   # esc-h = home, esc-J = clear display
   echo ![ chr(27)+"h" + chr(27)+"J" ]

Save the file as 'cls' or 'clear'.
At the MPE prompt, enter the filename as though it were a command
(it is now :) .  Your screen should clear.  This assumes that you're
using a "termulator" (as we've come to call "terminal emulators")
that knows how to handle HP terminal escape sequences.

On the off-chance you don't have one handy, there's a free version
under development and available from

   http://www.aics-research.com/qcterm/

But the question is, do you REALLY want the display memory cleared?
That is, HP terminals historically have allowed one to scroll back
to see recent activity.  Personally, I like to clear what is visible,
but I also prefer to preserve this "short-term memory."

Thus, rather than sending the cursor to the very top of display memory
and clearing it all, I send the cursor to the very BOTTOM and then send
the 'next page' escape sequence.  Usually, this works fine.  The commands are:

   # esc-F = home down, esc-U = next page
   echo ![ chr(27)+"F" + chr(27)+"U" ]

Some quick notes about these commands:

   1. you can safely infer that a leading '#' indicates a comment,
         that 'echo' is used as in DOS and UNIX, and that '+' is used
         to concatenate strings
   2. the ![] structure says to evaluate and dereference the contents of the
         brackets.  (A stand-alone variable can be dereferenced without the
         brackets, e.g., !varname, like $varname in UNIX.)
   3. chr(n) results in the character for ASCII value n; ASCII 27 = 'escape'

Pretty darned verbose for such a simple question; I should go to bed soon.


>2. Scripting Help : I came across some scripts and they
>    have the parm and anyparm commands in them, but
>    I cannot find any documentation on MPE scripting
>   so that I can learn more of such scripting commands.
>   The MPE manuals (which I just acquired) does not
>   have any info on this. Any website having this info?

Command files (as they're called on MPE) are indeed documented in some
MPE manual; try the MPE Commands Reference Manual.

HP has all kinds of documentation starting with

   http://docs.hp.com/

Be forwarned about the link near the top for "MPE/iX Operating System."
The linked page has many PDFs, but uses gratuitous JavaScript at the bottom,
and the HTML uses the abomination called "Dynaweb" which is seriously nasty
for navigating.  The biggest thing to remember:

   The blue disclosure triangles in the lower-left frame are your friends.

An easier-to-navigate format is available for MPE 5.5 and prior, starting
near the bottom of the above page (5.0 and 5.5 docs).

Another resource for learning MPE in general is Michael Hensley's
"Learning MPE" page at

   http://www.allegro.com/papers/learnmpe.html

For command files specifically, Tim Ericson of DenKor has devoted much
time and energy to create a site specifically focused on this.  You can
start with

   http://www.denkor.com/hp3000/command_files/

There's a link at the top of the page to several tutorials.


>3. PRIV file : How do I use BUILD to create a password
>    protected PRIV file?

You probably don't really want to do this; you just THINK you do. ;)

Between a lockword, file/group/account access rights, and ACDs (Access
Control Definitions), you're probably covered.


>4. What is the file that gets execute first when we login
>    to an account. The file that sets the command prompt
>   and the group to drop into, coz I want to change the
>   command prompt upon login and also change the group
>   where I drop into (the home group) to another. How to do
>   this?

By default, there is none, though in practice "something" happens.

MPE allows a designated "user defined command" (UDC) to be executed at
logon.  These specially-formatted UDC files can exist system-wide,
account-wide,
and/or just for a specific user name.  There can be a logon-time command
at each level (system, account, user).

See the DenKor link above for more on this.


>5. Is there a way I can put a command into a MPE machine
>    such  that all acounts have access to the command? If
>    so which account/group should I put it in? If I use the
>    setcatalog command, then will the command then be available
>    to all accounts. I only have manager user login security for
>    almost all  accounts where I need the command to be executed.

Absolutely.

(Be careful with :setcatalog, as you may inadvertently turn off
some existing commands.  If you have support from the system manager,
s/he may be able to add your command -- or an :xeq of your command file --
to the system UDC file.)

In addition to the built-in MPE commands, UDC files are searched,
followed by the groups named in the "HPPATH" variable.  (UDC files
are much more painful than command files, and so are not used quite
as much any more, though certainly they have their place.)

The above sequence is for implicit execution.

That is, you can say

   :xeq clear.pub.prod

to execute a command file explicitly.


>6. IMPT Question : When I run a process say print a MSG file,
>   and if the MSG file is empty, the print command just hangs. I
>   cannot even break it. I have to open another session and kill
>   the session where the print command hangs. I wonder if I can
>   actually kill the print process instead of the session. If so, how
>   can I see what the session is executing? SHOWJOB only shows
>   the sessions, but what about if I wanna see the process that the
>   session is executing and wanna kill that process only.

I'm surprised you cannot break it, but you don't have to kill anything
just to free that process.

MSG files, as you know, generally have only one reader but several writers.

If a reader opens it first, then the read hangs while awaiting a writer.
When the last writer closes the file, the  next read returns EOF.  (So that's
the solution to your hanging problem:  rather than abort the session, just
write a record to the MSG file.)


>7. What security level is needed for traversing through all accounts
>    on a MPE machine?

I'm not certain what you mean by "traversing...all accounts."  That is,
:LISTF works system-wide.  On the other hand, 'TD' capability is needed
to 'cd' to a given directory in the POSIX shell.  (I don't know offhand
if 'TD' is needed for :CHDIR as well.)


>A lot of questions ...  I did try to find out as much as I can but
>though I managed to learn much, these questions are still pending
>in my list and I would greatly appreciate any pointers/tips/tricks.

No worries.  The above links should provide a good start.  Feel free
to post here again when you have more questions.

--Glenn

ATOM RSS1 RSS2