ASMB,L,C,R
      HED DBCLS SUBROUTINE FOR REMOTE ONLY ACCESS 
      NAM DBCLS,7 92069-16244 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-18244
*     RELOC:     92069-16244
* 
*     PRGMR:     CEJ
* 
* 
******************************************************************* 
* 
* 
* 
*  This version of DBCLS is for remote only data base access.  It assumes 
*  that the data base is remote and merely provides an interface between
*  the user and RBCLS which handles the remote Close. 
* 
*  The calling sequence for DBCLS is: 
* 
*          JSB DBCLS
*           DEF *+5 
*           DEF BASE         data base parameter used in a successful 
*                              remote DBOPN call for the data base which is 
*                              to be closed or which contains the data set
*                              to be closed.
*           DEF SET          the name or number of the data set to be 
*                              closed if a mode 2 close.
*           DEF MODE         DBCLS mode, a one word integer.
*           DEF STAT         a ten word array in which status information 
*                              is returned to the user.  This subroutine
*                              uses only the first word of this array in
*                              which is stores an error code, zero if 
*                              successful.
* 
      SKP 
A     EQU 0 
B     EQU 1 
* 
      ENT DBCLS 
      EXT .ENTR,DBIDS,RBCLS 
* 
BASE  NOP 
SET   NOP 
MODE  NOP 
STAT  NOP 
* 
*  Get true parameter and return point addresses. 
* 
DBCLS NOP 
      JSB .ENTR 
       DEF BASE 
* 
*  Make sure all the parameters are there.
* 
      LDA STAT
      SZA,RSS 
      JMP EXIT      Missing parameter.
* 
*  Ask DBIDS to check the data base specified in BASE 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 BASE,I 
* 
      JMP E103      Error return - illegal BASE param.
      NOP           (Local data base return - ignore.)
* 
*  Ask RBCLS to handle this request.
* 
      JSB RBCLS 
       DEF *+5
       DEF BASE,I 
       DEF SET,I
       DEF MODE,I 
       DEF STAT,I 
* 
*  Reset STAT to zero for parameter check on next entry.
* 
EXIT  CLA 
      STA STAT
* 
*  Return to caller.
* 
      JMP DBCLS,I 
* 
*  Error return points. 
* 
E103  LDA D103      Illegal BASE parameter. 
      STA STAT,I
      JMP EXIT
* 
* 
D103  DEC 103 
      END 
      END$
                                                                