User Tools

Site Tools


cdc:nos2.source:opl871:btask

Table of Contents

BTASK

Table Of Contents

  • [00010] RECOVER *BTRAN* USERS.
  • [00091] RECOVER *BTRAN* USERS.

Source Code

BTASK.txt
  1. IDENT BTASK
  2. ENTRY BTASK
  3. LCC OVERLAY(BTASK,0,0)
  4. SST BEGN,CMBL
  5. SYSCOM B1
  6. BTASK TITLE BTASK - RECOVER *BTRAN* USERS.
  7. *COMMENT BTASK - RECOVER *BTRAN* USERS.
  8. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  9. BTASK SPACE 4,10
  10. *** BTASK - RECOVER *BTRAN* USERS.
  11. *
  12. * E. D. REDIG. 80/10/06.
  13. BTASK SPACE 4,25
  14. *** *BTASK* RECOVERS RERUNNABLE *BTRAN* TRANSACTIONS AND
  15. * MUST BE INSTALLED ON THE TAF SYSTEM LIBRARY.
  16. *
  17. * *BTASK* READS THE ENTIRE *CRF* BY ISSUING *TSTAT* REQUESTS
  18. * TO OBTAIN INFORMATION ABOUT EACH USER AND PROCESSES THIS
  19. * INFORMATION AS FOLLOWS.
  20. *
  21. * 1. IF THE TRANSACTION TYPE IS NOT A *BTRAN* USER, THEN
  22. * READ THE NEXT *CRF* ENTRY.
  23. *
  24. * 2. IF THE TRANSACTION STEP IS NOT RECOVERABLE, THEN
  25. * READ THE NEXT *CRF* ENTRY.
  26. *
  27. * 3. MOVE THE *OLDID*, *NEWID*, USERNAME, AND *BTRAN* USER
  28. * CASE TO THE COMMUNICATION BLOCK.
  29. *
  30. * 4. ISSUE A *CALLRTN* TO *CTASK* TO RERUN
  31. * THE TRANSACTION AND READ THE NEXT *CRF* ENTRY.
  32. BTASK SPACE 4,20
  33. *** DAYFILE MESSAGES ISSUED.
  34. *
  35. * ABNORMAL COMPLETION.
  36. *
  37. * * BTASK - TAF AUTOMATIC RECOVERY NOT INSTALLED.*
  38. * KEYWORD SPECIFIED IN A *TSTAT* REQUEST REQUIRES
  39. * *TAF* AUTOMATIC RECOVERY.
  40. *
  41. * * BTASK - TASK LOGICAL ERROR.*
  42. * A LOGICAL ERROR OCCURRED THAT WAS NOT EXPECTED.
  43. *
  44. * * BTASK - USER NOT DEFINED IN NETWORK FILE.*
  45. * THE USER IS NOT DEFINED IN THE NETWORK FILE
  46. * ON A *TSTAT* REQUEST.
  47. *
  48. * * BTASK - XXXXXXX TRANSACTION NOT RERUNNABLE NOW.*
  49. * THIS OCCURS WHEN AN I/O ERROR IS DETECTED AND THE
  50. * DATA CANNOT BE RECOVERED FOR THE USER XXXXXXX.
  51. BTASK SPACE 4,10
  52. *** COMMON DECKS.
  53.  
  54.  
  55. *CALL COMCMAC
  56. *CALL COMKTAF
  57. *CALL COMKFLD
  58. *CALL COMKIPR
  59. *CALL COMKMAC
  60.  
  61. * SAVE ORIGIN COUNTER TO REMOVE COMMON DECK STORAGE
  62. * IN *COMKCBD*, *COMKTSC*.
  63.  
  64. BEGN BSS 0 SAVE ORIGIN COUNTER
  65. *CALL COMKCBD
  66. LIST X
  67. *CALL COMKTRF
  68. LIST -X
  69. *CALL COMKTSC
  70. ORG BEGN RESTORE ORIGIN COUNTER
  71. BTASK SPACE 4,15
  72. *** COMMUNICATION BLOCK HEADER WORDS AND MESSAGES.
  73. *
  74. *T TMSW 60/ CASE
  75. *T, TMSW+1 60/ RECOVERY FLAG (RF)
  76. *T, TMSW+2 60/ OLDID
  77. *T, TMSW+3 60/ NEWID
  78. *T, TMSW+4 60/ USERNAME
  79. *
  80. * CASE = 2 RECOVER *BTRAN* USER.
  81. * RF IF BIT 59 = 1, *CRM* AUTOMATIC RECOVERY IS USED.
  82. * IF BIT 0 = 1, *TAF* AUTOMATIC RECOVERY IS USED.
  83. * OLDID = PREVIOUS *CRM* IDENTIFIER.
  84. * NEWID = CURRENT *CRM* IDENTIFIER.
  85. * USERNAME = ONE-TO-SEVEN CHARACTER USERNAME LEFT-JUSTIFIED
  86. * WITH BLANK FILL.
  87.  
  88.  
  89. BSS CMBL RESERVE SPACE FOR COMMUNICATION BLOCK
  90. BTASK SPACE 4,25
  91. ** BTASK - RECOVER *BTRAN* USERS.
  92. *
  93. * ENTRY BOI OF *CRF*.
  94. *
  95. * EXIT RERUNNABLE *BTRAN* TRANSACTIONS RECOVERED.
  96. * TO *CTASK* TO RERUN TRANSACTIONS AND RETURN.
  97. * (TMSW) = RECOVER *BTRAN* USER CASE.
  98. * (TMSW+1) = RECOVERY FLAG.
  99. * (TMSW+2) = OLDID.
  100. * (TMSW+3) = NEWID.
  101. * (TMSW+4) = USERNAME.
  102. *
  103. * ERROR TO *BTA4* IF ERROR ENCOUNTERED.
  104. *
  105. * USES X - 1, 2, 3, 5, 6, 7.
  106. * A - 1, 2, 6, 7.
  107. * B - 1, 2, 3, 5.
  108. *
  109. * CALLS SNM.
  110. *
  111. * MACROS CALLRTN, CEASE, SCALL.
  112.  
  113.  
  114. BTASK SB1 1 ENTRY
  115. SA2 TNAM
  116. SX5 BTAC DAYFILE MESSAGE
  117. SA1 BTAW
  118. LX2 59-CBSYS
  119. BX6 X1
  120. SB3 BTACL MESSAGE LENGTH
  121. PL X2,BTA4 IF NOT SYSTEM ORIGIN TRANSACTION
  122. SA6 BTAN INITIALIZE *NEXT* FOR *TSTAT*
  123.  
  124. * ISSUE *TSTAT* REQUEST TO OBTAIN STATUS OF TRANSACTION.
  125.  
  126. BTA1 SCALL TSTAT,(BTAL,BTAM,BTAN,BTAO,BTAP,BTAQ,BTAR,BTAS,BTAT,BTA
  127. ,U,BTAV)
  128. SA1 BTAL GET STATUS OF REQUEST
  129. SX5 BTAB DAYFILE MESSAGE
  130. SX2 X1-TSRU
  131. SB3 BTABL MESSAGE LENGTH
  132. ZR X2,BTA4 IF RECOVERY UNAVAILABLE
  133. SX2 X1-TSEN
  134. ZR X2,BTA5 IF END OF *NEXT* PROCESSING
  135. SX5 BTAD DAYFILE MESSAGE
  136. SX2 X1-TSUU
  137. SB3 BTADL MESSAGE LENGTH
  138. ZR X2,BTA4 IF USER UNKNOWN
  139. SX5 BTAC DAYFILE MESSAGE
  140. SX2 X1-TSNE
  141. SB3 BTACL MESSAGE LENGTH
  142. NZ X2,BTA4 IF ERRORS IN *TSTAT*
  143. SA1 BTAR GET TRANSACTION TYPE
  144. SX2 X1-TYBT
  145. NZ X2,BTA1 IF NOT *BTRAN* USER
  146. SA1 BTAP GET TRANSACTION STEP
  147. SX2 X1-CSCD
  148. ZR X2,BTA3 IF *CDCS2* DOWN
  149. SX2 X1-CSTN
  150. NZ X2,BTA2 IF NOT TRANSACTION NO LONGER RERUNNABLE
  151.  
  152. * THIS OCCURS WHEN AN I/O ERROR IS DETECTED AND THE
  153. * DATA CANNOT BE RECOVERED FOR THE USER.
  154.  
  155. SB2 1RX
  156. SA1 BTAN GET RECOVERY UNIT NAME
  157. SB3 BTAX MESSAGE ASSEMBLY AREA
  158. SB5 -BTAE
  159. RJ SNM SET NAME IN MESSAGE
  160. SB3 BTAEL MESSAGE LENGTH
  161. SA2 BTAX
  162. SCALL TMSG,(A2,B3) SEND MESSAGE TO DAYFILE
  163. EQ BTA1 GET NEXT *BTRAN* USER
  164.  
  165. BTA2 PL X2,BTA3 IF STEP IS TO BE RECOVERED
  166. EQ BTA1 GET NEXT *BTRAN* USER
  167.  
  168. * ISSUE A *CALLRTN* TO *CTASK* TO RERUN THE TRANSACTION
  169. * AND READ THE NEXT *CRF* ENTRY.
  170.  
  171. BTA3 SX6 TYBT SET *BTRAN* USER CASE
  172. SA1 BTAT GET *OLDID*
  173. SA2 BTAV GET *NEWID*
  174. SA6 TMSW STORE CASE IN COMMUNICATION BLOCK
  175. BX6 X1
  176. BX7 X2
  177. SA6 TMSW+2 STORE *OLDID* IN COMMUNICATION BLOCK
  178. SA7 TMSW+3 STORE *NEWID* IN COMMUNICATION BLOCK
  179. SA1 BTAN GET USERNAME
  180. BX7 X1
  181. SA7 A7+B1 STORE USERNAME IN COMMUNICATION BLOCK
  182. CALLRTN BTAA CALL *CTASK* TO RERUN TRANSACTION
  183. EQ BTA1 GET NEXT *BTRAN* USER
  184.  
  185. BTA4 SCALL TMSG,(X5,B3) SEND MESSAGE TO DAYFILE
  186. CEASE 2 ABNORMAL CEASE WITH DUMP
  187.  
  188. BTA5 CEASE EXIT TASK WITH CEASE
  189.  
  190. * *CALLRTN* TASK LIST.
  191.  
  192. BTAA DATA 5LCTASK CALL TO *CTASK*
  193. CON 0
  194.  
  195. * DAYFILE MESSAGES.
  196.  
  197. BTAB DATA C* BTASK - TAF AUTOMATIC RECOVERY NOT INSTALLED.*
  198. BTABL CON **10-BTAB*10
  199. BTAC DATA C* BTASK - TASK LOGICAL ERROR.*
  200. BTACL CON **10-BTAC*10
  201. BTAD DATA C* BTASK - USER NOT DEFINED IN NETWORK FILE.*
  202. BTADL CON **10-BTAD*10
  203. BTAE DATA C* BTASK - XXXXXXX TRANSACTION NOT RERUNNABLE NOW.*
  204. BTAEL CON **10-BTAE*10
  205.  
  206. * *TSTAT* REQUEST PARAMETERS.
  207.  
  208. BTAL CON 0 STATUS OF *TSTAT* REQUEST
  209. BTAM DATA 4HNEXT
  210. BTAN CON 0 NEXT USER FROM *TRF*
  211. BTAO DATA 4HSTEP
  212. BTAP CON 0 TRANSACTION STEP
  213. BTAQ DATA 4HTRAN
  214. BTAR CON 0 TRANSACTION TYPE
  215. BTAS DATA 5HOLDID
  216. BTAT CON 0 PREVIOUS *CRM* IDENTIFIER
  217. BTAU DATA 5HNEWID
  218. BTAV CON 0 CURRENT *CRM* IDENTIFIER
  219.  
  220. BTAW DATA 1H BLANK WORD
  221. BTAX BSSZ 7 DAYFILE MESSAGE ASSEMBLY AREA
  222. BTASK SPACE 4,10
  223. ** COMMON DECKS.
  224.  
  225.  
  226. *CALL COMCSNM
  227.  
  228.  
  229. END BTASK
cdc/nos2.source/opl871/btask.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator