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:
Tracy Pierce <[log in to unmask]>
Reply To:
Tracy Pierce <[log in to unmask]>
Date:
Mon, 21 Aug 2000 07:30:19 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (163 lines)
> From: John Dass [mailto:[log in to unmask]]
> Subject: PLS HELP : MPE Commands
>
> 1. Clear Screen command : Is there a CLS or CLEAR
>     command in MPE? I cannot find similar command.
Clear Screen is implemented as a terminal function in the world of HP3000.
The standard terminal used with the system is any variant of an HP264x;
these all respond to an HP-standard set of escape sequences.  To clear your
screen from the current cursor position, make the terminal receive the
sequence ESC-J, either by typing it at the terminal or by passing it this
bit of data.
Also try ESC-H (cursor home-up) ESC-K (clear line) and of course there are
lots more; I'm running into my usual failure searching HP for a list of
these, but it's out there somewhere.

> 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?
ANYPARM is notoriously glossed over in the documentation; you basically use
it in spots where you don't know or care about how many parameters you're
being handed at the time; the parms are all lumped together and treated as a
lump.  This (MPEX) STREAM UDC is a pretty good example.  Its true purpose is
to invoke MPEX to supply passwords for the job being streamed, but in the
course of this it must pass all of its parameters on to the program that's
going to do the actual STREAM; ANYPARM does that pretty nicely:

STREAM
ANYPARM ALLPARMS=![""]
COMMENT these 2 jcws prevent STREAMX from looking deeper than it should...
SETVAR STREAMXPERMNONEST 1
SETVAR STREAMXPERMNONESTERROR 1
IF BOUND(HPPIN) THEN
  COMMENT ** Loading UDC parm into variable handles embedded quotes.
  COMMENT ** Using HPPIN handles process-handling environments.
  ECHO >VE!HPPIN !ALLPARMS
  INPUT VE!HPPIN<VE!HPPIN
  SETVAR VE!HPPIN LTRIM(VE!HPPIN)
  PURGE VE!HPPIN,TEMP>$NULL
  IF POS('"', VE!HPPIN)<>0 THEN
    IF POS("'", VE!HPPIN)<>0 THEN
      SETJCW INSIDEMPEX=0>$NULL
      IF INSIDEMPEX=0 THEN
        ECHO ERROR: You can't use ' and " quotes together outside of MPEX.
      ELSE
        RUN MAIN.PUB.VESOFT;INFO=VE!HPPIN;PARM=%1421
      ENDIF
    ELSE
      XEQ MAIN.PUB.VESOFT;INFO='![VE!HPPIN]';PARM=%1421
    ENDIF
  ELSE
    XEQ MAIN.PUB.VESOFT;INFO="![VE!HPPIN]";PARM=%1421
  ENDIF
  DELETEVAR VE!HPPIN
ELSE
  XEQ MAIN.PUB.VESOFT;INFO='!ALLPARMS';PARM=%1421
ENDIF
%


> 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 can password-protect a
non-PRIV file by using a lockword, which can be applied via a RENAME, et
al...
:RENAME DOSSIER,DOSSIER/SECRET

>
> 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?
It's known as a LOGON UDC.  Command files come in two flavors, the first and
older method is called UDC's.  UDCs are a bit strange in that many commands
can be stored in one file, in which they're separated by lines of asterisks.
Another feature is that once created they're applied to groups of users at 3
different levels: SYSTEM, ACCOUNT, USER.  So we might build something like
this:

SOMENAME
OPTION LOGON,NOBREAK
CONTINUE
RUN MYPROGRAM
BYE
***

save the file as (anyname, but try something descriptive, such as
MYACCTUDCS.  Then (AM account manager capability required for this) we'd say
SETCATALOG MYACCTUDCS;ACCOUNT.
Voila, anybody who logs on to this account will now be assigned the
'catalog' of commands we built into MYACCTUDCS.  The first UDC User Defined
Comand (and the only one, in this example), named SOMENAME, with its OPTION
LOGON designation, forces the user who just logged on to run MYPROGRAM, and
when they exit from MYPROGRAM, they'll get logged off via the BYE.

Note that you only get ONE UDC at each level (USER ACCOUNT or SYSTEM) with
the OPTION LOGON designation; there's no warning if you specify more, only
the first will work.

> 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.
Yes, this is the newer form of (user defined) COMMANDS, known simply as
command files.  For example lets build a file called LF.PUB.SYS, which
contains
LISTF,2
Now any user who happens to "see" that file can use it as a command.  They
could specifically type "LF.PUB.SYS" which would result in the LISTF,2
command getting executed.  Or if PUB.SYS happens to be on that user's 'path'
(try SHOWVAR HPPATH), the file will be found by simply typing LF.  Pretty
sloppy explanation but it will get you started.

> 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.
MSG files were (IMHO) implemented a little bit imperfectly, but for backward
compatibility have never been fixed to right this icky default.  Once you
invoke a (default) read vs a MSG file, you're stuck in that read until a
record shows up on the message file.  Generally the desired effect, since
MSG files are designed to have the reader sit & wait for a record.  In a
pinch, rather than abort the session, you can simply write some data to the
file from another session; that will satisfy the pending read request.
(Also there are options you can set (FCONTROL 45???) which will change this
behavior, but not before it bites you.  In a nutshell, don't try to read an
empty message file interactively.

> 7. What security level is needed for traversing through all accounts
>     on a MPE machine?
SM (System Manager) can basically do anything to any account or account
member.
AM (Account Manager) ditto but only within his account.
Virtually any user can SEE all the files on the system; if they have READ
access to the ACCOUNT and GROUP and FILE, they may look at the contents.
If no READ ACCESS at any of these levels, no read!

>
> 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.
Good luck!
Tracy Pierce
Golden Gate Bridge


>
> Thanks in advance to all who respond.
>
> Cheers!
> John
>

ATOM RSS1 RSS2