ASMB,L,C,R
      HED DBLCK AND DBUNL SUBROUTINES FOR REMOTE ONLY ACCESS
      NAM DBLCK,7 92069-16243 REV.1912 790130 
* 
* 
******************************************************************* 
* (C) COPYRIGHT HEWLETT-PACKARD COMPANY 1979. ALL RIGHTS RESERVED.
* NO PART OF THIS PROGRAM MAY BE PHOTOCOPIED, REPRODUCED, OR
* TRANSLATED TO ANOTHER PROGRAM LANGUAGE WITHOUT THE PRIOR WRITTEN
* CONSENT OF HEWLETT-PACKARD COMPANY. 
******************************************************************* 
* 
* 
*     SOURCE:    92069-18243
*     RELOC:     92069-16243
* 
*     PRGMR:     CEJ
* 
* 
******************************************************************* 
* 
* 
* 
*  This version of DBLCK is for remote only data base access.  It assumes 
*  that the data base is remote and merely provides an interface between
*  the user and RBLCK which handles the remote Lock.
* 
*  The calling sequence for DBLCK is: 
* 
*         JSB DBLCK 
*          DEF *+5        return point
*          DEF IBASE      data base to be locked - must be the same para- 
*                           meter as used in a successful remote DBOPN
*                           call. 
*          DEF ISET       (currently unused - place holder) 
*          DEF MODE       =1 for a lock with wait 
*                         =2 for a lock without wait
*          DEF ISTAT      ten word status array (only first word is used
*                           by this subroutine
* 
      ENT DBLCK,DBUNL 
      EXT .ENTR,DBIDS,RBLCK,RBUNL 
* 
A     EQU 0 
B     EQU 1 
* 
LBASE NOP 
LSET  NOP 
LMODE NOP 
LSTAT NOP 
* 
*  Get true addresses of parameters and return point. 
* 
DBLCK NOP 
      JSB .ENTR 
       DEF LBASE
* 
*  Make sure all the parameters are there.
* 
      LDA LSTAT 
      SZA,RSS 
      JMP LEXIT     Missing parameter.
* 
*  Ask DBIDS to check the data base specified in BASE to see if it is 
*  valid, and if so set up its Run Table as the current Run Table.
* 
      CCA           A = -1 signifies not DBOPN calling. 
      JSB DBIDS 
       DEF *+2
       DEF LBASE,I
* 
      JMP L103      Error return - illegal BASE parameter.
      NOP           (Local data base return - ignore.)
* 
*  Ask RBLCK to handle this request.
* 
      JSB RBLCK 
       DEF *+5
       DEF LBASE,I
       DEF LSET,I 
       DEF LMODE,I
       DEF LSTAT,I
* 
*  Reset LSTAT to zero for parameter check on next entry. 
* 
LEXIT CLA 
      STA LSTAT 
* 
*  Return to user.
* 
      JMP DBLCK,I 
* 
*  Error return points. 
* 
L103  LDA D103      Illegal BASE parameter. 
      STA LSTAT,I 
      JMP LEXIT 
      SKP 
* 
*  This version of DBUNL is for remote only data base access.  It assumes 
*  that the data base is remote and merely provides an interface between
*  the user and RBUNL which handles the remote Unlock.
* 
*  The calling sequence for DBUNL is: 
* 
*        JSB DBUNL
*         DEF *+5       return point
*         DEF IBASE     data base to be unlocked - must be the same para- 
*                         meter as used in a successful remote DBOPN call.
*         DEF ISET      (currently unused - place holder) 
*         DEF MODE      = 1 
*         DEF ISTAT     ten word status array (only the first word is 
*                         used by this subroutine 
* 
UBASE NOP 
USET  NOP 
UMODE NOP 
USTAT NOP 
* 
*  Get true parameter and return point addresses. 
* 
DBUNL NOP 
      JSB .ENTR 
       DEF UBASE
* 
*  Make sure all the parameters are there.
* 
      LDA USTAT 
      SZA,RSS 
      JMP UEXIT     Missing parameter.
* 
*  Ask DBIDS to check the data base specified in UBASE to see if it is
*  valid, and if so to set up its Run Table as the current Run Table. 
* 
      CCA           A = -1 signifies not DBOPN calling. 
      JSB DBIDS 
       DEF *+2
       DEF UBASE,I
* 
      JMP U103      Error return - illegal UBASE param. 
      NOP           (Local data base return - ignore.)
* 
*  Ask RBUNL to handle this request.
* 
      JSB RBUNL 
       DEF *+5
       DEF UBASE,I
       DEF USET,I 
       DEF UMODE,I
       DEF USTAT,I
* 
*  Reset USTAT to zero for parameter check on next entry. 
* 
UEXIT CLA 
      STA USTAT 
* 
*  Return to user.
* 
      JMP DBUNL,I 
* 
*  Error return points. 
* 
U103  LDA D103      Illegal BASE parameter. 
      STA USTAT,I 
      JMP UEXIT 
* 
* 
D103  DEC 103 
      END 
      END$
                                                                                                        