ASMB,L,C,R
      HED DBIDS UTILITY SUBROUTINE FOR IMAGE/1000 
      NAM DBIDS,7 92069-16147 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-18147
*     RELOC:     92069-16147
* 
*     PRGMR:     CEJ
* 
* 
******************************************************************* 
* 
* 
* 
*  If DS is a subroutine used by the DBMS subroutine which accepts the
*  BASE parameter from the DBMS call and determines if the data base is 
*  on a remote machine.  This version of DBIDS is used by the local only
*  subroutines.  Its function is to check the BASE parameter for validity.
*  This includes:  For DBOPN - checking the first word of the BASE param- 
*    eter for two blanks. 
*                  For all other DBMS subroutines - making sure the Run 
*    Table for the data base specified in BASE exists and setting it up 
*    as the current Run Table.
* 
*  The calling sequence for DBIDS is: 
* 
*        CLA  (for DBOPN meaning data base is not already open) 
*            or 
*        CCA  (for all other subs., data base is already open)
*        JSB DBIDS
*         DEF *+2       return point
*         DEF BASE      base parameter from call
*       <error return point>
*       <local data base return point>
*       <remote data base return point> 
* 
A     EQU 0 
B     EQU 1 
* 
      ENT DBIDS 
      EXT .ENTP,DBFRT 
* 
*  Get true parameter and return point addresses. 
* 
BASE  NOP 
* 
DBIDS NOP 
      STA SAVE      Save A reg. for later.
      NOP           Note: this NOP is needed for .ENTP
      JSB .ENTP 
       DEF BASE 
* 
*  If DBOPN calling us, check the first word of the BASE parameter for
*  two blanks.
* 
      LDA SAVE
      SZA 
      JMP NOPEN 
* 
      LDB BLNKS 
      CPB BASE,I
      JMP LOCAL     Blanks there, parameter valid.
      JMP EXIT      Blanks missing, invalid parameter.
* 
*  If not DBOPN, ask DBFRT to find and set up the Run Table for this data 
*  base as the current Run Table. 
* 
NOPEN JSB DBFRT 
       DEF *+2
       DEF BASE,I 
* 
      SSA,RSS       Did DBFRT succeed?
* 
LOCAL ISZ DBIDS     Yes - bump return address.
EXIT  JMP DBIDS,I 
* 
*  Constants and variables. 
* 
BLNKS ASC 1,
SAVE  NOP 
      END 
      END$
                                                                                                                                                                        