ASMB HED BAPS3 - REMOTE DATA BASE ACCESS PROGRAM SEGMENT 3 NAM BAPS3,5 91750-1X185 REV.2013 800523 * * ******************************************************************* * (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: 91750-18185 * RELOC: 91750-1X185 * * * ******************************************************************* * * * COM DABUF(2174),RQBUF(30) COM RECRQ,RECDA,SEGNM * * Segment three of the Remote Data Base Access Program. This segment * has the following sequence of operations. * * 1) Determine the tyep of IMAGE call and branch to the appropriate call * handler. * * A) DBPUT * * I ) Perform the DBPUT call. * * II) Go to 2. * * B) DBDEL * * I ) Perform the DBDEL call. * * II) Go to 2. * * 2) Send the RDBA reply (no data). * * 3) Return to class get in main. * SKP ********************************************************************** *** *** * Standard DS/1000 equates * *** *** *** *** *$ * ****************************************************************** * * * G L O B A L B L O C K REV XXXX 790531 * * * * GLOBAL OFFSETS INTO DS/1000 MESSAGE BUFFERS, USED BY: * * * * REMAT, RFMST, DEXEC, DMESS, FLOAD, POPEN, #MAST * * GET, #SLAV, RQCNV, RPCNV, GRPM, LSTEN, PTOPM * * EXECM, EXECW, OPERM, RFAM1, RFAM2, DLIST, DLIS3 * * * ****************************************************************** * ***!!!!! THE FIRST 7 WORDS (#STR THRU #ENO) MUST BE FIXED !!!!!*** #STR EQU 0 STREAM WORD. #SEQ EQU #STR+1 SEQUENCE NUMBER. #SRC EQU #SEQ+1 SOURCE NODE #. #DST EQU #SRC+1 DEST. NODE #. #EC1 EQU #DST+1 REPLY ECOD1. #EC2 EQU #EC1+1 REPLY ECOD2. #ENO EQU #EC2+1 NUMBER OF NODE REPORTING ERROR. * #ECQ EQU #ENO+1 ERROR CODE QUALIFIER (BITS 4 TO 7) #LVL EQU #ECQ MESSAGE FORMAT LEVEL (BITS 0 TO 3) #MAS EQU #LVL+1 MA "SEND" SEQ. # #MAR EQU #MAS+1 MA "RECV" SEQ. # #MAC EQU #MAR+1 MA "CANCEL" FLAGS #HCT EQU #MAC+1 HOP COUNT #SID EQU #HCT+1 SESSION ID WORD * #EHD EQU #SID LAST ITEM OF HEADER #MHD EQU #EHD+1 MINIMUM HEADER SIZE #REQ EQU #MHD START OF REQUEST SPECIFIC AREA #REP EQU #MHD START OF REPLY SPECIFIC AREA * #MXR EQU #MHD+24 <<< MAXIMUM DS REQ/REPLY BUFFER SIZE >>> #LSZ EQU 2 <<< SIZE OF LOCAL APPENDAGE AREA >>> * ****************************************************************** * *$ ********************************************************************** ********************************************************************** * * * DS/1000 RDBA Communications consist of two descriptive buffers: * * 1) Request buffer * * 2) Reply buffer * * These two static buffers are as described below. * * * ********************************************************************** *** *** * * * Request buffer - one buffer of from 12 to 21 words per RDBA call * * * *** *** RBSTR EQU #STR DS/1000 stream word RBSEQ EQU #SEQ DS/1000 sequence number RBSRC EQU #SRC DS/1000 source node number RBDST EQU #DST DS/1000 destination node number RBIDX EQU #REQ RDBA call Index RBMOD EQU #REQ+1 RDBA call mode RBID EQU #REQ+2 RDBA call item or set number * or for a DBOPN, the level code word RBITM EQU #REQ+3 Search item number for DBFND RBMRT EQU #REQ+5 For DBOPN, the max. returned RT size RBLEN EQU #REQ+6 Word size of ibase parameter RBBAS EQU #REQ+7 Ibase parameter * MAXRQ DEC 30 Maximum request buffer length *** *** *** *** * * * Reply buffer - one buffer of either #MHD+17 or 18 words/RDBA call * * * *** * * RBSTR EQU #STR DS 1000 stream word * RBSEQ EQU #SEQ DS/1000 sequence number * RBSRC EQU #SRC DS/1000 source node number * RBDST EQU #DST DS/1000 destination node number RBEC1 EQU #EC1 DS/1000 1st error code word RBEC2 EQU #EC2 DS/1000 2nd error code word RBEC3 EQU #ENO DS/1000 error node number upon an error RBSTA EQU #REP RDBA call status array RBNUM EQU #REP+10 RDBA data base number for DBOPN * RPLEN DEC 23 Standard reply buffer length * one more for DBOPN *** *** ********************************************************************** ENT BAPS3 EXT BP.GT,DBDEL,DBPUT EXT RDEXT * A EQU 0 B EQU 1 DAADR DEF DABUF * * Put our name suffix into SEGNM in common. That way, if another request * comes though for this segment, RDBAP (the main) will not reload us. * BAPS3 LDA SUFIX STA SEGNM * * Determine the type of IMAGE call being made by the index calculated * in the main and jump to the proper handling routine. Remember that * this index is: 45 - (RDBA Index). * LDB RQBUF+RBIDX ADB JMPTB JMP B,I * JMPTB DEF *+1 JMP E159 RDBA Index within [45,44] JMP E159 should not happen JMP DEL RDBA Index = 43, DBDEL JMP PUT RDBA Index = 42, DBPUT JMP E159 JMP E159 JMP E159 RDBA Index within [41,36] JMP E159 should not happen. JMP E159 JMP E159 SKP * * A remote DBPUT. * The request buffer contains the following information: * PTMOD EQU RQBUF+RBMOD Put mode PTSET EQU RQBUF+RBID Data set number PTBAS EQU RQBUF+RBBAS Data base parameter * * The status array directly following the DS reply buffer. * PTSTA EQU RQBUF+RBSTA * * The item list starts in the 2nd word of the data buffer. * PTLST EQU DABUF+1 * * The values for the items in the item list immediately follow the item * list in the data buffer. The first word of the data buffer contains * the length of the item list. Therefore, the address of the value buf- * fer is the address of the data buffer plus the length of the item list * plus one. * PUT LDA DAADR ADA DABUF INA STA PTBUF * * Perform the DBPUT call. * JSB DBPUT DEF *+7 DEF PTBAS DEF PTSET DEF PTMOD DEF PTSTA DEF PTLST DEF PTBUF,I * * There is no return data, so set the length of returned data to zero, * and jump to the exit routine. * CLB JMP EXIT * * Constants and variables * PTBUF NOP SKP * * A remote DBDEL. * The information in the request buffer is as follows: * DEMOD EQU RQBUF+RBMOD Delete mode DESET EQU RQBUF+RBID Data set number DEBAS EQU RQBUF+RBBAS Data base parameter * * The status array directly following the DS reply buffer. * DESTA EQU RQBUF+RBSTA * * There is no data associated with either the request or reply. * * Perform the DBDEL call. * DEL JSB DBDEL DEF *+5 DEF DEBAS DEF DESET DEF DEMOD DEF DESTA * * Set the returned data length to zero and jump to the exit routine. * CLB JMP EXIT SKP * * The only DS error is when the RDBA index for this segment is in error. * E159 LDB M159 CLA STA RECDA Set the data length to zero. JMP EXIT2 * * This is the exit routine for segment 3 of RDBAP. Its purpose is to * call the necessary subroutines in order to send the RDBA reply to the * orginiating node and to terminate the program, saving resources. All * DS replies are sent through RDEXT. * EXIT STB RECDA Set returned data length. CLA CLB Set the error code to zero. EXIT2 DST ERROR * JSB RDEXT Then, let RDEXT send the reply. DEF *+6 DEF RQBUF It needs: reply buffer DEF RPLEN reply length DEF DABUF data buffer DEF RECDA data length DEF ERROR error code NOP * JMP BP.GT Return to class get in main. * * Constants and variables. * M159 DEC -159 * SUFIX ASC 1,3 * ERROR BSS 2 END BAPS3