home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / vms / 14501 < prev    next >
Encoding:
Internet Message Format  |  1992-09-02  |  6.9 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!ucbvax!SATURN.GSI.WTZA-BERLIN.DE!scheible
  2. From: scheible@SATURN.GSI.WTZA-BERLIN.DE (manfred scheible)
  3. Newsgroups: comp.os.vms
  4. Subject: Problem with RMS Recovery Unit Journaling
  5. Message-ID: <9209021335.AA01737@saturn.gsi.wtza-berlin.de>
  6. Date: 2 Sep 92 13:35:31 GMT
  7. Sender: daemon@ucbvax.BERKELEY.EDU
  8. Distribution: world
  9. Organization: The Internet
  10. Lines: 236
  11.  
  12. In the following small program, I will demonstrate the occurance
  13. of an error in RMS Journaling for VMS Version 5.4. I have told
  14. my problem to DIGITAL Service Center. The answer was:
  15.  
  16.   .
  17.   .
  18.   .
  19.   "The VMS V5.4 behavior is consistent with the idea of
  20.   streams as 'accessors'".
  21.   .
  22.   .
  23.   .
  24.   "The application evidently was build around the VMS 5.1 behavior,
  25.   but we beleave that behavior was corrected around 1987. The old
  26.   behavior would mean that Stream B and Stream A were not independent
  27.   accessesors".
  28.   .
  29.   .
  30.   .
  31.   "Engineering requests closure of this CLD".
  32.  
  33. This answer is true for $DELETE, but not for $PUT and $UPDATE.
  34. There, a second stream can access a new record in the same recovery
  35. unit.
  36.  
  37. Who has similar problems?
  38.  
  39. Please send replies to info-vax!
  40.  
  41.  
  42. Manfred Scheible
  43.  
  44. mail: scheible@saturn.gsi.wtza-berlin.de
  45. fax:  +49-30-60901-100
  46.  
  47.  
  48. Example:
  49.  
  50. $!           RMSJNL should be licensed.
  51. $
  52. $  macro sys$input /obj=rmsjnl_err
  53.  
  54.         .TITLE  RMSJNL_ERR
  55.  
  56. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  57. ;
  58. ;  Title:   A deleted record in a Recovery Unit is readable
  59. ;           in a second stream.
  60. ;
  61. ;  Product: RMSJNL V5.4-2
  62. ;
  63. ;
  64. ;  Sequence:
  65. ;
  66. ;  (1) SYS$START_RU
  67. ;  (2) SYS$GET      (Stream A) using primary key with rop = rlk
  68. ;  (3) SYS$DELETE   (Stream A)
  69. ;  (4) SYS$GET      (Stream B) using alternate key with rop = nlk
  70. ;  (5) SYS$END_RU
  71. ;
  72. ;  In step (4) I try to access a record deleted in step (3).
  73. ;  Step (4) finished unexpected with success. In VMS Version 5.1
  74. ;  I have never seen this behavior before. There are no documentation
  75. ;  hints about changes in behavior of RMS calls using RU Journaling.
  76. ;
  77. ;  after step (4) the status is
  78. ;  in VMS 5.1-x RMS$_RNF    (%RMS-E-RNF)
  79. ;  in VMS 5.4-2 RMS$_OK_RLK (%RMS-S-OK_RLK)
  80. ;
  81. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  82.  
  83. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  84. ;;;  MACROS  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  85. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  86.  
  87. ; Error check:
  88.  
  89.         .MACRO  CHECK,P1=0,?L1
  90.         CMPL    R0,#RMS$_NORMAL
  91.         BEQL    L1
  92.         CMPL    R0,#SS$_NORMAL
  93.         BEQL    L1
  94.         MOVL    R0,COND1
  95.         MOVL    P1,COND2
  96.         $PUTMSG_S MSGVEC=VECTOR
  97. L1:
  98.         .ENDM
  99.  
  100. ; Text output:
  101.  
  102.         .MACRO  WRITE STRING=<>,?STR,?SKIP
  103.         JMP     SKIP
  104. STR:    .ASCID  /STRING/
  105. SKIP:   PUSHAL  STR
  106.         CALLS   #1,G^LIB$PUT_OUTPUT
  107.         .ENDM
  108.  
  109. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  110. ;;;  DATA  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  111. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  112.  
  113.         .PSECT  DATA,LONG
  114.  
  115. RU_HANDLE: .LONG 0
  116. TID:    .BLKB   16
  117.  
  118. IOSB:   .BLKB   8
  119.  
  120. VECTOR: .LONG   2
  121. COND1:  .LONG   0
  122. COND2:  .LONG   0
  123.  
  124. KEY0:   .ASCII  /BBBBBBBBBB/
  125. KEY1:   .ASCII  /2222222222/
  126. RECORD: .BLKB   20
  127.  
  128.         .ALIGN  LONG
  129.  
  130. FAB:    $FAB -
  131.                 FNM=<RMSJNL_ERR.DAT>,-       ;   File name
  132.                 ORG=IDX,-
  133.                 FAC=<DEL,GET,PUT,UPD>,-      ;   Complete access
  134.                 SHR=<DEL,GET,PUT,UPD,MSE>    ;   Complete sharing
  135.  
  136. RAB0:   $RAB -
  137.                 FAB=FAB,-                    ;   Associated FAB
  138.                 RAC=KEY,-                    ;   Key access
  139.                 ROP=<RLK>,-                  ;   Options
  140.                 KRF=0,-                      ;   Key offset
  141.                 KSZ=10,-                     ;   Key size
  142.                 KBF=KEY0,-                   ;   Key buffer
  143.                 USZ=20,-                     ;   Size of user buffer
  144.                 UBF=RECORD                   ;   User buffer
  145.  
  146. RAB1:   $RAB -
  147.                 FAB=FAB,-                    ;   Associated FAB
  148.                 RAC=KEY,-                    ;   Key access
  149.                 ROP=<NLK>,-                  ;   Options
  150.                 KRF=1,-                      ;   Key offset
  151.                 KSZ=10,-                     ;   Key size
  152.                 KBF=KEY1,-                   ;   Key buffer
  153.                 USZ=20,-                     ;   Size of user buffer
  154.                 UBF=RECORD                   ;   User buffer
  155.  
  156. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  157. ;;;  CODE  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  158. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  159.  
  160.         .PSECT  CODE,NOWRT,LONG
  161.  
  162.         .ENTRY  RMSJNL_ERR,0
  163.  
  164. ;;;  INIT  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  165.  
  166.         WRITE   <*** $OPEN>
  167.         $OPEN   FAB=FAB
  168.         CHECK   FAB+FAB$L_STV
  169.  
  170.         WRITE   <*** $CONNECT stream A>
  171.         $CONNECT RAB=RAB0
  172.         CHECK   RAB0+RAB$L_STV
  173.  
  174.         WRITE   <*** $CONNECT stream B>
  175.         $CONNECT RAB=RAB1
  176.         CHECK   RAB1+RAB$L_STV
  177.  
  178. ;;;  TEST  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  179.  
  180.         WRITE   <*** $START_RU>                 ;
  181.         $START_RU_S RU_HANDLE=RU_HANDLE         ; (1)
  182.         CHECK                                   ;
  183.  
  184. ;;;     WRITE   <*** $START_TRANSW>
  185. ;;;     $START_TRANSW_S IOSB=IOSB,TID=TID
  186. ;;;     CHECK
  187.  
  188.         WRITE   <*** $GET using key 0>          ;
  189.         $GET    RAB=RAB0                        ; (2)
  190.         CHECK   RAB0+RAB$L_STV                  ;
  191.  
  192.         WRITE   <*** $DELETE>                   ;
  193.         $DELETE RAB=RAB0                        ; (3)
  194.         CHECK   RAB0+RAB$L_STV                  ;
  195.  
  196.         WRITE   <*** $GET using key 1>          ;
  197.         $GET    RAB=RAB1                        ; (4)
  198.         CHECK   RAB1+RAB$L_STV                  ;
  199.  
  200.         WRITE   <*** $ABORT_RU>                 ;
  201.         $ABORT_RU_S RU_HANDLE=RU_HANDLE         ; (5)
  202.  
  203. ;;;     WRITE   <*** $ABORT_TRANSW>
  204. ;;;     $ABORT_TRANSW_S IOSB=IOSB,TID=TID
  205.  
  206. ;;;  FINISH  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  207.  
  208.         WRITE   <*** $CLOSE>
  209.         $CLOSE  FAB=FAB
  210.         CHECK   FAB+FAB$L_STV
  211.  
  212.         RET
  213.  
  214.         .END    RMSJNL_ERR
  215. $  link rmsjnl_err
  216. $
  217. $  create /fdl=sys$input
  218.  
  219. FILE
  220.         NAME                    RMSJNL_ERR.DAT
  221.         ORGANIZATION            indexed
  222.  
  223. RECORD
  224.         FORMAT                  fixed
  225.         SIZE                    20
  226.  
  227. KEY 0
  228.         TYPE                    string
  229.         SEG0_LENGTH             10
  230.         SEG0_POSITION           0
  231.  
  232. KEY 1
  233.         TYPE                    string
  234.         DUPLICATES              yes
  235.         CHANGES                 yes
  236.         SEG0_LENGTH             10
  237.         SEG0_POSITION           10
  238. $
  239. $  open /read /write fff RMSJNL_ERR.DAT
  240. $  write fff "AAAAAAAAAA1111111111"
  241. $  write fff "BBBBBBBBBB2222222222"
  242. $  write fff "CCCCCCCCCC3333333333"
  243. $  close fff
  244. $
  245. $  set file RMSJNL_ERR.DAT /ru_jour
  246.  
  247.  
  248.