HP3000-L Archives

July 2000, Week 4

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:
Jeff Kell <[log in to unmask]>
Reply To:
Jeff Kell <[log in to unmask]>
Date:
Sat, 22 Jul 2000 14:59:36 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (86 lines)
John Dass wrote:

> I am pretty new to HP3000 and MPE and since I am learning from
> other's notes (do not have a manual) and also from the web documents
> from HP website, I am still fumbling on a few issues and would like
> your advice/pointers . I believe I am using MPE 5.5.
>
> 1. Is piping allowed on MPE platform? For instance, can you do a
> print command with a more? Example : #PRINT <filename> | more

Not in the MPE command interpreter (CI).  You can do Command
Input/Output Redirection (CIOR) using <, >, and >>, but no pipes.

If you are on 5.0 and later, you have the posix shell (getting it setup
correctly is an exercise in itself on 5.0 and 5.5 but supposed
to run OK out of the box on 6.0 and above).  If you do a

   :setcatalog hppxudc.pub.sys;append
or :setcatalog hppxudc.pub.sys;system;append (by the system manager)

you have the :sh command defined which invokes the shell.  Otherwise you
can :sh.hpbin.sys -L to invoke it.  Inside the shell you are pretty much
posix/unix-like and you can pipe.  Traditional MPE commands, such as
:print, have to be invoked via a wrapper:

   posix/ix> callci 'print filename'|more

because the shell doesn't know about the MPE print (MPE commands are
by-and-large not simply executables in the current path; they are
instead like 'internal' shell commands to the CI).

> 2. How do you GREP files? I want to print out lines that only
> contains the text I want (and line numbers too if possible).
> Something like this example :
>           # LISTFILE DAT@ | GREP "E500"

In the shell:   grep E500 DAT*

You can invoke posix commands from the MPE CI by either adding hpbin.sys
to the variable HPPATH, or by running <command>.hpbin.sys.
This only works when there are no wildcards, however, as the MPE CI does
not do wildcard expansion.  If you were just grep'ing DATFILE for
example, you could (from MPE directly) do:

   :grep.hpbin.sys "E500 DATFILE"

(You need to quote the args list from MPE CI).

> 3. I understand from browsing through this newsgroup that there is a
> diff command in MPE. Is that default in MPE system and does it work
> just like Unix diff. I cannot find the diff command in the manuals I
> read from the HP website, can you point me somewhere there is notes
> on this?

Again, in the shell, diff.  But since you sound like an MPE newcomer
with some unix background, note that:

   MPE format:   file.group.account    and
   HFS format:   /ACCOUNT/GROUP/FILE

are equivalent (and case sensitive when using HFS[unix] style naming
conventions).  Some MPE commands don't support HFS names, but ALL posix
commands require HFS names (if the filename is qualified beyond the
current working directory).

> 4. How do I make a TEMPORARY file PERMANENT ? I know I can delete
> the file using command #PURGE <filename>, TEMP. But supposing I need
> to keep it, then how do I make it permanent. I realised that when
> you logoff from the session, the TEMPORARY files are automatically
> erased.

Just  :SAVE <filename>.  This will generate an error if you have
duplicate file names in permanent and temporary filespace domains.
Then you :PURGE <filename>,TEMP and :SAVE <filename>.

> I am sorry if any of the questions above are too obvious for you,
> please help me as I am new to this environment. Any pointers or
> suggestions will be GREATLY appreciated.

Look into posix if you are of a unix mindset, it is a lot like a basic
unix shell and can eliminate some of your frustrations.  But it may
add some frustrations of its own since posix is not exactly like unix
either.

Jeff Kell <[log in to unmask]>

ATOM RSS1 RSS2