Q From:	CSBVAX::MRGATE!COLEMAN%UMBSKY.BITNET@CUNYVM.CUNY.EDU@SMTP 11-APR-1988 12:05  To:	ARISIA::EVERHART6 Subj:	Setting your process prompt to the current time.    O Received: from MITVMA.MIT.EDU by KL.SRI.COM with TCP; Sat 9 Apr 88 11:31:43-PDT L Received: from UMBSKY.BITNET by MITVMA.MIT.EDU ; Sat, 09 Apr 88 14:31:08 EDT! Date:     Sat, 9 Apr 88 01:38 EDT 0 From:     <COLEMAN%UMBSKY.BITNET@MITVMA.MIT.EDU>: Subject:  Setting your process prompt to the current time. To:       INFO-VAX@KL.SRI.COM . X-Original-To:  "INFO-VAX@KL.SRI.COM", COLEMAN  C > From:         Mingo <pitt!cisunx!rnmst1@cadre.dsl.pittsburgh.edu> & > Subject:      Setting prompt to time > C > I am accustomed to having the current time as my prompt using the A > extended prompt facilities of tcsh, and was wondering if it was F > possible if I could have something similar set up on VMS.  I realise< > that it would have to be done something like the following > command procedure:  J    Here's a DCL procedure I wrote which does the very thing you asked for.D It's got one slight problem (see "BUGS") but it takes care of almostG everything you'd probably want to do. If anyone finds a solution to the > "BUGS" part, send me the correction. (I never bothered to try)  ,                                        Steve    O ----------------------------- cut here ----------------------------------------  $!+++   +++   +++  $! $!   MODULE.... DCL  $!7 $!   AUTHOR.... Steve Coleman                  05/18/87 " $!              Computing Services5 $!              University of Massachusetts at Boston $ $!              Boston Ma 02125  USA( $!              Bitnet:   COLEMAN@UMBSKY $! $!   MODIFIED.. none $!I $!   ABSTRACT.. This module was written to provide the user with a prompt , $!              made up of the current time. $!I $!   CALL...... @DCL   (probably best used if executed in LOGIN.COM file)  $!7 $!   BUGS...... Anything which requires a double quote. - $!              (e.g. SET PROC/NAME="string")  $!---   ---   ---        $!+++   +++   +++  $!I $!   Set up traps for errors and warnings. Build PROMPT from current time & $!   and set the process prompt to it. $!M $!   Read a command and take appropriate action. STOP, EXIT and EOJ allow one   $!   to exit from the procedure. $! $!---   ---   --- # $    ON CONTROL_Y THEN GOTO GET_CMD 
 $ GET_CMD: $    ON ERROR THEN GOTO GET_CMD ! $    ON WARNING THEN GOTO GET_CMD 3 $    PROMPT = "<" + F$EXTRACT(12,8,F$TIME()) + "> " 1 $    ASSIGN/NOLOG/USER_MODE SYS$COMMAND SYS$INPUT ) $    INQUIRE/NOPUNC XYZZY_CMD "''PROMPT'" , $    IF XYZZY_CMD .EQS. "" THEN GOTO GET_CMD( $    IF ((XYZZY_CMD .EQS. "EXIT") .OR. -(          (XYZZY_CMD .EQS. "STOP") .OR. -0          (XYZZY_CMD .EQS. "EOJ")) THEN GOTO FINI $    'XYZZY_CMD' $    GOTO GET_CMD        $!+++   +++   +++  $!% $!   Let's go back to a "normal" DCL.  $! $!---   ---   ---  $ FINI: O ----------------------------- cut here ----------------------------------------   