HP3000-L Archives

May 2004, 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:
"Emerson, Tom" <[log in to unmask]>
Reply To:
Emerson, Tom
Date:
Thu, 20 May 2004 09:48:14 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (91 lines)
> -----Original Message-----
> From: Denis St-Amand
> 
>  Hum, can you give us an example of line starting with a 
> single (or double colon) ?

Within MPE, the explicit end-of-file/end-of-data commands are :EOF and :EOD.  This is at a pretty low level I believe, so if you were to enter this as you were [say] editing a jobstream, you get nasty aborts:

:editor
HP32201A.09.00 EDIT/3000 THU, MAY 20, 2004,  9:12 AM
(C) HEWLETT-PACKARD CO. 1993
/a
    1     !job whatever,mgr.demo
    2     !run anyprog 
    3     data for this run
    4     :eod
 
+-F-I-L-E---I-N-F-O-R-M-A-T-I-O-N---D-I-S-P-L-A-Y+
!  FILE NAME IS EDITIN                           !
!  FOPTIONS: NEW,ASCII,$STDINX,U,NOCCTL,FEQ      !
!            NOLABEL                             !
!  AOPTIONS: INPUT,NOMR,NOLOCK,DEF,NOBUF,MULTI   !
!            WAIT,NOCOPY                         !
!  DEVICE TYPE: 16     DEVICE SUBTYPE: 0         !
!  LDEV: 11       DRT: 0         UNIT: 0         !
!  RECORD SIZE: 80     BLOCK SIZE: 80    (BYTES) !
!  EXTENT SIZE: 0      MAX EXTENTS: 0            !
!  RECPTR: 0           RECLIMIT: 0               !
!  LOGCOUNT: 0            PHYSCOUNT: 0           !
!  EOF AT: 0           LABEL ADDR: %00000000000  !
!  FILE CODE: 0        ULABELS: 0                !
!  FILE OWNER:                                   !
!  ERROR NUMBER: 0     RESIDUE: 0                !
!  BLOCK NUMBER: 0            NUMREC: 1          !
+------------------------------------------------+
END OF INPUT FILE
END OF FILE ON $STDINX. CAN NOT ACCEPT FURTHER TERMINAL INPUT.

END OF SUBSYSTEM
:

The stream processor replaces all of the "colon replacement characters" at the start of the line at the time it processes the file, hence you can type "!EOD" in the editor as you add lines and not cause an abort.

The command processor (shell) uses the :EOD to determine when to restart in the case of an abort.  for instance, if you had a job like this:

   !CONTINUE
   !run anyprog
   data line 1
   data line 2
   data line 3
   !eod
   !run nextprog

On the face of it, if "anyprog" aborted while processing line 2, the !continue is in effect and would cause the shell to try to process "data line 3" as a command, however the :EOD indicates the end of the expected input for "anyprog", so the command processor can skip the unused data lines.  Some programs will treat a line beginning with a colon as an "end of file" condition, but this is strictly because the program itself made the determination, not the OS.

Now, back to the question: 

>  Hum, can you give us an example of line starting with a 
> single (or double colon) ?

many MPE programs will accept lines beginning with a colon to indicate "this should be passed to the command intrinsic".  This is generally for on-line convenience, but also allows for programs running in a batch environment to not have to "back out" of whatever state they are in.  Again, using the editor as an example, say you had a job that assembled various :LISTF's into a report of some sort.  You migth do it like this:

  !job report...
  !editor
  add
    <heading text>
  //
  :listf [log in to unmask],2;temp
  join temp
  :listf [log in to unmask],2;temp
  join temp
  add
    <footer>
  //
  keep report
  exit
  !dsline mainoffc=overseas,...
  !remote hello ...
  !dscopy report to report,mainoffc
  !eoj

Here you want the "listf" to take effect within the editor.  In this particular example, you can use "!listf" in the lines and the stream procesor will change them to ":listf" at runtime, but the system WON'T complain about the explicit ":listf" [though I suspect this wasn't always true...]

> Steamx/3000, there are
> some features requiring use of "::" at beggining of line.  

Yes.  Streamx uses "::" lines to indicate special at-submission-time processing needs to occur.  The primary uses are prompting for variables [with validation] and conditional submission -- for instance, if you have a job that processes an extra data set on certain days, you would either have to maintain two seperate jobstreams or include some logic to decide whether or not to do the additional processing "at runtime".  With a streamx ::IF statement, you can make the decision at submission time so that the resulting job contains "only the lines needed" to accomplish it's task.

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2