ASMB,L,C,R
      HED DBRED IMAGE/1000 UTILITY SUBROUTINE 
      NAM DBRED,7 92069-16160 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-18160
*     RELOC:     92069-16160
* 
*     PRGMR:     CEJ
* 
* 
******************************************************************* 
* 
* 
* 
*  REaD entry performs an FMP read on the record of the data set in the 
*  data base specified by the three input parameters and places the record
*  in the record buffer.
* 
*  The calling sequence for DBRED is: 
* 
*             JSB DBRED 
*              DEF *+4       return point 
*              DEF BASE      data base # (1st word of ibase parameter)
*              DEF SET       data set # 
*              DEF RECRD     doubleword record number 
* 
      EXT .ENTR,DBFCB,DBRBL,DBRBP,EREAD 
      ENT DBRED 
A     EQU 0 
B     EQU 1 
* 
BASE  NOP 
SET   NOP 
RECRD NOP 
* 
*  Get true addresses of parameters and return point
* 
DBRED NOP 
      JSB .ENTR 
       DEF BASE 
* 
*  Call DBFCB to set up a DCB for the FMP call. 
* 
      JSB DBFCB 
       DEF *+4
       DEF BASE,I   base number 
       DEF SET,I    set number
       DEF DCBAD    returned DCB address
* 
*  If DBFCB ran into an error, pass it back to caller.
* 
      SZA 
      JMP DBRED,I 
* 
*  Perform an FMP EREAD call on returned DCB with given doubleword record 
*  number and reading record into record buffer.
* 
      JSB EREAD 
       DEF *+7
       DEF DCBAD,I
       DEF ERROR    If any error occurs, error code automatically 
       DEF DBRBP,I    put in A by EREAD.
       DEF DBRBL    set record length to possible longest record
       DEF LENTH    returned length 
       DEF RECRD,I
* 
      SSA,RSS 
      CLA 
      JMP DBRED,I   Return immediately after call.
* 
*  Constants and variables
* 
LENTH NOP 
ERROR NOP 
DCBAD NOP 
      END 
                                  