X-Mailer: ELM [version 2.3 PL11]
Newsgroups: bit.listserv.notis-l
Date:         Fri, 22 Jan 1993 09:27:37 EST
From:         timothy@ASA.UGL.LIB.UMICH.EDU
Subject:      Re: NOTIS 5.1 locked terminals
Comments: To: NOTIS-L@VM.TCS.Tulane.EDU
              at Jan 19, 93 11:56 am

Peggy Seaquist writes:
>
>     Here's a quick question for NOTIS 5.1 sites (or those on the
> way to NOTIS 5.1).  We at Auburn are thinking that we may not want
> to use NSYS to define which terminals are locked into OPAC.  Instead
> our SYS1 maintains a table with all terminals we want locked in OPAC
> and uses this to set taskid causing LNAV to come up upon logon.
>     This works all well and good except when the user tries to exit
> (with clear, for example) and then gets a blank screen when we drop
> back to CICS.  But as soon as a key is pressed, CICS recognizes the
> terminal as locked and (poof) LNAV comes up again.
>     What I need to do is to insert some code somewhere to check
> for locked terminal at the time user presses clear.  I see that
> LPC100P has code to check the terminal options byte for the
> appropriate terminal record in the lcrfile.  Where in 5.0.2 is the
> code that checked for opid=#$# ?  I'm not sure where would be the
> best place to put code to do what CICS is doing to determine whether
> a terminal is locked or not.
>     If anyone is also using this plan of attack, how'd ya do it?
> Might there be a good reason for NOT doing it this way, and just
> using NSYS to call these locked?  Thanks in advance for any help
> you can offer!
When I first read this, I wondered why Peggy would want to do this,
but then I thought a bit and remembered that if you really want to
lock terminals into opac, you have to mess with the TCT anyway
(to set the TRANSID so that the terminal will come up in OPAC
initially), so using the OPERID=#$# to disable the stop command
still makes sense.  Although we use NSYS terminal control to do it,
here's how you could do it using the opac user exit, LPC900P, as
someone already mentioned:

 013496 PROCCLR  DS    0H
 013497          ST    R14,DSR14LV1        SAVE RETURN REGISTER
 013498          EXEC  CICS ASSIGN OPID(DSOPID)
 013499          CLC   DSOPID,=CL3'#$#'    LOCKED?
 013500          BNE   PCLREX                NO, CONTINUE
 013516          MVC   OPACUTRN,OPACUOTR     YES, SET FOR OPAC RESTART
 013520 PCLREX   DS    0H                  EXIT POINT
 013521          L     R14,DSR14LV1        RESTORE RETURN REGISTER
 013522          BR    R14                 RETURN
Lines 13498-13516 are added.  Also, in the dynamic storage area you need:

 008700 ***********************************************************************
 008800 *                                                                     *
 008900 *        USER DYNAMIC STORAGE AREA                                    *
 009000 *                                                                     *
 009100 ***********************************************************************
 009200          SPACE 1
 009210 DSOPID   DS    CL3                 OPERATOR ID FROM EXEC ASSIGN
 009300 *  SUB-ROUTINE LINKAGE STACK.
Line 9210 is added.

Hope this helps.

Timothy Prettyman
Library Systems Office          313-764-0412
University of Michigan          INTERNET:  timothy_prettyman@umich.edu
Ann Arbor, MI  48109-1185       BITNET:  USERLM5C@UMICHUM
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU