Trailing-Edge
-
PDP-10 Archives
-
BB-L014E-BM
-
autopatch/dbsany.f05
There are 11 other files named dbsany.f05 in the archive. Click here to see a list.
;******************** START OF DBMS20-V6 EDIT 412 *************************
;
;SYMPTOM
; When trying to close the database after reading a partial cluster
; (at end of area) over a full cluster, exception 0157 occurs.
;
;DIAGNOSIS
; Only part of the cluster is 'unmapped' by mapping in new pages.
; However, DBCS forgets the page numbers of all the cluster pages
; in its buffer headers. It later uses the buffer headers to
; really unmap any database pages left in core at CLOSE time. Thus
; it will unmap the partial cluster, but leave behind those pages
; in the previous full cluster that were not overwritten.
;
;CURE
; Only forget those pages that are actually being overwritten,
; leaving behind enough information to actually unmap them during
; CLOSE if the need exists.
;
;
;*************** EDIT THE FOLLOWING INTO FILE 412.FIX *********************
.EDIT 412
.NAME WTK
.DATE 18-MAR-82
.MODULE DBKIO
.INSERT GIO.LX-1,AFTER,<MOVE 5,0(5)>
MOVE R0,CCLUSZ(X) ;[412] USE CURRENT CLUSTER SIZE TO CLEAR ONLY
PUSH 17,R0 ;[412] PAGE #S THAT WILL NOW BE OVERWRITTEN
.ENDI
.INSERT GIO.LY+2,BEFORE,<SETZM 1(5)>
POP 17,R0 ;[412] IF THIS PAGE WILL BE OVERWRITTEN
SOSL R0, ;[412] BY THE NEW CLUSTER
; EVEN FORGET THE PAGE #
.ENDI
.INSERT GIO.LY+3,BEFORE,<ADDI BUFHDR,SIZ.BH-1>
PUSH 17,R0 ;[412] OTHERWISE, JUST SAVE THE NEW COUNT
.ENDI
.INSERT GIO.LY+5,BEFORE,<POP 17,5>
POP 17,R0 ;[412] JUST TO CLREA UP THE STACK
.ENDI
.ENDE
;***************************** CAUTION *************************************
;
; TO AVOID LOSING ANY PREVIOUS PATCHES BE
; SURE TO USE THE LATEST PATCHED REL FILES
; AS A BASE FOR THIS EDIT.
;
; THIS PATCH AFFECTS THE FOLLOWING DBMS COMPONENTS:
;
; DBINFO
; DBMEND
; LIBOL
; FORLIB
; DBCS2F
;
;
; ------------------ TO INSTALL THIS EDIT ------------------
;
; @RUN MAKLIB
; *DBSANY.REL=DBSANY.REL,412.FIX/F
; *^C
; @SUBMIT DBMS20/TAG:DBALL ;DBMS20.CTL FROM DISTRIBUTION TAPE
;
;************************** END OF EDIT 412 *******************************
;******************** START OF DBMS20-V6 EDIT 415 *************************
;
;SYMPTOM
; MODIFY fails when a sort key is being modified, and the record
; is declared an optional member of the sorted set in question and
; at the time of the MODIFY is not actually a member.
; ERROR-STATUS = 822, ERROR-DATA = 28009.
;
;DIAGNOSIS
; The member-unlink code in DBSET detects an error if the pointer
; being cleared (unlinked) is already cleared, for all verbs except
; DELETE. However, the MODIFY code in DBMOD expects to get a cleared
; pointer returned as an indication the the record is not a current
; member of the sorted set.
;
;CURE
; Allow the unlink code to accept cleared pointers during the MODIFY
; verb in the same manner as during a DELETE, if treating an optional
; member of a sorted set.
;
;
;*************** EDIT THE FOLLOWING INTO FILE 415.FIX *********************
.EDIT 415
.NAME WTK
.DATE 24-MAR-82
.MODULE DBSET
.INSERT MEM.UN+10,AFTER,<PUSHJ 17,GET.WD>
MOVEI R0,10 ;[415] IF VERB
CAME R0,VERBID(X) ;[415] IS 'MODIFY'
JRST MEM.UN+11 ;[415]
JUMPN R1,MEM.UN+11 ;[415] AND ALREADY UNLINKED
LDB R0,REMOV$##+104 ;[415] AND IS AN
TRNN R0,2 ;[415] OPTIONAL MEMBER
JRST MEM.UN+11 ;[415]
LDB R0,NEX.NO+152 ;[415] AND SET
CAIL R0,OR.SOR ;[415] IS SORTED
JRST OWN.IN-5 ;[415] EXIT HERE - NOTHING ELSE TO DO
.ENDI
.ENDE
;***************************** CAUTION *************************************
;
; TO AVOID LOSING ANY PREVIOUS PATCHES BE
; SURE TO USE THE LATEST PATCHED REL FILES
; AS A BASE FOR THIS EDIT.
;
; THIS PATCH AFFECTS THE FOLLOWING DBMS COMPONENTS:
;
; DBMEND
; LIBOL
; FORLIB
; DBCS2F
;
;
; ------------------ TO INSTALL THIS EDIT ------------------
;
; @RUN MAKLIB
; *DBSANY.REL=DBSANY.REL,415.FIX/F
; *^C
; @SUBMIT DBMS20/TAG:DBALL ;DBMS20.CTL FROM DISTRIBUTION TAPE
;
;************************** END OF EDIT 415 *******************************
;******************** START OF DBMS20-V6 EDIT 417 *************************
;
;SYMPTOM
; Programs sleeps in 'OPEN JOURNAL' statement while a concurrent
; run-unit has a transaction opened.
;
;DIAGNOSIS
; The 'OPEN JOURNAL' creates a default transaction, which attempts
; to lock all areas for update. If this request is at odds with an
; already granted request, the program will sleep until the request
; can be granted.
;
;CURE
; Since there is no reason why locks should be put on all
; areas, don't do it.
;
;
;*************** EDIT THE FOLLOWING INTO FILE 417.FIX *********************
.EDIT 417
.NAME WTK
.DATE 13-APR-82
.MODULE DBOPEN
.INSERT OPEN$+71,BEFORE,<PUSHJ 17,OP.JBU>
PUSH 17,1 ;[417] SAVE SOME ACS
PUSH 17,0 ;[417]
MOVE 1,200(14) ;[417] MOVE R1,TRNLST(SS) (PICK UP LIST OF TRNS)
MOVE 1,0(1) ;[417] MOVE R1,0(R1) (DEF. TRN. ALWAYS FIRST)
MOVE 0,1(1) ;[417] GET KB LIST AOBJ PTR FOR DEF. TRANS
SETZM 1(1) ;[417] AND CLEAR IT IN TRNS BLK
EXCH 0,0(17) ;[417] BUT REMEMBER WHAT IT WAS
EXCH 1,-1(17) ;[417] AND WHERE IT CAME FROM
.ENDI
.INSERT OPEN$+72,BEFORE,<SETOM 6>
EXCH 1,-1(17) ;[417] GET BACK DEF. TRANS. BLK ADRS
EXCH 0,0(17) ;[417] AND KB LIST AOBJ PTR
MOVEM 0,1(1) ;[417] RESTORE PTR
POP 17,0 ;[417] RESTORE ACS
POP 17,1 ;[417]
.ENDI
.MODULE DBTRAN
.INSERT OPT.GB+6,AFTER,<MOVE 5,1(7)>
JUMPE 5,OPT.GB+33 ;[417] CLEARED PTR MEANS NO AREAS LOCKED
;[417] SO GO TO OPT.EX
.ENDI
.MODULE DBCLOS
.INSERT CLOSE$+41,REPLACE:2,<CAIG 1,1>
CAIG 1,1
SETOM 21,12
PUSH 17,1 ;[417] SAME CHANGE HERE AS IN DBOPEN
PUSH 17,0 ;[417]
HRR 1,200(14) ;[417]
MOVE 1,0(1) ;[417]
MOVE 0,1(1) ;[417]
SETZM 1(1) ;[417]
EXCH 0,0(17) ;[417]
EXCH 1,-1(17) ;[417]
;[417] INSTEAD OF FALLING INTO CLORUN, REPEAT ITS CODE HERE
PUSHJ 17,CLOJRN+5 ;[417] (=CLORUN+1)
;[417] RESUME PATCH CODE AS IN DBOPEN
EXCH 1,-1(17) ;[417]
EXCH 0,0(17) ;[417]
MOVEM 0,1(1) ;[417]
POP 17,0 ;[417]
POP 17,1 ;[417]
JRST CLOJRN+15 ;[417] GO TO CLOALL (DON'T FALL INTO CLORUN)
.ENDI
.INSERT CLOJRN+4,AFTER,<JUMPE 11,CLOJRN+15>
PUSHJ 17,CLOJRN+5 ;[417] TO MAKE CLORUN CODE
JRST CLOJRN+15 ;[417] AVAILABLE TO CLOJRN
.ENDI
.INSERT CLOJRN+14,AFTER,<TLZ 15,464>
POPJ 17, ;[417] END CLORUN REENTRANT CODE
.ENDI
.ENDE
;***************************** CAUTION *************************************
;
; TO AVOID LOSING ANY PREVIOUS PATCHES BE
; SURE TO USE THE LATEST PATCHED REL FILES
; AS A BASE FOR THIS EDIT.
;
; THIS PATCH AFFECTS THE FOLLOWING DBMS COMPONENTS:
;
; LIBOL
; FORLIB
; DBCS2F
; DBMEND
;
;
; ------------------ TO INSTALL THIS EDIT ------------------
;
; @RUN MAKLIB
; *DBSANY.REL=DBSANY.REL,417.FIX/F
; *^C
; @SUBMIT DBMS20/TAG:DBALL ;DBMS20.CTL FROM DISTRIBUTION TAPE
;
;************************** END OF EDIT 417 *******************************
;******************** START OF DBMS20-V6 EDIT 420 *************************
;
;SYMPTOM
; DBMEND gets "INVALID BLOCK DESCRIPTOR" after a MERGE BEFORE
; command. Also, a PA1050 error will occasionally result from an
; ABSTRACT command.
;
;DIAGNOSIS
; When writing a before image (JR.BEF), DBCS will garbage the journal if
; the journal buffers are flushed because they are full, AND there is
; a remnant of the last image in the 'first' page (i.e., the image
; spanned more than one journal page), AND the transaction is terminated
; by a JBTRAN before anything else is placed in the journal buffers.
; Also, if the before image spanned more than two journal pages, the
; page anchor in all pages after the first page will be incorrect.
;
;CURE
; Ensure that JRCOPY flags the journal buffers as modified, and don't
; let JREFILL destroy JR.BIX after flushing the journal buffers. Also
; change the page anchor algorithm to handle an image span of more
; than two journal pages, so that on each journal page after the first,
; the page anchor will be a negative offset to the beginning of the
; data block (i.e., previous anchor - 1000).
;
;NOTE:
; THIS EDIT REPLACES EDIT 367 TO DBMS-20 V.6.
;
;*************** EDIT THE FOLLOWING INTO FILE 420.FIX *********************
.EDIT 420
.NAME WTK
.DATE 04-MAY-82
.MODULE DBJOUR
;;;; NEXT LINE MAY BE COMMENTED OUT IF EDIT 367 WAS NOT INSTALLED.
.REMOVE 367
.INSERT JRC.LP,BEFORE,<HRL 1,4>
PUSH 17,1 ;[420] SAVE R1 (HAS BLT DEST. IN R.H.)
HLRZ 1,3(10) ;[420] GET FLAGS (L.H.)
TRZ 1,1 ;[420] TURN OFF UN-MOD'D BIT
HRLM 1,3(10) ;[420] AND PUT BACK TO MEM
POP 17,R1 ;[420] RESTORE R1
.ENDI
.INSERT JRC.LP+11,BEFORE,<MOVNM 1,13(14)>
JUMPGE 1,.+3 ;[420] IF NEGATIVE, WE'VE LOOPED TO BEGINNING OF JBUFS
ADD 1,7(14) ;[420] SO ADD IN JR.BAFT(SS)
SUB 1,5(14) ;[420] AND SUBTRACT JR.1STP(SS) TO GET CORRECT
;[420] OFFSET TO BEGINNING OF JRN BLOCK
.ENDI
.INSERT JREFIL+10,REPLACE:2,<CAML 10,7(14)>
CAMGE 10,7(14) ;[420] PAST END OF JRN BUFFERS?
JRST .+6 ;[420] NO, SKIP A LITTLE
PUSHJ 17,JR.FLU ;[420] YES, FLUSH JRN BUFFERS
AOS 120(14) ;[420] ADD TO CNT OF FLUSHED-BECAUSE-JRN-BUFS-FULL
MOVE 10,5(14) ;[420] RECYCLE TO FIRST BUFFER
POP 17,0(17) ;[420] REPLACE FAKE PAGE # ON STACK
PUSH 17,0(10) ;[420] WITH REAL PAGE FOR RESTORE
.ENDI
.ENDE
;***************************** CAUTION *************************************
;
; TO AVOID LOSING ANY PREVIOUS PATCHES BE
; SURE TO USE THE LATEST PATCHED REL FILES
; AS A BASE FOR THIS EDIT.
;
; THIS PATCH AFFECTS THE FOLLOWING DBMS COMPONENTS:
;
; LIBOL
; FORLIB
; DBCS2F
; DBMEND
;
;
; ------------------ TO INSTALL THIS EDIT ------------------
;
; @RUN MAKLIB
; *DBSANY.REL=DBSANY.REL,420.FIX/F
; *MNDANY.REL=MNDANY.REL,420.FIX/F
; *^C
; @SUBMIT DBMS20/TAG:DBALL ;DBMS20.CTL FROM DISTRIBUTION TAPE
;
;************************** END OF EDIT 420 *******************************
;******************** START OF DBMS20-V6 EDIT 422 *************************
;
;SYMPTOM
; Programs sleeps in 'OPEN JOURNAL' statement while a concurrent
; run-unit has a transaction opened.
;
;DIAGNOSIS
; The 'OPEN JOURNAL' creates a default transaction, which attempts
; to lock all areas for update. If this request is at odds with an
; already granted request, the program will sleep until the request
; can be granted.
;
;CURE
; Since there is no reason why locks should be put on all
; areas, don't do it.
;
; NOTE:
; THIS EDIT REPLACES EDIT 417 TO DBMS V.6.
;
;*************** EDIT THE FOLLOWING INTO FILE 422.FIX *********************
.EDIT 422
.NAME WTK
.DATE 19-MAY-82
.MODULE DBOPEN
.REMOVE 417
.INSERT OPEN$+71,BEFORE,<PUSHJ 17,OP.JBU>
PUSH 17,1 ;[422] SAVE SOME ACS
PUSH 17,0 ;[422]
MOVE 1,200(14) ;[422] MOVE R1,TRNLST(SS) (PICK UP LIST OF TRNS)
MOVE 1,0(1) ;[422] MOVE R1,0(R1) (DEF. TRN. ALWAYS FIRST)
MOVE 0,1(1) ;[422] GET KB LIST AOBJ PTR FOR DEF. TRANS
SETZM 1(1) ;[422] AND CLEAR IT IN TRNS BLK
EXCH 0,0(17) ;[422] BUT REMEMBER WHAT IT WAS
EXCH 1,-1(17) ;[422] AND WHERE IT CAME FROM
.ENDI
.INSERT OPEN$+72,BEFORE,<SETOM 6>
EXCH 1,-1(17) ;[422] GET BACK DEF. TRANS. BLK ADRS
EXCH 0,0(17) ;[422] AND KB LIST AOBJ PTR
MOVEM 0,1(1) ;[422] RESTORE PTR
POP 17,0 ;[422] RESTORE ACS
POP 17,1 ;[422]
.ENDI
.MODULE DBTRAN
.REMOVE 417
.INSERT OPT.GB+6,AFTER,<MOVE 5,1(7)>
JUMPE 5,OPT.GB+33 ;[422] CLEARED PTR MEANS NO AREAS LOCKED
;[422] SO GO TO OPT.EX
.ENDI
.MODULE DBCLOS
.REMOVE 417
.INSERT CLOSE$+41,REPLACE:2,<CAIG 1,1>
CAIG 1,1
SETOM 21(12) ;[422]
PUSH 17,1 ;[422] SAME CHANGE HERE AS IN DBOPEN
PUSH 17,0 ;[422]
HRR 1,200(14) ;[422]
MOVE 1,0(1) ;[422]
MOVE 0,1(1) ;[422]
SETZM 1(1) ;[422]
EXCH 0,0(17) ;[422]
EXCH 1,-1(17) ;[422]
;[422] INSTEAD OF FALLING INTO CLORUN, REPEAT ITS CODE HERE
PUSHJ 17,CLOJRN+5 ;[422] (=CLORUN+1)
;[422] RESUME PATCH CODE AS IN DBOPEN
EXCH 1,-1(17) ;[422]
EXCH 0,0(17) ;[422]
MOVEM 0,1(1) ;[422]
POP 17,0 ;[422]
POP 17,1 ;[422]
JRST CLOJRN+15 ;[422] GO TO CLOALL (DON'T FALL INTO CLORUN)
.ENDI
.INSERT CLOJRN+4,AFTER,<JUMPE 11,CLOJRN+15>
PUSHJ 17,CLOJRN+5 ;[422] TO MAKE CLORUN CODE
JRST CLOJRN+15 ;[422] AVAILABLE TO CLOJRN
.ENDI
.INSERT CLOJRN+14,AFTER,<TLZ 15,464>
POPJ 17, ;[422] END CLORUN REENTRANT CODE
.ENDI
.ENDE
;***************************** CAUTION *************************************
;
; TO AVOID LOSING ANY PREVIOUS PATCHES BE
; SURE TO USE THE LATEST PATCHED REL FILES
; AS A BASE FOR THIS EDIT.
;
; THIS PATCH AFFECTS THE FOLLOWING DBMS COMPONENTS:
;
; LIBOL
; FORLIB
; DBCS2F
; DBMEND
;
;
; ------------------ TO INSTALL THIS EDIT ------------------
;
; @RUN MAKLIB
; *DBSANY.REL=DBSANY.REL,422.FIX/F
; *^C
; @SUBMIT DBMS20/TAG:DBALL ;DBMS20.CTL FROM DISTRIBUTION TAPE
;
;************************** END OF EDIT 422 *******************************
;******************** START OF DBMS20-V6 EDIT 427 *************************
;
;SYMPTOM
; When a COBOL subprogram executes 'ENTER MACRO SETDB USING "ss-name"',
; a memory protection violation occurs.
;
;DIAGNOSIS
; The SETDB$ routine is improperly checking the argument number,
; and as a result attempts to obtain the second argument (lock-name)
; even when it has not been provided.
;
;CURE
; Fix the code in SETDB$ to properly check the argument count.
;
;*************** EDIT THE FOLLOWING INTO FILE 427.FIX *********************
.EDIT 427
.NAME WTK
.DATE 25-JUN-82
.MODULE SETDB
.INSERT SETDB$+6,REPLACE,<CAIG 1,-2>
CAMG 1,[-2] ;[427] SKIP IF ONLY ONE ARGUMENT
.ENDI
.ENDE
;***************************** CAUTION *************************************
;
; TO AVOID LOSING ANY PREVIOUS PATCHES BE
; SURE TO USE THE LATEST PATCHED REL FILES
; AS A BASE FOR THIS EDIT.
;
; THIS PATCH AFFECTS THE FOLLOWING DBMS COMPONENTS:
;
; LIBOL
; FORLIB
; DBCS2F
; DBMEND
;
;
; ------------------ TO INSTALL THIS EDIT ------------------
;
; @RUN MAKLIB
; *DBSANY.REL=DBSANY.REL,427.FIX/F
; *^C
; @SUBMIT DBMS20/TAG:DBALL ;DBMS20.CTL FROM DISTRIBUTION TAPE
;
;************************** END OF EDIT 427 *******************************
;******************** START OF DBMS20-V6 EDIT 435 *************************
;
;SYMPTOM
; Programs sleeps in OPEN JOURNAL statement while a concurrent
; run-unit has a transaction opened.
;
;DIAGNOSIS
; The OPEN JOURNAL creates a default transaction, which attempts
; to lock all areas for update. If this request is at odds with an
; already granted request, the program will sleep until the request
; can be granted.
;
;CURE
; Since there is no reason why locks should be put on all
; areas during OPEN JOURNAL, don't do it.
;
; NOTE:
; THIS EDIT REPLACES EDIT 422 TO DBMS V.6.
;
;*************** EDIT THE FOLLOWING INTO FILE 435.FIX *********************
.EDIT 435
.NAME WTK
.DATE 23-JUL-82
.MODULE DBOPEN
.REMOVE 422
.INSERT OPELIT+136,REPLACE:5,<PUSHJ P,INISHR>
TLNE X,PSW.TAC
JRST [HRRI ^D24012
PUSHJ 17,ERRRG.
PUSHJ 17,XC.DOR]
MOVEI 16,OPELIT+135
PUSHJ 17,JR.INI
.ENDI
.MODULE DBCLOS
.REMOVE 422
.MODULE DBTRAN
.REMOVE 422
.ENDE
;***************************** CAUTION *************************************
;
; TO AVOID LOSING ANY PREVIOUS PATCHES BE
; SURE TO USE THE LATEST PATCHED REL FILES
; AS A BASE FOR THIS EDIT.
;
; THIS PATCH AFFECTS THE FOLLOWING DBMS COMPONENTS:
;
; LIBOL
; FORLIB
; DBMEND
;
;
; ------------------ TO INSTALL THIS EDIT ------------------
;
; @RUN MAKLIB
; *DBSANY.REL=DBSANY.REL,435.FIX/F
; *^C
; @SUBMIT DBMS20/TAG:DBALL ;DBMS20.CTL FROM DISTRIBUTION TAPE
;
;************************** END OF EDIT 435 *******************************
;******************** START OF DBMS20-V6 EDIT 436 *************************
;
;[SYMPTOM]
; A call to JRDATA can produce a ?Memory Protection Violation. This
; problem is exhibited by the UETP test program ORDENT.CBL.
;
;[DIAGNOSIS]
; The first thing JRDATA does is start a default transaction if no
; transaction is active. Execution of the DEFTRAN routine causes the
; argument pointer (AC 16) to be changed, and when JRDATA later tries to
; retrieve the size argument, the fatal error can occur.
;
;[CURE]
; Save the argument pointer around the call to DEFTRN.
;
;
;*************** EDIT THE FOLLOWING INTO FILE 436.FIX *********************
.EDIT 436
.NAME EGM
.DATE 23-Aug-82
.MODULE DBJOUR
.INSERT JRDAT$+1,REPLACE,<PUSH P,DATA(AP)>
PUSH P,AP ;[436] Preserve Arg pointer
.ENDI
.INSERT JRDAT$+4,REPLACE,<POP P,R3>
POP P,AP ;[436] Restore Arg pointer
MOVEI R2,@DATA(AP) ;[436] Get address of data
LDB R3,[POINT ARG$TYP,ARG.TYP+DATA(AP),ARG%TYP] ;[436] and arg type
.ENDI
.ENDE
;***************************** CAUTION *************************************
;
; TO AVOID LOSING ANY PREVIOUS PATCHES BE
; SURE TO USE THE LATEST PATCHED REL FILES
; AS A BASE FOR THIS EDIT.
;THIS PATCH AFFECTS THE FOLLOWING:
;DBMS COMPONENTS:
; DBMEND
;
;LANGUAGE INTERFACES:
; FORTRAN (FORLIB.REL,DBMSF.EXE)
; COBOL (LIBOL.REL,LIBO12.EXE,C74LIB.REL,C74O12.EXE)
; ------------------ TO INSTALL THIS EDIT ------------------
;
; @RUN SYS:MAKLIB
; *DBSANY.REL=DBSANY.REL,436.FIX/F
; *MNDANY.REL=MNDANY.REL,436.FIX/F
; */EXIT
; @SUBMIT DBMS20 ;DBMS20.CTL FROM DISTRIBUTION TAPE
;
;************************** END OF EDIT 436 *******************************
;******************** START OF DBMS20-V6 EDIT 437 *************************
;
;SYMPTOM
; FIND rse6 using proper sort key does not do an indexed find,
; but walks sequentially through the set.
;
;DIAGNOSIS
; The set is sorted with no global DUPLICATES clause, so the record
; TID becomes the major sort key. However, the TID is not passed as
; part of the sort key argument list from the calling program, so
; DBCS detects a difference from what the sort key should look like,
; and therefore does not allow the indexed FIND.
;
;CURE
; Detect that situation where the TID is built into the sort key,
; and allow DBCS to check only the key elements provided, skipping
; over the TID. DBCS will still use the proper TID when searching
; the index.
;
;*************** EDIT THE FOLLOWING INTO FILE 437.FIX *********************
.EDIT 437
.NAME WTK
.DATE 27-AUG-82
.MODULE DBFIND
MB.ORD=3
.INSERT FN6.ME+11,REPLACE:3,<CAME DATBLK,AOBDATA(X)>
SETZ R1, ;ASSUME NO KEY PTR ADJUSTMENT
CAMN DATBLK,AOBDATA(X) ;# OF ENTRIES SAME?
JRST FN6OK1 ; YES, COULD BE SORTED FIND
;GLOBAL 'DUP' = UNIFIED SET = NO TID IN KEY
LDB R1,[POINT 6,MB.ORD(MEMBLK),29] ;SEE IF GLOBAL "DUP" CLAUSE
CAIE R1,^D9 ;IF THERE IS ONE
JRST FN6.NX ; ARG CNTS SHOULD HAVE MATCHED
ADD DATBLK,[1,,0] ;VERIFY THAT COUNT WE GOT IS ONE
CAME DATBLK,AOBDATA(X) ; LESS THAN WHAT WE EXPECTED
JRST FN6.NX ; THIS IS NOT A SORTED FIND!
MOVE R1,[1,,1] ;ADJ KEY PTR TO SKIP TID
FN6OK1: ;MAY BE SORTED FIND, CHECK EACH ARG
ADD R1,VB.MYC(VIABLK) ;GET (ADJUSTED) KEY POINTER
.ENDI
.ENDE
;***************************** CAUTION *************************************
;
; TO AVOID LOSING ANY PREVIOUS PATCHES BE
; SURE TO USE THE LATEST PATCHED REL FILES
; AS A BASE FOR THIS EDIT.
;
; THIS PATCH AFFECTS THE FOLLOWING DBMS COMPONENTS:
;
; LIBOL
; FORLIB
; DBINFO
;
;
; ------------------ TO INSTALL THIS EDIT ------------------
;
; @RUN MAKLIB
; *DBSANY.REL=DBSANY.REL,437.FIX/F
; *^C
; @SUBMIT DBMS20/TAG:DBALL ;DBMS20.CTL FROM DISTRIBUTION TAPE
;
;************************** END OF EDIT 437 *******************************
;******************** START OF DBMS20-V6 EDIT 441 *************************
;
;SYMPTOM
; MODIFY fails when a sort key is being modified, and the record
; is declared an optional member of the sorted set in question and
; at the time of the MODIFY is not actually a member.
; ERROR-STATUS = 822, ERROR-DATA = 28009.
;
;DIAGNOSIS
; The member-unlink code in DBSET detects an error if the pointer
; being cleared (unlinked) is already cleared, for all verbs except
; DELETE. However, the MODIFY code in DBMOD expects to get a cleared
; pointer returned as an indication the the record is not a current
; member of the sorted set.
;
;CURE
; Allow the unlink code to accept cleared pointers during the MODIFY
; verb in the same manner as during a DELETE, if treating an optional
; member of a sorted set.
;
;NOTE
; THIS EIDT REMOVES EDIT 415 TO DBMS-20 V.6.
;
;*************** EDIT THE FOLLOWING INTO FILE 441.FIX *********************
.EDIT 441
.NAME WTK
.DATE 24-MAR-82
.MODULE DBSET
.REMOVE 415
.INSERT MEM.UN+10,AFTER,<PUSHJ 17,GET.WD>
MOVEI R0,10 ;[441] IF VERB
CAME R0,VERBID(X) ;[441] IS 'MODIFY'
JRST MEM.UN+11 ;[441]
JUMPN R1,MEM.UN+11 ;[441] AND ALREADY UNLINKED
LDB R0,[170310,,3] ;[441] AND IS AN
TRNN R0,2 ;[441] OPTIONAL MEMBER
JRST MEM.UN+11 ;[441]
LDB R0,NEX.NO+152 ;[441] AND SET
CAIL R0,OR.SOR ;[441] IS SORTED
JRST OWN.IN-5 ;[441] EXIT HERE - NOTHING ELSE TO DO
.ENDI
.ENDE
;***************************** CAUTION *************************************
;
; TO AVOID LOSING ANY PREVIOUS PATCHES BE
; SURE TO USE THE LATEST PATCHED REL FILES
; AS A BASE FOR THIS EDIT.
;
; THIS PATCH AFFECTS THE FOLLOWING DBMS COMPONENTS:
;
; DBMEND
; LIBOL
; FORLIB
; DBCS2F
;
;
; ------------------ TO INSTALL THIS EDIT ------------------
;
; @RUN MAKLIB
; *DBSANY.REL=DBSANY.REL,441.FIX/F
; *^C
; @SUBMIT DBMS20/TAG:DBALL ;DBMS20.CTL FROM DISTRIBUTION TAPE
;
;************************** END OF EDIT 441 *******************************
;******************** START OF DBMS20-V6 EDIT 442 *************************
;
; [SYMPTOM]
;
; Using FIND PRIOR/LAST with a set that has no prior
; pointers can produce undeserved NRS or ESA exceptions, and
; possibly bad currency values.
;
; [DIAGNOSIS]
;
; The FIND3 processor makes some invalid assumptions
; concerning information returned from the lower level record
; find routines.
;
; 1. When the find primitves determine that prior simulation
; is necessary, the first check made is for a valid
; current-prior-of-set which might have a next pointer to
; the current-of-set (current-prior-of-set is basicly
; maintained while nexting through a set). However the
; record type is not considered, and this check may return
; successfully with the wrong type. In version 6, code at
; the verb level (incorrectly) makes this check, which can
; result in an exception even though a prior record does
; exist in the set which will match.
;
; 2. If the initial check fails, the prior simulation code
; walks the entire set from the owner to either the owner
; (FIND LAST) or current of set (FIND PRIOR) looking for a
; record type match. At termination the code returns the
; DBKEY of either the matched record or the owner, however
; the current record type is that of the last record read.
; This is not expected by the verb routines, nor the
; currency update routines, and can cause various types of
; havoc. Since the verb level code in version 6 checks the
; current record type for a match, an undeserved exception
; is a frequent occurance for multi member sets.
;
; [CURE]
;
; Make the find primitives return with the current record
; matching the DBKEY. This will return a member for a record
; match, or the owner for a failure or when the owner is
; normally encountered. Also make the current-of-prior
; routines check for a record type match, and walk the entire
; set for a non match. Eliminate the checks at the verb level
; for owner-of-current-set-occurance and matching record type,
; and only check for having been returned an owner record.
;
;*************** EDIT THE FOLLOWING INTO FILE 442.FIX *********************
.EDIT 442
.NAME EGM
.DATE 13-Sep-82
.MODULE DBFIND
.INSERT FSNOFF+3,REPLACE:1,<CAMN R1,OB.COWN(BLK)>
MOVE R0,OB.REC(BLK) ;[6%442] Owner's RECBLK
CAMN R0,TMP.RB(X) ;[6%442] Bumped into owner?
.ENDI
.INSERT FSPOFF+3,REPLACE:1,<CAMN R1,OB.COWN(BLK)>
MOVE R0,OB.REC(BLK) ;[6%442] Owner's RECBLK
CAMN R0,TMP.RB(X) ;[6%442] Bumped into owner?
.ENDI
.INSERT F3S.EX+2,REPLACE:3,<MOVE R0,CHK.RB(X)>
CAME R2,TMP.RB(X) ;[6%442] Did we find the owner?
JRST F3.EX ;[6%442] No - got record we wanted
.ENDI
.MODULE DBKITM
.INSERT FP.SIM+15,BEFORE,<ADD LINPTR,TB.NOFF(TENBLK)>
SKIPE CHK.RB(X) ;[6%442] Need a specific rec type?
JRST [CAME RECBLK,CHK.RB(X) ;[6%442] And is cur rec that type?
JRST FPSSTOP ;[6%442] No, walk the set
JRST .+1] ;[6%442] Yes
.ENDI
.INSERT FPSSLO+17,BEFORE,<MOVE PAG,SAVKEY(X)>
CAME R0,SAVKEY(X) ;[6%442] If key not that of curr record
JRST [MOVE PAG,SAVKEY(X) ;[6%442] Get final rec (may be owner)
TLZ PAG,(1B0) ;[6%442]
LSHC PAG,-LINWID ;[6%442]
LSH LIN,-<^D36-LINWID> ;[6%442]
PUSHJ P,GET.ONL ;[6%442] For currency updates
JRST .+1] ;[6%442] Need TMP.RB to be correct
.ENDI
.ENDE
;***************************** CAUTION *************************************
;
; TO AVOID LOSING ANY PREVIOUS PATCHES BE
; SURE TO USE THE LATEST PATCHED REL FILES
; AS A BASE FOR THIS EDIT.
;THIS PATCH AFFECTS THE FOLLOWING:
;DBMS COMPONENTS:
; DBMEND
; DBINFO
;
;LANGUAGE INTERFACES:
; FORTRAN (FORLIB.REL,DBMSF.EXE)
; COBOL (LIBOL.REL,LIBO12.EXE,C74LIB.REL,C74O12.EXE)
; ------------------ TO INSTALL THIS EDIT ------------------
;
; @RUN SYS:MAKLIB
; *DBSANY.REL=DBSANY.REL,442.FIX/F
; */EXIT
; @SUBMIT DBMS20 ;DBMS20.CTL FROM DISTRIBUTION TAPE
;
;************************** END OF EDIT 442 *******************************
;******************** START OF DBMS20-V6 EDIT 444 *************************
;
; [SYMPTOM]
;
; DELETE TRANSACTION or a call to JBTRAN produces a
; 1402/1602 exception, and a MERGE BEFORE using the same
; journal produces a 1602 exception part way through backing
; out a transaction. Also data base corruption with no error
; indication after either of these operations, with the
; corrupted data base pages appearing with the bottom most
; part of the page shifted up one or two words towards the top
; of the page.
;
; [DIAGNOSIS]
;
; When a transaction includes a before image block that
; spans multiple journal pages, there is the possibility that
; the block may end on a page such that there is insufficient
; room on that page to place another logical block header. In
; this case, the journal routines mark one or two words of
; free space in the journal page anchor, and continue adding
; blocks beginning with the next page (similar to the way in
; which a transaction trailer appears). The previous size and
; code for the subsequent block show the actual size of the
; block minus the free space, which is the correct
; information.
;
; In backing out a transaction, the complete transaction
; is scanned backwards in order to pick out the before images
; and restore them in reverse order. The routines that do so
; construct an entire before image from possibly multiple
; journal pages using a sequence of BLTs. In the situation
; where a journal page contains nothing but the information
; for a single logical block, the code assumes that the entire
; page will need to be BLTed, and forgets to account for the
; possible free space. The BLT will shift the data up one or
; two words, and cause the BLT for the top of the transaction
; to be 'short' by that number of words. Depending on how
; much of the transaction block is left to be shortchanged,
; the shifted data may move into the position of the data base
; page number for the before image (you generally get the
; highest used,,free word, the first calc chain header, or
; first dbkey) which might be out of range causing the
; 1402/1602. This does not always occur, and you get either a
; bad page number and/or corrupted data.
;
; [CURE]
;
; Account for the possible free space in the full page
; BLT setup code.
;
;*************** EDIT THE FOLLOWING INTO FILE 444.FIX *********************
.EDIT 444
.NAME EGM
.DATE 14-Sep-82
.MODULE DBJOUR
.INSERT JR.SPL+4,REPLACE:1 ;<Should be JUMPL LEFT,[lit]>
JUMPL LEFT,[MOVEI LEFT,JR.PSIZ(JBP) ;EOD + 1
SUB LEFT,BUFLIM ;NOW ALL DATA ON THIS PAGE
HLRZ R0,JP.ANC(JBP) ;[6%444] Offset to last item
TRNN R0,(1B0) ;[6%444] If any free space
SUB LEFT,R0 ;[6%444] Account for it
JRST .+1]
.ENDI
.ENDE
;***************************** CAUTION *************************************
;
; TO AVOID LOSING ANY PREVIOUS PATCHES BE
; SURE TO USE THE LATEST PATCHED REL FILES
; AS A BASE FOR THIS EDIT.
;THIS PATCH AFFECTS THE FOLLOWING:
;DBMS COMPONENTS:
; DBMEND
;
;LANGUAGE INTERFACES:
; FORTRAN (FORLIB.REL,DBMSF.EXE)
; COBOL (LIBOL.REL,LIBO12.EXE,C74LIB.REL,C74O12.EXE)
; ------------------ TO INSTALL THIS EDIT ------------------
;
; @RUN SYS:MAKLIB
; *DBSANY.REL=DBSANY.REL,444.FIX/F
; *MNDANY.REL=MNDANY.REL,444.FIX/F
; */EXIT
; @SUBMIT DBMS20 ;DBMS20.CTL FROM DISTRIBUTION TAPE
;
;************************** END OF EDIT 444 *******************************
;******************** START OF DBMS20-V6 EDIT 446 *************************
;
; [SYMPTOM]
;
; MOVE CURRENCY STATUS can return currency values
; (DBKEYs) for areas that are not currently open. This
; happens most commonly for current of run-unit, and sets
; owned by the SYSTEM record. This behavior conflicts with
; the CODASYL specification, which states that when an area is
; closed, all currency values pretaining to that area are set
; to null.
;
; [DIAGNOSIS]
;
; The SYSTEM record is setup as the current of set for
; all sets for which it is owner. This allows usage of
; singular sets without having to first explicitly locate the
; owner (SYSTEM) record. This setup is accomplished when the
; sub-schema BINDs are executed, which effectively produces
; currency even before it is possible for any to exist. This
; currency is carefully reset and preserved by the area close
; code, which otherwise attempts to zero the pertinent
; currency values for the area being closed. This SYSTEM
; currency is also explicitly set as the initial default when
; multiple transactions are being backed out by a single
; JBTRAN call.
;
; In addition, the close code mishandles DBKEYs for deleted
; records such that they are retained as currency values, sets
; up SYSTEM as the current of area in which it exists (if
; any), and it forgets to zero the current of run-unit value
; when needed.
;
; [CURE]
;
; Eliminate the currency setup for SYSTEM owned singular
; sets in the BIND code, and instead do it only when the area
; containing the SYSTEM record is opened. Alter the code
; which does this setup to make sure that the proper area is
; open, and to make sure it does not overwrite existing
; currency values that may have been set via area FINDs.
; Eliminate all the checks in the area close code which
; preserve the SYSTEM record currency, except the one which
; preerves it in the SYSTEM record itself.
;
; This will have the effect of substituting xx06/15004 (CNU)
; exceptions for xx01/15004 (ANO) exceptions if an attempt is
; made to reference a SYSTEM owned set before the area
; containing the SYSTEM record is opened.
;
;*************** EDIT THE FOLLOWING INTO FILE 446.FIX *********************
.EDIT 446
.NAME EGM
.DATE 7-Oct-82
.MODULE DBCLOS
CUR.RU==135 ;[6%446] Current or run-unit
OB.CNEX==12 ;[6%446] Cannonical next
OB.CPRI==7 ;[6%446] Prior of current
OB.COWN==0 ;[6%446] Owner of curr set occurance
.INSERT CO.EX+11,Replace:^D10,<HRRZ R1,SYSREC(SS)>
HRRZ R0,SYSREC(SS) ;[6%446] Must special case SYSREC rec
.ENDI
.INSERT CLCUR1+2,Replace:2,<SKIPE SYSREC(SS)>
CAIE R0,(R3) ; [6%446] Never zero SYSREC's rec curr
.ENDI
.INSERT CLCUR1+6,Before,<LSH R1,-^D9>
TLZ R1,(1B0) ; [6%446] Elim sign if deleted
.ENDI
.INSERT CLCUR3+1,Replace:^D9,<SKIPE SYSREC(SS)>
SKIPN R1,OB.CUR(R2) ; [6%446] Any current of set?
JRST CLCUR4 ; [6%446] No
TLZ R1,(1B0) ; [6%446] Elim sign if deleted
LSH R1,-^D9 ; [6%446] Isolate page
CAML R1,AB.1STP(AREABLK) ; [6%446] Within area being
CAMLE R1,AB.LAST(AREABLK) ; [6%446] closed?
JRST CLCUR4 ; [6%446] No
SETZM OB.CUR(R2) ; [6%446] Yes, no longer current
SETZM OB.COWN(R2) ; [6%446] By default
SETZM OB.CPRI(R2) ; [6%446] Not defined if no current
SETZM OB.CNEX(R2) ; [6%446]
.ENDI
.INSERT CLCURX+1,Replace:2,<SKIPE SYSREC(SS)>
MOVE R1,CUR.RU(SS) ; [6%446] Current of run-unit
LSH R1,-^D9 ; [6%446] Isolate page number
CAML R1,AB.1STP(AREABLK) ; [6%446] CRU in area to be closed?
CAMLE R1,AB.LASP(AREABLK) ; [6%446]
SKIPA ; [6%446] No
SETZM CUR.RU(SS) ; [6%446] Yes, clear CRU
.ENDI
.MODULE DBOPEN
.INSERT OPB.EX+7,Replace:2,<TLNE SS,(DFT.BIT)>
TLNE SS,(DFT.BIT) ;Default trans active?
PUSHJ P,CLODEF ;Yes, release area lock
HLRZ R0,SYSREC(SS) ;[6%446] SYSREC area if any
CAMN R0,AREABLK ;[6%446] Opening SYSREC area?
PUSHJ P,CURN.S## ;[6%446] SYSREC may own sets
.ENDI
.MODULE DBCURN
AB.BUFPT==6 ;[6%446] Ptr to buffers
.INSERT CURN.S+3,Replace:3,<MOVE CRU,RB.CUR(RECBLK)>
HLRZ AREABLK,SYSREC(SS) ;[6%446] Possibly redundant chk
SKIPN AB.BUFPT(AREABLK) ;[6%446] for open SYSREC area
JRST POP$A ;[6%446] Area not open
MOVE CRU,RB.CUR(RECBLK)
SKIPL LISTPT,RB.ION(RECBLK) ;[6%446] Does it own any sets?
JRST POP$A ;[6%446] No
CRN.SL: HRRZ R1,RB.ROB(LISTPT) ;[6%446] Set block
SKIPN OB.CUR(R1) ;[6%446] Already a curr of set?
JRST [MOVEM CRU,OB.CUR(R1) ;[6%446] No, init set values
SETZM OB.CPRI(R1) ;[6%446] Not possible here
SETZM OB.CNEX(R1) ;[6%446]
MOVEM CRU,OB.COWN(R1) ;[6%446] By default
JRST .+1] ;[6%446]
AOBJN LISTPT,CRN.SL ;[6%446] For all sets owned
JRST POP$A ;[6%446]
.ENDI
.MODULE DBBIND
.ALTER EBIND$+3,<JFCL>,<PUSHJ P,CURN.S> ;[6%436]
.ENDE
;***************************** CAUTION *************************************
;
; TO AVOID LOSING ANY PREVIOUS PATCHES BE
; SURE TO USE THE LATEST PATCHED REL FILES
; AS A BASE FOR THIS EDIT.
;THIS PATCH AFFECTS THE FOLLOWING:
;DBMS COMPONENTS:
; DBINFO
; DBMEND
;
;LANGUAGE INTERFACES:
; FORTRAN (FORLIB.REL,DBMSF.EXE)
; COBOL (LIBOL.REL,LIBO12.EXE,C74LIB.REL,C74O12.EXE)
; ------------------ TO INSTALL THIS EDIT ------------------
;
; @RUN SYS:MAKLIB
; *DBSANY.REL=DBSANY.REL,446.FIX/F
; */EXIT
; @SUBMIT DBMS20/TAG:DBALL ;DBMS20.CTL FROM DISTRIBUTION TAPE
;
;************************** END OF EDIT 446 *******************************
;******************** START OF DBMS20-V6 EDIT 451 *************************
;
; [SYMPTOM]
;
; Exception xx02 (KIA) from DBMS version 6 when
; attempting to split an index block of a multi area sorted
; set created by version 5A. Exception xx02 can also occur
; when creating a new buoy record for a set with members that
; reside in multiple areas.
;
; [DIAGNOSIS]
;
; DBMS version 5A defaulted to storing the index blocks
; in the same area as the first member of the sorted set.
; Version 6 defaults to storing the index blocks with the
; owner record. If the owner exists in a different area than
; the first member, version 6 returns the KIA (key
; inconsistent with area) exception on an index block split
; when it uses the page number of the last index block (member
; area page range) in conjunction with the target page range
; of the owner area.
;
; The second type of KIA exception is likewise caused
; when the page number of the last member in the old buoy
; chain is used with a different area page range for the new
; record (the one causing the buoy chain split). The code
; purposely attempts to keep the buoy and the new record close
; together to promote compact record distribution and faster
; access.
;
; [CURE]
;
; The solution to both problems is to determine if the
; selected page number is outside the targetted page range,
; and if so, select the best possible page number from the
; desired range.
;
; The best solution for the index block problem is either
; to reload the data base to use the version 6 default, or
; change the schema to assign the index blocks to live with
; the first member record (the ASSIGN INDEX phrase)
; essentially simulating the version 5A behavior. While this
; edit does complete the changes required to allow cross area
; index blocks, using this feature is not recommended as it
; adversely affects performance.
;
; This edit also eliminates the KIA exceptions produced
; when a buoy chain split occurs in cross area fashion as
; described. Again, the usage of multiple areas for the
; members of sorted sets is not recommened, since buoys
; obtained from one area will inevitably point to records in
; another area, causing excessive I/O and degrading
; performance.
;
;*************** EDIT THE FOLLOWING INTO FILE 451.FIX *********************
.EDIT 451
.NAME EGM
.DATE 30-Sep-82
.MODULE DBSET
.INSERT NBLSP4,REPLACE:1,<SKIPN R5,PAG.LX(X)>
MOVE R5,PAG.LX(X) ;[6%451] TRY TO BE NEAR LAST IDX BLOCK
CAML R5,YB.FPG(R2) ;[6%451] IS IT WITHIN PAGE RANGE?
CAMLE R5,YB.LPG(R2) ;[6%451] (R2 MAY POINT AT AB.1STP)
.ENDI
.INSERT NEX.BU+26,BEFORE,<MOVEI AP,SETLIT+165>
AB.CUR==0 ;[6%451] CURRENT OF AREA
MOVE R1,R0 ;[6%451] WITHBLK,,AREABLK FOR INDEXING
CAML R5,AB.1STP(R1) ;[6%451] IS PREV REC PAGE WITHIN AREA
CAMLE R5,AB.LASP(R1) ;[6%451] PAGE RANGE SELECTED?
LDB R5,[POINT DBK$PAG,AB.CUR(R1),DBK%PAG] ;[6%451] TRY CURR OF AREA
MOVSS R1 ;[6%451] AREABLK,,WITHBLK
CAML R5,WB.1STP(R1) ;[6%451] IS THAT PAGE WITHIN REC RANGE?
CAMLE R5,WB.LASP(R1) ;[6%451] (SAME CHECKS AS $STORE)
MOVE R5,WB.1STP(R1) ;[6%451] NO, USE FIRST PAGE
.ENDI
.ENDE
;***************************** CAUTION *************************************
;
; TO AVOID LOSING ANY PREVIOUS PATCHES BE
; SURE TO USE THE LATEST PATCHED REL FILES
; AS A BASE FOR THIS EDIT.
;THIS PATCH AFFECTS THE FOLLOWING:
;DBMS COMPONENTS:
; DBINFO
; DBMEND
;
;LANGUAGE INTERFACES:
; FORTRAN (FORLIB.REL,DBMSF.EXE)
; COBOL (LIBOL.REL,LIBO12.EXE,C74LIB.REL,C74O12.EXE)
; ------------------ TO INSTALL THIS EDIT ------------------
;
; @RUN SYS:MAKLIB
; *DBSANY.REL=DBSANY.REL,451.FIX/F
; */EXIT
; @SUBMIT DBMS20/TAG:DBALL ;DBMS20.CTL FROM DISTRIBUTION TAPE
;
;************************** END OF EDIT 451 *******************************
;******************** START OF DBMS20-V6 EDIT 456 *************************
;
; SEE 456.FIX FOR SYMPTOM/DIAGNOSIS/CURE
;
;*************** EDIT THE FOLLOWING INTO FILE 456.F03 *********************
.EDIT 456
.NAME WTK
.DATE 04-NOV-82
.MODULE DBKALC
.INSERT AUSBF+12,REPLACE:3,<SKIPGE R1,FH.STAT(LINPTR)>
SKIPLE R1,FH.STAT(LINPTR) ;GET UPDATER COUNT...IF > 0,
JRST KALLIT+100 ; EXCEPTION ACS,14006
JUMPE R1,AUSBA ;IF = 0, AREA IN DEFINED STATE
TLNN SS,(FOPN.BIT) ;IF WE ARE NOT DBMEND
JRST AUSOTH ; SKIP TO THE NEXT TEST
SETZM FH.STAT(LINPTR) ; ELSE CLEAR THE UPDATER COUNT
JRST AUSBA ; AND GO ON
AUSOTH: TLNN PERMODE,(UM%OTH) ;DID OTHER UPDATERS MAKE IT UNDEFINED?
JRST KALLIT+67 ; NO, EXCEPTION AUS,14005
AUSBA:
.ENDI
.INSERT ADS.BF+6,REPLACE:2,<TLNN SS,(ITR.BIT)>
TLNE SS,(ITR.BIT) ;INCOMPLETE TRANSACTION
JRST ADSPUT ; REMAINS IN JOURNAL
AOSLE FH.STAT(LINPTR) ;SHOW ONE LESS UPDATER
SETZM FH.STAT(LINPTR) ; BUT NEVER LESS THAN ZERO
ADSPUT:
.ENDI
.ENDE
;***************************** CAUTION *************************************
;
; SEE 456.FIX FOR INSTALLATION INSTRUCTIONS
;
;************************** END OF EDIT 456 *******************************
;******************** START OF DBMS20-V6 EDIT 457 *************************
;
; [SYMPTOM]
;
; Numerous problems involving locating records in sorted
; sets:
;
; 1. FIND6 (and FINS6) can return a record of the wrong type.
; This problem also occurs when set occurrence selection is
; thru location mode of owner, for via/sorted sets.
; 2. Range keys do not work as documented. The
; range/error-data flag is never set to 0 on an exact
; match. A range find on a descending key can fail when
; not necessary. Sets in which the TID is the major key
; can return the wrong record. And exception NRS is
; returned for a range key failure, not ESA as documented.
; 3. There is the possibility of unnecessary I/O in certain
; cases.
;
; [DIAGNOSIS]
;
; For the problems as listed above:
;
; 1. No code exists to check for the proper record type.
; 2. The setup for the search algorithm, and some of the
; failure paths, plus the range flag logic are inadequate
; or incorrect. And no attempt is made to differentiate
; the range key/non range key cases in order to return the
; proper exception.
; 3. Not enough checking is done prior to trying the extra
; buoy reads.
;
; [CURE]
;
; Again, as listed above:
;
; 1. Compare the record type desired with the record type last
; compared/found. The appropriate record types must be
; passed to the search/find routines from the callers
; (FIND6, FINS6, and STORE) and the key comparison
; routines.
; 2. Generally rewrite the sorted set search routines to
; handle range keys and the range flag properly. Pass the
; correct range flag back from the key comparison routines,
; and correctly store it in ERROR-DATA for range key
; searchs. Properly determine when a range key search is
; in effect, allowing the search code to always return a
; record when the key value(s) is(are) in the proper range.
; And add tests to cause an ESA exception to be generated
; when the search key value(s) are greater than all record
; key value(s) for the specified record type. This last
; change corresponds to existing documentation and the
; CODASYL specification.
; 3. Addressed by 2.
;
; Note that the change in the FIND6 range key exception type
; from NRS to ESA may be highly significant to existing
; applications. Also note that the only change to FINS6 (the
; obsolete sorted find entry point) is that it now only
; returns a record of the specified type. FINS6 does not
; return range flag data in ERROR-DATA, and only returns
; exception NRS if the find fails.
;
; Pertinent to this edit, we note the following documentation
; changes and clarifications:
;
; 1. There are basiclly only two possible outcomes of a
; successful range key search; an exact match and a non
; exact match. DBMS version 6 offers a variation on the
; second case called a partial or generic key match. In
; order to select a generic match, the user must provide a
; search key (or series of keys) that contain only the data
; to be considered for the partial match. All key
; positions past those to be considered for matching must
; be set to <null>s (<null>= value 0).
;
; In order to set the key data up as required, the user
; must know the order of the record keys as expressed in
; the schema, wherein the first key listed is the major
; (most significant) key, and the last key listed is the
; most minor (least significant) key. If one visualizes
; all the sort keys concatenated together in their order of
; significance, then the data to be considered for the
; search must appear in the most significant key positions
; (leftmost), and the remainder of the key positions must
; be <null>s. While it is possible to end the desired
; search data in the middle of a key, the most common usage
; is for multi key records, where some of the least
; significant keys are set to <null>s, allowing record
; selection via some significant subset of the total number
; of keys.
;
; The indexed search routines compare each position within
; each key, from most significant to least, until either
; all keys are exhausted (a match) or a non match occurs.
; If the comparison fails, and it fails on a <null> in the
; search key, the range flag in ERROR-DATA will be set to a
; 1, otherwise it will be set to a 2. (DBMS version 6
; presently only checks for the first occurrence of a
; <null>, however future implementations may require that
; all key positions after the first <null> also contain
; <null>s).
;
; For example, assume the following sorted set member
; description:
;
; ASCENDING RANGE KEY IS STATE,AREA-CODE,PHONE.
;
; and the data:
;
; Record-Id City State Area-code Phone
;
; Rec1 Chicago IL 312 666-4567
; Rec2 NY City NY 212 885-9923
; Rec3 Utica NY 315 223-4456
; Rec4 Utica NY 315 223-5567
; Rec5 Utica NY 315 447-9876
; Rec6 Albany NY 518 775-9982
; Rec7 Austin TE 512 998-1235
;
; To generically search for state NY; key values are
; State='NY', Area-code=<null>s, Phone=<null>s. The record
; returned is the one with Record-Id = Rec2.
;
; To generically search for state NY, area-code 315; keys
; are State='NY', Area-code='315', Phone=<null>s. The
; record returned has Record-Id = Rec3.
;
; A generic search for state NY, area-code 315, phone
; exchange 223; requires keys State='NY', Area-code='315',
; and Phone='223<null><null><null><null><null>'. This will
; return Rec3 also.
;
; A search for state='NM', Area-code=<null>s, Phone=<null>s
; will return Rec7 and will set the ERROR-DATA value to 2.
;
; 2. If a set's order is defined as ORDER IS SORTED,
; DUPLICATES...., and it is a multi member set, the sort
; keys for each member must agree in size, data type, AND
; whether or not they are ascending or descending.
;
; 3. If any member key is a range key, the search is
; considered to be a range search. This includes sets
; defined as ORDER SORTED (no duplicates clause) and ORDER
; SORTED WITHIN RECORD-NAME where the major key is record
; type (TID).
;
; 4. When specifying DUPLICATES ARE ALLOWED at either the set
; or member level, the default is DUPLICATES ARE LAST.
;
; 5. Exception NRS/28021 has been deleted, and the following
; exception added:
;
; ESA/9021 No match on range key for FIND6 using index
;
;*************** EDIT THE FOLLOWING INTO FILE 457.FIX *********************
.EDIT 457
.NAME EGM
.DATE 28-Oct-82
.MODULE DBFIND
RNGKEY==RK.ERRDAT+1 ;[6%457] Range keys used in find
X9021==^D9021 ;[6%457] ESA range key FIND6
.INSERT FN6.XC+17,Replace:5,<MOVEI 16,FINLIT+306>
MOVEI AP,[-3,,0 ;[6%457]
0(SHTERM) ;[6%457]
OB.CUR(BLK) ;[6%457]
TMP.RB(X)]+1 ;[6%457]
PUSHJ P,MEM.FX ;[6%457] Indexed find
JUMPE R1,[ ;[6%457] No record returned
SKIPN RNGKEY(X) ;[6%457] If no range keys for find
JRST [HRRI R0,X9016 ;[6%457] No such record
PUSHJ P,ERRRG. ;[6%457]
PUSHJ P,XC.NRS] ;[6%457]
JRST [HRRI R0,X9021 ;[6%457] Else end of set
PUSHJ P,ERRRG. ;[6%457]
PUSHJ P,XC.ESA]] ;[6%457]
SKIPN RNGKEY(X) ;[6%457] If no range keys involved
JRST FND.EX ;[6%457] just leave
MOVE R0,RK.ERRDAT(X) ;[6%457] Else get range flag
.ENDI
.INSERT FINS6$+33,Replace:2,<MOVEI 16,FINLIT+306>
MOVEI AP,[-3,,0 ;[6%457]
0(R5) ;[6%457]
OB.CUR(BLK) ;[6%457]
TMP.RB(X)]+1 ;[6%457]
PUSHJ P,MEM.FX ;[6%457] Indexed find
.ENDI
.MODULE DBSET
RNGKEY==RK.ERRDAT+1 ;[6%457] Range keys used in find
CHK.RB==162 ;[6%457] UWA desired record type
VB.KTYP==0 ;[6%457] Key type offset in VIABLK
.INSERT VIAOWN+13,BEFORE,<MOVEI AP,SETLIT+101>
MOVEM RECBLK,CHK.RB(X) ;[6%457] Desired rec type
.ENDI
.INSERT MEM.FX+1,BEFORE,<MOVE R0,@OCCSET(AP)>
MOVE R0,@2(AP) ;[6%457] Desired record type
MOVEM R0,CHK.RB(X) ;[6%457]
.ENDI
.INSERT MEMSOR+10,BEFORE,<POPJ P,>
SETZM RNGKEY(X) ;[6%457] Assume no range keys
MOVE R1,VB.MYC(VIABLK) ;[6%457] AOBJN ptr to sort ctrl keys
MEMS.L: HLRZ R2,VB.KTYP(R1) ;[6%457] Descriptor for key
TRNE R2,KEY.RANG ;[6%457] If a range key
SETOM RNGKEY(X) ;[6%457] note that fact
AOBJN R1,MEMS.L ;[6%457] Check all keys
.ENDI
.INSERT BO.TREE+11,REPLACE:1,<JRST SETLIT+412>
JRST BO.FEX ;[6%457] Let caller handle exception
.ENDI
.INSERT BO.LEAF+1,REPLACE:3,<SKIPG BUOYCNT,XL.CNT(IDXBLK)>
SKIPG BUOYCNT,XL.CNT(IDXBLK) ;[6%457] If selected buoy is empty
JRST [MOVE R1,VB.MYC(VIABLK) ;[6%457] Ptr to ctrl keys
HLRZ R2,VB.KTYP(R1) ;[6%457] First key descriptor
JRST BO.CDU] ;[6%457] See if dups allowed
.ENDI
.INSERT BOL.L1+3,REPLACE:26,<JUMPE R0,BO.EX>
MOVEM R1,RK.ERRDAT(X) ;[6%457] Save range flag for FIND6
CAME R3,CHK.RB(X) ;[6%457] If curr rec not desired type
JRST BOL.LN ;[6%457] Try next rec
JUMPE R0,BO.EX ;[6%457] Done if exact match
JUMPL R0,[ ;[6%457] Located 'insertion' point
SKIPN RNGKEY(X) ;[6%457] If not range key
JRST BO.FEX ;[6%457] Just plain old failed
TRNN R2,KEY.DESC ;[6%457] If range + ascending
JRST BO.EX ;[6%457] Use current rec
JRST BO.FPR] ;[6%457] Else try prior
BOL.LN: SOJG BUOYCNT,BOL.LP ;[6%457] Check all recs in buoy chain
BO.CDU: LDB R0,[POINT MB$DUP,MB.DUP(MEMBLK),MB%DUP] ;[6%457] Dup flags
CAIN R0,DU.NOT ;[6%457] If no dups allowed
JRST BO.NOM ;[6%457] No exact match possible
PUSH P,R2 ;[6%457] Save key descriptor
PUSH P,R3 ;[6%457] Save recblk
PUSHJ P,GET.NBUOY ;[6%457] Get next non empty bouy/owner
POP P,R3 ;[6%457] Restore recblk
POP P,R2 ;[6%457] and key desc
JUMPG BUOYCNT,BO.LE1 ;[6%457] Do compares if not owner
SKIPE RNGKEY(X) ;[6%457] EOS, if not range or
TRNN R2,KEY.DESC ;[6%457] if range + ascending
JRST BO.FEX ;[6%457] End of set after buoy
JRST BO.FPR ;[6%457] Else use prior on range + desc
BO.NOM: SKIPN RNGKEY(X) ;[6%457] No match in buoy, if not range
JRST BO.FEX ;[6%457] key, simply not found
TRNN R2,KEY.DESC ;[6%457] If Range + Ascending
;[6%457] Next of set is greater
JRST [MOVEI AP,[-3,,0 ;[6%457]
CHK.RB(X) ;[6%457]
DBK.HX(X) ;[6%457]
SETBLK]+1 ;[6%457]
PUSHJ P,FND.NS ;[6%457] Get next
JRST BO.COR] ;[6%457] Check owner, relation
CAMN R3,CHK.RB(X) ;[6%457] If curr rec is desired type
JRST BO.EX ;[6%457] Use current for Range + Desc
;[6%457] Otherwise use prior of set
BO.FPR: MOVEI AP,[-3,,0 ;[6%457]
CHK.RB(X) ;[6%457]
DBK.HX(X) ;[6%457]
SETBLK]+1 ;[6%457]
PUSHJ P,FND.PS ;[6%457] Try prior
BO.COR: CAMN R1,OWNDBK(X) ;[6%457] If found owner
JRST BO.FEX ;[6%457] simply not there
MOVEM R1,DBK.HX(X) ;[6%457] Found dbkey
MOVEI AP,[-3,,0 ;[6%457]
DBK.HX(X) ;[6%457]
VB.MYC(VIABLK) ;[6%457]
SETBLK]+1 ;[6%457]
PUSHJ P,CD.ITM ;[6%457] New relation
MOVEM R1,RK.ERRDAT(X) ;[6%457] Simply to get range flag right
.ENDI
.MODULE DBKITM
BLK==PAG ;[6%457] New reg name
.ALTER CD.ITM+3,<JFCL>,<MOVE R0,LIN> ;[6%457] Delete line
.INSERT CD.ITM+7,BEFORE,<JRST POP$A>
MOVE R3,BLK ;[6%457] Pass curr recblk back
.ENDI
.INSERT ITM.2ARG+16,BEFORE,<POP P,TENBLK>
MOVE BLK,RECBLK ;[6%457] Return curr recblk to caller
.ENDI
.INSERT CI.EX+5,REPLACE:3,<CAIN R0,0>
SKIPN R2 ;[6%457] If an exact match
TDZA R1,R1 ;[6%457] Clear range flag
JRST [MOVEI R1,2 ;[6%457] Else assume non match
CAIN R0,0 ;[6%457] If compare stopped at null
MOVEI R1,1 ;[6%457] Change to partial match
JRST .+1] ;[6%457]
.ENDI
.ENDE
;***************************** CAUTION *************************************
;
; TO AVOID LOSING ANY PREVIOUS PATCHES BE
; SURE TO USE THE LATEST PATCHED REL FILES
; AS A BASE FOR THIS EDIT.
;THIS PATCH AFFECTS THE FOLLOWING:
;DBMS COMPONENTS:
; DBINFO
; DBMEND
;
;LANGUAGE INTERFACES:
; FORTRAN (FORLIB.REL,DBMSF.EXE)
; COBOL (LIBOL.REL,LIBO12.EXE,C74LIB.REL,C74O12.EXE)
; ------------------ TO INSTALL THIS EDIT ------------------
;
; @RUN SYS:MAKLIB
; *DBSANY.REL=DBSANY.REL,457.FIX/F
; */EXIT
; @SUBMIT DBMS20/TAG:DBALL ;DBMS20.CTL FROM DISTRIBUTION TAPE
;
;************************** END OF EDIT 457 *******************************