HP3000-L Archives

October 1997, Week 2

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:
Tony Knowles <[log in to unmask]>
Reply To:
Tony Knowles <[log in to unmask]>
Date:
Fri, 10 Oct 1997 10:14:26 +1300
Content-Type:
text/plain
Parts/Attachments:
text/plain (215 lines)
Jeanette

Pretty much what he said! Our version is COBOL and I think was submitted to
CSL in the late 80's. I blew the dust off the following DOC file, I can
send you the source if interested.

Program: OPREPLY

         Requests response from Operator to user-defined question

Authors: Harold Wilson & Tony Ng,
         ACI Computer Services, Auckland, New Zealand
         (Now known as GE Capital IT Solutions)

Requirements: HP3000 running MPEV U-mit or greater.
              No special capabilities required.


Introduction
------------

This program is for use in job streams which need to interact with the
Operator. Requests can be sent to the operator, which require a single
character answer. The possible answers are defined to the program and
the program will continue to request a response until the operator
gives a correct answer. Once an answer is received the ASCII value of
the character is put into the JCW 'REPLY' (must be value as the JCW's
cannot hold characters!).

The program can be given the input parameters via the INFO string, or
simply include them on the next line after the run command. If there
is no INFO string, the next line of the jobstream will be read.


Input Parameters
----------------

Input to the program consists of the operator message, a semicolon,
and the possible characters which the operator can reply with, eg

Number of disc drive to use(1-3)?;123
^                                ^
Question for Operator            Delimiter

                                   ^Possible replies

The input paramter can be in the INFO string, eg

   :RUN OPREPLY;INFO="Number of disc drive to use(1-3)?;123"

or in the jobstream, as in

   !RUN OPREPLY
   Number of disc drive to use(1-3)?;123

Using INFO is better for UDC's, eg

   OPREPLY INFO
   RUN OPREPLY;INFO="!INFO"
   **

Invoked by

   :OPREPLY "Number of disc drive to use(1-3)?;123"



Example
-------

Below is a jobstream using the program OPREPLY, and showing the
job output and the operator dialogue.

     !JOB MGR.VEGAS
     !RUN OPREPLY;INFO="OK to run Backup (Y/N)?;YN"
     !IF REPLY <> 89 THEN
     !  COMMENT 89 is ascii value for Y
     !  TELLOP BACKUP WILL NOT BE RUN!
     !  EOJ
     !  ENDIF
     !CONTINUE

The console will have the following dialogue:

     19:58/#J339/51/LOGON FOR: OPREPLY,MGR.VEGAS,PUB ON LDEV #10

     ?19:58/#J339/292/OK to run Backup (Y/N)? (MAX CHARS.=1)?

     :REPLY 292,X
     :
     19:59/#J339/292/Invalid reply, please rekey
     ?19:59/#J339/292/OK to run Backup (Y/N)? (MAX CHARS.=1)?

     :RECALL
     THE FOLLOWING REPLIES ARE PENDING:
     ?19:59/#J339/292/OK to run Backup (Y/N)? (MAX CHARS.=1)?

     REPLY 292,Y
     :
     19:59/#J339/51/LOGOFF ON LDEV #10

Note the effects of the incorrect reply, and of the RECALL command.

The $STDLIST from the jobstream is as follows:

     :JOB OPREPLY,MGR.VEGAS,PUB
     PRIORITY = DS; INPRI = 8; TIME = UNLIMITED SECONDS
     JOB NUMBER = #J341
     WED, SEP 16, 1987,  7:58 PM
     HP3000 / MPE V  G.B2.02 (BASE G.B2.02).

#######################################################################

     :RUN OPREPLY;INFO="OK to run Backup (Y/N)?;YN"

     Operator Reply is:Y  (Ascii   89)

     END OF PROGRAM
     :IF REPLY <> 89 THEN
     *** EXPRESSION FALSE: COMMANDS IGNORED UNTIL MATCHING ENDIF/ELSE
     :  COMMENT 89 is ascii value for Y
     :  TELLOP BACKUP WILL NOT BE RUN!
     :  EOJ
     :  ENDIF
     *** RESUME EXECUTION OF COMMANDS
     :CONTINUE
     :SHOWJCW
     JCW = 0
     CIERROR = 0
     REPLY = 89
     :EOJ
     CPU SEC. = 1.  ELAPSED MIN. = 1.  WED, SEP 16, 1987,  7:59 PM


Tony Knowles     [log in to unmask]
                 [log in to unmask]

----------
> From: [log in to unmask]
> To: [log in to unmask]
> Subject: Re: PRINTOPREPLY  equivalent in a Job
> Date: Wednesday, 8 October 1997 23:23
>
> Jeanette,
>
> We had a similar situation back in our site in the MPE/V days and I wrote
a
> small program that would do the trick.   The program accepts, through the
> info string, the name of a JCW to set and a message, up to 170
characters,
> that it then displays to the console.  The operator is presented with a
> choice of Y,N or R (R is used to redisplay the entire message since it
may t
> have scrolled off the screen).  The program receives the operators reply
> sets the specified JCW to a 1 for a reply of 'Y' and 0 for a reply of 'N'
> and terminates.  The JCW is checked and the job proceeds or terminates.
>
> The code is in Pascal and I can make it available if you'd like.
>
> Regards
>
> Paul H. Christidis
>
> Example:
>
> A. What the programmer would issue:
> :GETREPLY "Usersoff/Have all the FINANCE users logged off?"
>
> GETOPREPLY (V 89.11.21) PHC - WED, OCT  8, 1997, 10:16 AM
>
> Usersoff
> Have all the FINANCE users logged off?
>
> B. What the operator would see:
> :RECALL
> THE FOLLOWING REPLIES ARE PENDING:
> 10:16/#S1967/258/! REPLY --> Y/N or [R] - Repeat message! (MAX CHARS.=1)?
> :REPLY 258,R
> :10:19/#S1967/258/Have all the FINANCE users logged off?
> ?10:19/#S1967/258/! REPLY --> Y/N or [R] - Repeat message! (MAX
CHARS.=1)?
>
> :REPLY 258,Y
> :
>
>
>
> ______________________________ Reply Separator
_________________________________
> Subject: PRINTOPREPLY  equivalent in a Job
> Author:  Jeanette and Ken Nutsford <[log in to unmask]> at CCGATE
> Date:    10/08/97 08:41 AM
>
>
> We wish to set up a job that needs to be streamed at a specific time
each=
>
> day but we do not want the job to start running any programs at that
time=
> =2E
> We need to be able to issue a command equivalent to the PRINTOPREPLY
> intrinsic. ie send a message to the console requesting a reply. When the
> reply is received the job needs to check the reply and decide whether it
> can continue or issue another 'PRINTOPREPLY' request.
>
> Has anyone done this? We cannot find any command that will do this. The
> INPUT command will only send a message and wait for a response from
$stdi=
> n.
> We need an option to do the same to the console.
>
> Jeanette Nutsford
> Computometric Systems Ltd
> <[log in to unmask]>

ATOM RSS1 RSS2