User Tools

Site Tools


cdc:nos2.source:opl871:ctask

Table of Contents

CTASK

Table Of Contents

  • [00010] RECOVER DATA BASE OR USER TASK.
  • [00096] CTASK ROUTINES.
  • [00127] RECOVER DATA BASE OR USER TASK.
  • [00199] RIU - RECOVER INTERACTIVE USER.
  • [00333] RBU - RECOVER *BTRAN* USER.
  • [00416] RDB - RECOVER *CRM* DATA BASE.
  • [00590] RTF - RECOVER TERMINAL FAILURE.
  • [00698] CCE - COUNT *CRMSTAT* ENTRIES.
  • [00723] CSN - COMPARE SEQUENCE NUMBERS.
  • [00768] RBC - RECOVER BEGIN-COMMIT HISTORY.
  • [00869] RBH - RECOVER BEGIN-COMMIT HISTORY FOR TERMINAL FAILURES.
  • [00962] RDC - ROLL BACK DATA TO CONSISTENT STATE.
  • [01042] RCS - ROLL BACK DATA TO CONSISTENT STATE FOR
  • [01085] RID - RESTORE DATA BASE IDENTIFIERS.

Source Code

CTASK.txt
  1. IDENT CTASK
  2. LCC OVERLAY(CTASK,0,0)
  3. SST BEGN,CMBL
  4. ENTRY CTASK
  5. SYSCOM B1
  6. CTASK TITLE CTASK - RECOVER DATA BASE OR USER TASK.
  7. *COMMENT CTASK - RECOVER DATA BASE OR USER TASK.
  8. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  9. CTASK SPACE 4,10
  10. *** CTASK - RECOVER DATA BASE OR USER TASK.
  11. *
  12. * E. D. REDIG. 80/06/11.
  13. CTASK SPACE 4,10
  14. *** *CTASK* HANDLES THE FOLLOWING RECOVERY CASES:
  15. *
  16. * 1. INTERACTIVE USERS.
  17. * 2. *BTRAN* (BATCH) USERS.
  18. * 3. *CRM* DATA BASES.
  19. * 4. TERMINAL FAILURES.
  20. *
  21. * FOR A MORE COMPLETE DESCRIPTION REFER TO THE
  22. * APPROPRIATE PROCESSOR WITHIN *CTASK*.
  23. CTASK SPACE 4,50
  24. *** DAYFILE MESSAGES ISSUED.
  25. *
  26. * ABNORMAL COMPLETION.
  27. *
  28. * * CTASK - DATA BASE OR FILE DOWN.*
  29. * THE DATA BASE, *TAF*/*CRM*, OR FILE IS DOWN ON
  30. * AN *RSTDBI* REQUEST.
  31. *
  32. * * CTASK - DATA BASE OR FILE IDLE.*
  33. * THE DATA BASE, *TAF/CRM*, OR FILE IS IDLE ON
  34. * AN *RSTDBI* REQUEST.
  35. *
  36. * * CTASK - FILE IS NOT INSTALLED.*
  37. * DATA BASE OR FILE NOT AVAILABLE IN *XXJ* FILE
  38. * ON A *CRMSTAT* REQUEST.
  39. *
  40. * * CTASK - INCORRECT RECOVERY CASE.*
  41. * RECOVER CASE NOT VALID.
  42. *
  43. * * CTASK - NO CRM RECOVERY FILES FOR DATA BASE.*
  44. * NO RECOVERY FILE ASSIGNED TO THE DATA BASE ON
  45. * AN *RSTDBI* REQUEST.
  46. *
  47. * * CTASK - SYSTEM IDENTIFIER UNKNOWN.*
  48. * OLD SYSTEM IDENTIFIER UNKNOWN WHEN ISSUING A
  49. * *TINVOKE* REQUEST.
  50. *
  51. * * CTASK - TABLE AREA NOT LARGE ENOUGH.*
  52. * THE TABLE AREA SUPPLIED BY *CTASK* FOR A *CRMSTAT*
  53. * REQUEST IS NOT LARGE ENOUGH.
  54. *
  55. * * CTASK - TASK LOGICAL ERROR.*
  56. * A LOGICAL ERROR OCCURRED THAT WAS NOT EXPECTED.
  57. *
  58. * * CTASK - TRANSACTION NOT RERUNNABLE.*
  59. * A TRANSACTION IS NOT RERUNNABLE AND A *RERUN*
  60. * WAS ATTEMPTED.
  61. *
  62. * * CTASK - TRMREC ERROR.*
  63. * ONE OF THE FOLLOWING OCCURRED.
  64. * 1. THERE WAS NO OUTSTANDING *DBEGIN* REQUEST.
  65. * 2. AN ERROR WAS ENCOUNTERED ON A DATA BASE OR
  66. * RECOVERY FILE.
  67. * 3. THE DATA BASE OR *TAF*/*CRM* IS DOWN.
  68. *
  69. * * CTASK - USER NOT DEFINED IN NETWORK FILE.*
  70. * THE *USER* IS NOT DEFINED IN THE *NETWORK* FILE
  71. * ON AN *SRERUN*, *TSTAT* OR *WSTAT* REQUEST.
  72.  
  73.  
  74. * COMMON DECKS.
  75.  
  76.  
  77. *CALL COMCMAC
  78. *CALL COMKTAF
  79. *CALL COMKFLD
  80. *CALL COMKIPR
  81. *CALL COMKMAC
  82.  
  83. * SAVE ORIGIN COUNTER TO REMOVE COMMON DECK STORAGE IN
  84. * *COMKCBD*, *COMKCRM*, *COMKTDM*, *COMKTER*, AND *COMKTSC*.
  85.  
  86. BEGN BSS 0
  87. *CALL COMKCBD
  88. LIST X
  89. *CALL COMKCRM
  90. *CALL COMKTDM
  91. *CALL COMKTER
  92. *CALL COMKTRF
  93. LIST -X
  94. *CALL COMKTSC
  95. ORG BEGN RESTORE ORIGIN COUNTER
  96. TITLE CTASK ROUTINES.
  97. CTASK SPACE 4,15
  98. *** COMMUNICATION BLOCK HEADER WORDS AND MESSAGES.
  99. *
  100. * INPUT TO *CTASK* APPEARS IN THE COMMUNICATION BLOCK.
  101. * THE INPUT IS AS FOLLOWS.
  102. *
  103. *T TMSW 60/ CASE
  104. *T, TMSW+1 60/ RECOVERY FLAG (RF)
  105. *T, TMSW+2 60/ OLDID
  106. *T, TMSW+3 60/ NEWID
  107. *T, TMSW+4 60/ USERNAME
  108. *T, TMSW+5 60/ *SRERUN* STATUS (RS)
  109. *
  110. * CASE = 1 RECOVER INTERACTIVE USER.
  111. * = 2 RECOVER *BTRAN* USER.
  112. * = 3 RECOVER *CRM* DATA BASE.
  113. * = 4 RECOVER TERMINAL FAILURE.
  114. * RF BIT 59 = 1, IF *CRM* AUTOMATIC RECOVERY USED.
  115. * BIT 0 = 1, IF *TAF* AUTOMATIC RECOVERY USED.
  116. * OLDID = PREVIOUS *CRM* IDENTIFIER.
  117. * NEWID = CURRENT *CRM* IDENTIFIER.
  118. * USERNAME = ONE-TO-SEVEN CHARACTER USERNAME LEFT-JUSTIFIED
  119. * WITH BLANK FILL.
  120. * RS = 0, IF *SRERUN* SUCCESSFUL.
  121. * = 1, IF *SRERUN* NOT SUCCESSFUL.
  122. * = -1, IF DATA BASE FILE DOWN.
  123.  
  124.  
  125. BSS CMBL RESERVE SPACE FOR COMMUNICATION BLOCK
  126. CTASK SPACE 4,20
  127. ** CTASK - RECOVER DATA BASE OR USER TASK.
  128. *
  129. * ENTRY (TMSW) = RECOVERY MESSAGE (DATA BASE OR USER).
  130. *
  131. * EXIT SPECIFIED RECOVERY CASE PROCESSED.
  132. *
  133. * ERROR TO *CTA1* IF INCORRECT CASE.
  134. *
  135. * USES X - 3, 6.
  136. * A - 3.
  137. * B - 1, 2.
  138. *
  139. * CALLS RBU, RDB, RIU, RTF.
  140. *
  141. * MACROS CEASE, SCALL.
  142.  
  143.  
  144. CTASK SB1 1
  145. SA3 TMSW GET RECOVER CASE
  146. LX3 -1
  147. SX6 X3-TCTAL
  148. SB2 X3
  149. PL X6,CTA1 IF INCORRECT RECOVERY CASE.
  150. JP B2+TCTA JUMP THRU TABLE
  151.  
  152. TCTA PL X3,CTA1 UNUSED CASE
  153. EQ RIU RECOVER INTERACTIVE USER
  154. PL X3,RBU RECOVER *BTRAN* USER
  155. EQ RDB RECOVER *CRM* DATA BASE
  156. PL X3,RTF RECOVER TERMINAL FAILURE
  157. EQ CTA1 INCORRECT RECOVERY CASE
  158. TCTAL EQU *-TCTA LENGTH OF *CTASK* JUMP TABLE
  159.  
  160. * THE PROCESSORS *RIU*, *RBU*, *RDB*, AND *RTF*
  161. * RETURN TO THE CODE BELOW TO TERMINATE PROCESSING.
  162.  
  163. CTA1 SX3 CTAD INCORRECT RECOVERY CASE
  164. CTA2 SA3 X3
  165. AX3 18
  166. SCALL TMSG,(X3,A3) SEND DAYFILE MESSAGE
  167. CTA3 CEASE EXIT TASK WITH CEASE
  168.  
  169. CTA4 SA3 X3
  170. AX3 18
  171. SCALL TMSG,(X3,A3) SEND DAYFILE MESSAGE
  172. CTA5 CEASE 2 ABNORMAL CEASE WITH MEMORY DUMP
  173.  
  174. * DAYFILE MESSAGES.
  175.  
  176. CTAAM DATA C* CTASK - DATA BASE OR FILE DOWN.*
  177. CTAA VFD 42/CTAAM,18/**10-CTAAM*10
  178. CTACM DATA C* CTASK - FILE IS NOT INSTALLED.*
  179. CTAC VFD 42/CTACM,18/**10-CTACM*10
  180. CTADM DATA C* CTASK - INCORRECT RECOVERY CASE.*
  181. CTAD VFD 42/CTADM,18/**10-CTADM*10
  182. CTAEM DATA C* CTASK - NO CRM RECOVERY FILES FOR DATA BASE.*
  183. CTAE VFD 42/CTAEM,18/**10-CTAEM*10
  184. CTAFM DATA C* CTASK - SYSTEM IDENTIFIER UNKNOWN.*
  185. CTAF VFD 42/CTAFM,18/**10-CTAFM*10
  186. CTAGM DATA C* CTASK - TABLE AREA NOT LARGE ENOUGH.*
  187. CTAG VFD 42/CTAGM,18/**10-CTAGM*10
  188. CTAHM DATA C* CTASK - TASK LOGICAL ERROR.*
  189. CTAH VFD 42/CTAHM,18/**10-CTAHM*10
  190. CTAIM DATA C* CTASK - TRANSACTION NOT RERUNNABLE.*
  191. CTAI VFD 42/CTAIM,18/**10-CTAIM*10
  192. CTAJM DATA C* CTASK - TRMREC ERROR.*
  193. CTAJ VFD 42/CTAJM,18/**10-CTAJM*10
  194. CTAKM DATA C* CTASK - USER NOT DEFINED IN NETWORK FILE.*
  195. CTAK VFD 42/CTAKM,18/**10-CTAKM*10
  196. CTALM DATA C* CTASK - DATA BASE OR FILE IDLE.*
  197. CTAL VFD 42/CTALM,18/**10-CTALM*10
  198. CTASK SPACE 4,35
  199. ** RIU - RECOVER INTERACTIVE USER.
  200. *
  201. * TO RECOVER AN INTERACTIVE USER A *TINVOKE* REQUEST IS
  202. * ISSUED USING ONLY THE *NEW-SYS-ID* PARAMETER. THIS
  203. * RETURNS A NEW SYSTEM IDENTIFIER (TRANSACTION SEQUENCE
  204. * NUMBER) TO BE USED FOR ALL TASKS IN THE RECOVERY UNIT.
  205. *
  206. * NEXT, AN *RSTDBI* REQUEST IS USED TO RESTORE THE
  207. * BEGIN IDENTIFIERS TO *CRM* FOR A RECOVERED TRANSACTION.
  208. *
  209. * THEN, AN *SRERUN* REQUEST IS ISSUED TO CAUSE THE INITIAL
  210. * TERMINAL INPUT FOR A RERUNNABLE TRANSACTION TO BE
  211. * RESUBMITTED TO THE TRANSACTION SYSTEM.
  212. *
  213. * FINALLY, A *RECOVERY, RERUNNING TRANSACTION.* MESSAGE IS
  214. * SENT TO THE ORIGINATING TERMINAL. WHEN *CTASK* CEASES,
  215. * *ITASK* IS CALLED AS IF THE INPUT CAME FROM THE TERMINAL.
  216. *
  217. * ENTRY RECOVER INTERACTIVE USER CASE SELECTED.
  218. * (TMSW+1) = RECOVERY FLAG.
  219. *
  220. * EXIT TO *CTA3* FOR CEASE.
  221. * (TMSW+5) = 0, IF *SRERUN* SUCCESSFUL.
  222. * = 1, IF *SRERUN* NOT SUCCESSFUL.
  223. * = -1, IF DATA BASE FILE DOWN.
  224. *
  225. * ERROR (X3) = FWA OF DAYFILE MESSAGE PARAMETERS.
  226. * (TMSW+5) = *SRERUN* STATUS.
  227. * TO *CTA2* IF ERROR AND NORMAL CEASE.
  228. * TO *CTA4* IF ERROR AND ABNORMAL CEASE.
  229. *
  230. * USES X - 2, 3, 4, 6.
  231. * A - 2, 3, 6.
  232. *
  233. * CALLS RID.
  234. *
  235. * MACROS SCALL, TRMREC.
  236.  
  237.  
  238. RIU SA2 TMSW+1 GET RECOVERY FLAG
  239. SX3 B0
  240. SX6 B1
  241. PL X2,RIU1 IF NO *CRM* RECOVERY
  242.  
  243. * ISSUE *TINVOKE* USING *NEW-ID* TO GET NEW SEQUENCE NUMBER.
  244.  
  245. SCALL TINVOKE,(RIUC,RIUD)
  246. SA2 RIUC GET STATUS OF REQUEST
  247. SX3 CTAH TASK LOGICAL ERROR
  248. SX4 X2-TSNE NO ERRORS STATUS
  249. SX6 B1+
  250. NZ X4,RIU2 IF ERRORS IN *TINVOKE*
  251.  
  252. * RETURN BEGIN-COMMIT HISTORY TO *CRM* WITH *RSTDBI*.
  253.  
  254. RJ RID RESTORE DATA BASE IDENTIFIERS
  255. SX3 CTAE RECOVERY FILE NOT ASSIGNED TO DATA BASE
  256. SX4 X2-TERAF
  257. SX6 B1+
  258. ZR X4,RIU2 IF NO RECOVERY FILE FOR DATA BASE
  259. SX3 CTAA DATA BASE OR FILE DOWN
  260. SX4 X2-TERAK
  261. SX6 -1
  262. ZR X4,RIU2 IF DATA BASE OR FILE DOWN
  263. SX3 CTAL DATA BASE OR FILE IDLE
  264. SX4 X2-TERAG
  265. ZR X4,RIU2 IF DATA BASE OR FILE IDLE
  266. SX3 CTAH TASK LOGICAL ERROR
  267. SX6 B1+
  268. NZ X2,RIU2 IF REQUEST NOT SUCCESSFUL
  269. SX4 B0+
  270. SX3 B0+
  271. RIU1 SA2 TMSW+1 GET RECOVERY FLAG
  272. SX2 X2+
  273. ZR X2,RIU2 IF NO *TAF* AUTOMATIC RECOVERY
  274.  
  275. * ISSUE *SRERUN* REQUEST TO RERUN TRANSACTION.
  276.  
  277. SCALL SRERUN,(RIUB)
  278. SA2 RIUB GET STATUS OF REQUEST
  279. SX3 CTAI TRANSACTION NOT RERUNNABLE
  280. SX4 X2-TSNO
  281. SX6 B1+
  282. ZR X4,RIU2 IF TRANSACTION NOT RERUNNABLE
  283. SX3 CTAK USER NOT DEFINED IN NETWORK FILE
  284. SX4 X2-TSUU
  285. ZR X4,RIU2 IF USER UNKNOWN
  286. SX3 CTAH TASK LOGICAL ERROR
  287. SX4 X2-TSNE NO ERRORS STATUS
  288. NZ X4,RIU2 IF ERRORS IN *SRERUN*
  289. SX6 B0+
  290. SA6 TMSW+5 STORE *RERUN* SUCCESSFUL
  291. EQ CTA3 CEASE
  292.  
  293. RIU2 SA6 TMSW+5 STORE *SRERUN* NOT SUCCESSFUL
  294. SX6 X4
  295. SA6 A6+B1 STORE CEASE TYPE
  296. SX6 X3
  297. SA6 A6+B1 STORE DAYFILE MESSAGE
  298. SA2 TMSW+5
  299. NG X2,RIU3 IF FILE DOWN OR IDLE
  300. SA2 TMSW+1 GET RECOVERY FLAG
  301. PL X2,RIU3 IF NO *CRM* RECOVERY
  302.  
  303. * ISSUE *TRMREC* REQUEST TO CLEAR *CRM* TABLES ON ERROR.
  304.  
  305. TRMREC RIUE
  306. SA2 RIUG GET STATUS OF REQUEST
  307. SX3 CTAJ *TRMREC* ERROR
  308. NZ X2,CTA2 IF REQUEST NOT SUCCESSFUL
  309. RIU3 SA3 TMSW+7 GET DAYFILE MESSAGE
  310. ZR X3,CTA3 IF NO MESSAGE THEN CEASE
  311. SA2 TMSW+6 GET CEASE TYPE
  312. ZR X2,CTA2 IF ERROR WITH NORMAL CEASE
  313. EQ CTA4 ERROR WITH ABNORMAL CEASE
  314.  
  315. * *SRERUN* REQUEST PARAMETER.
  316.  
  317. RIUB CON 0 STATUS OF REQUEST
  318.  
  319. * *TINVOKE* REQUEST PARAMETERS.
  320.  
  321. RIUC CON 0 STATUS OF REQUEST
  322. RIUD CON 0 NEW SYSTEM IDENTIFIER
  323.  
  324. * *TRMREC* REQUEST PARAMETERS.
  325.  
  326. RIUE VFD 42/0,18/RIUF
  327. VFD 42/0,18/RIUG
  328. CON 0
  329.  
  330. RIUF CON 0 ZERO WORD
  331. RIUG CON 0 STATUS OF REQUEST
  332. CTASK SPACE 4,30
  333. ** RBU - RECOVER *BTRAN* USER.
  334. *
  335. * TO RECOVER A *BTRAN* USER A *TINVOKE* REQUEST IS ISSUED
  336. * USING ONLY THE *NEW-SYS-ID* PARAMETER. THIS RETURNS A
  337. * NEW SYSTEM IDENTIFIER (TRANSACTION SEQUENCE NUMBER) TO
  338. * BE USED FOR ALL TASKS IN THE RECOVERY UNIT.
  339. *
  340. * THEN AN *RSTDBI* REQUEST IS USED TO RESTORE THE BEGIN
  341. * IDENTIFIERS TO *CRM* FOR A RECOVERED TRANSACTION.
  342. *
  343. * FINALLY, AN *SRERUN* REQUEST IS USED TO CAUSE THE INITIAL
  344. * INPUT FOR A RERUNNABLE TRANSACTION TO BE RESUBMITTED TO
  345. * THE TRANSACTION SYSTEM. THIS PROCESS CAUSES *ITASK* TO
  346. * BE CALLED JUST AS IF THE INPUT CAME FROM THE TERMINAL.
  347. *
  348. * ENTRY RECOVER *BTRAN* USER CASE SELECTED.
  349. * (TMSW+1) = RECOVERY FLAG.
  350. * (TMSW+4) = USERNAME.
  351. *
  352. * EXIT TO *CTA3* FOR CEASE.
  353. *
  354. * ERROR (X7) = FWA OF DAYFILE MESSAGE PARAMETERS.
  355. * TO *CTA2* IF ERROR AND NORMAL CEASE.
  356. * TO *CTA4* IF ERROR AND ABNORMAL CEASE.
  357. *
  358. * USES X - 2, 3, 4, 6.
  359. * A - 2, 6.
  360. *
  361. * CALLS RID.
  362. *
  363. * MACROS SCALL.
  364.  
  365.  
  366. RBU SA2 TMSW+1 GET RECOVERY FLAG
  367. PL X1,RBU1 IF NO *CRM* RECOVERY
  368.  
  369. * ISSUE *TINVOKE* USING *NEW-ID* TO GET NEW SEQUENCE NUMBER.
  370.  
  371. SCALL TINVOKE,(RBUC,RBUD)
  372. SA2 RBUC GET STATUS OF REQUEST
  373. SX3 CTAH TASK LOGICAL ERROR
  374. SX4 X2-TSNE NO ERRORS STATUS
  375. NZ X4,CTA4 IF ERRORS IN *TINVOKE*
  376.  
  377. * RETURN BEGIN-COMMIT HISTORY TO *CRM* WITH *RSTDBI*.
  378.  
  379. RJ RID RESTORE DATA BASE IDENTIFIERS
  380. SX3 CTAE RECOVERY FILE NOT ASSIGNED TO DATA BASE
  381. SX4 X2-TERAF
  382. ZR X4,CTA2 IF NO RECOVERY FILE FOR DATA BASE
  383. SX3 CTAA DATA BASE OR FILE DOWN
  384. SX4 X2-TERAK
  385. ZR X4,CTA2 IF DATA BASE OR FILE DOWN
  386. SX3 CTAL DATA BASE OR FILE IDLE
  387. SX4 X2-TERAG
  388. ZR X4,CTA2 IF DATA BASE OR FILE IDLE
  389. SX3 CTAH TASK LOGICAL ERROR
  390. NZ X2,CTA4 IF REQUEST NOT SUCCESSFUL
  391. RBU1 SA2 TMSW+1 GET RECOVERY FLAG
  392. SX2 X2+
  393. ZR X2,CTA3 IF NO *TAF* AUTOMATIC RECOVERY
  394.  
  395. * ISSUE *SRERUN* REQUEST TO RERUN TRANSACTION USING USERNAME.
  396.  
  397. SCALL SRERUN,(RBUA,TMSW+4)
  398. SA2 RBUA GET STATUS OF REQUEST
  399. SX3 CTAI TRANSACTON NOT RERUNNABLE
  400. SX4 X2-TSNO
  401. ZR X4,CTA2 IF TRANSACTION NOT RERUNNABLE
  402. SX3 CTAH TASK LOGICAL ERROR
  403. SX4 X2-TSNE NO ERRORS STATUS
  404. NZ X4,CTA4 IF ERRORS IN *RERUN*
  405. EQ CTA3 CEASE
  406.  
  407. * *SRERUN* REQUEST PARAMETER.
  408.  
  409. RBUA CON 0 STATUS OF REQUEST
  410.  
  411. * *TINVOKE* REQUEST PARAMETERS.
  412.  
  413. RBUC CON 0 STATUS OF REQUEST
  414. RBUD CON 0 NEW SYSTEM IDENTIFIER
  415. CTASK SPACE 4,50
  416. ** RDB - RECOVER *CRM* DATA BASE.
  417. *
  418. * TO RECOVER THE *CRM* DATA BASE A *TAF* *CRM* REQUEST
  419. * *CRMSTAT* IS USED TO RETURN THE BEGIN-COMMIT HISTORY.
  420. * THIS INFORMATION IS PRIMARILY THE TRANSACTION SEQUENCE
  421. * TABLE (TSEQ) IN ITS ENTIRITY AS IT EXITS AT THE TIME
  422. * THE REQUEST IS PROCESSED. THE TABLE IS DEFINED WITH
  423. * *FIELD* MACROS IN *COMKCRM*. THIS DECK ALSO DEFINES
  424. * THE LENGTH OF EACH ENTRY OF THIS TABLE (TSEQE SYMBOL).
  425. * THE NUMBER OF ENTRIES IN THIS TABLE IS *CMDM*, WHICH
  426. * IS AN INSTALLATION PARAMETER DEFINED IN *COMKIPR*.
  427. * THE FIRST WORD OF EACH ENTRY OF THIS TABLE IS ZERO IF
  428. * THE ENTRY DOES NOT CONTAIN A TRANSACTION ENTRY.
  429. *
  430. * WITH THE INFORMATION IN THE *CRMSTAT* TABLE, RECOVERY
  431. * PROCESSING IS INITIATED. SUBROUTINE *RBC* HANDLES THE
  432. * PROCESSING BY CHECKING THE TRANSACTION SEQUENCE NUMBER OF
  433. * EACH ENTRY IN THE *CRMSTAT* TABLE AGAINST THE *TAF* RECOVERY
  434. * FILE. WHEN A MATCH IS FOUND, THE BEGIN IDENTIFIERS FROM
  435. * THE *CRMSTAT* TABLE ARE USED AS INPUT PARAMETERS INTO
  436. * THE APPROPRIATE PARAMETERS IN *WSTAT*. THEN A *WSTAT*
  437. * REQUEST IS ISSUED TO RECORD THE BEGIN-COMMIT HISTORY ON
  438. * THE *TAF* RECOVERY FILE. SUBROUTINE *CSN* COMPARES THE
  439. * TRANSACTION SEQUENCE NUMBERS FROM THE *TAF* RECOVERY FILE
  440. * AND THE *CRMSTAT* TABLE.
  441. *
  442. * WHEN RECOVERY PROCESSING IS COMPLETE, ROLL BACK PRO-
  443. * CESSING IS INITIATED. SUBROUTINE *RDC* HANDLES THE ROLL
  444. * BACK PROCESSING BY USING THE TRANSACTION SEQUENCE NUMBER OF
  445. * EACH *CRMSTAT* ENTRY AS THE *OLD-SYS-ID* ON THE *TINVOKE*
  446. * REQUEST. THIS WOULD ESTABLISH THE TASK/JOB AS A CONTIN-
  447. * UATION OF A PREVIOUS ONE FOR THE PURPOSE OF ISSUING A TRMREC
  448. * REQUEST TO ROLL BACK THE DATA TO A CONSISTENT STATE.
  449. *
  450. * WITH THE SUCCESSFUL COMPLETION OF ROLL BACK PROCESSING,
  451. * *BTASK* IS CALLED TO RECOVER *BTRAN* TRANSACTIONS. UPON
  452. * THE COMPLETION OF *BTASK*, A *WSTAT* REQUEST IS ISSUED
  453. * TO START INPUT TO TAF AND DATA BASE RECOVERY IS COMPLETE.
  454. *
  455. * ENTRY RECOVER *CRM* DATA BASE CASE SELECTED.
  456. * (TMSW+1) = RECOVERY FLAG.
  457. *
  458. * EXIT TO *CTA3* FOR NORMAL CEASE.
  459. * TO *CTA5* FOR ABNORMAL CEASE.
  460. *
  461. * ERROR APPROPRIATE ERROR MESSAGE ISSUED TO DAYFILE.
  462. * TO *CTA4* IF NOT SYSTEM ORIGIN TRANSACTION.
  463. *
  464. * USES X - 2, 3, 4, 6, 7.
  465. * A - 2, 6.
  466. *
  467. * CALLS RBC, RDC.
  468. *
  469. * MACROS CALLRTN, CRMSTAT, SCALL.
  470.  
  471.  
  472. RDB SA2 TNAM
  473. SX3 -CTAH TASK LOGICAL ERROR
  474. LX2 59-CBSYS
  475. PL X2,CTA4 IF NOT SYSTEM ORIGIN TRANSACTION
  476. SX6 B0
  477. SA2 TMSW+1 GET RECOVERY FLAG
  478. SA6 RDBM INITIALIZE NORMAL CEASE
  479. PL X2,RDB4 IF NO *CRM* RECOVERY
  480.  
  481. * ISSUE *CRMSTAT* REQUEST TO GET BEGIN-COMMIT HISTORY.
  482.  
  483. CRMSTAT RDBD
  484. SA2 RDBF GET STATUS OF REQUEST
  485. SX3 CTAC FILE IS NOT INSTALLED
  486. SX4 X2-TERB
  487. ZR X4,RDB2 IF FILE IS NOT INSTALLED
  488. SX3 CTAG TABLE AREA NOT LARGE ENOUGH
  489. SX4 X2-TERAN
  490. ZR X4,RDB2 IF TABLE AREA NOT LARGE ENOUGH
  491. SX3 -CTAH TASK LOGICAL ERROR
  492. NZ X2,RDB2 IF REQUEST NOT SUCCESSFUL
  493. SA2 TMSW+1 GET RECOVERY FLAG
  494. SX2 X2
  495. ZR X2,RDB1 IF NO *TAF* AUTOMATIC RECOVERY
  496. SX6 B1
  497. SA6 RDBN RECOVERY PROCESSING NOT COMPLETE
  498.  
  499. * RECOVER *TAF* *CRM* DATA BASE BEGIN-COMMIT HISTORY.
  500.  
  501. RJ RBC RECOVER BEGIN-COMMIT HISTORY
  502. SA2 RDBN
  503. NZ X2,RDB2 IF RECOVERY PROCESSING NOT COMPLETE
  504. RDB1 SX6 B0+
  505. SA6 RDBL INITIALIZE *TRMREC* COUNTER
  506.  
  507. * ROLL BACK THE DATA BASE TO A CONSISTENT STATE.
  508.  
  509. RJ RDC ROLL BACK DATA BASE
  510. SX6 X3+
  511. SA6 TMSW+6 SAVE ERROR MESSAGE
  512. SA2 TRSQ GET TRANSACTION SEQUENCE NUMBER
  513. MX4 -CBTSN
  514. BX6 -X4*X2
  515. SA6 RDBK SET OLD SYSTEM IDENTIFIER
  516.  
  517. * RESTORE *CTASK* SEQUENCE NUMBER BEFORE CEASING.
  518.  
  519. SCALL TINVOKE,(RDBI,RDBJ,RDBK)
  520. SA2 RDBI
  521. SX3 -CTAH TASK LOGICAL ERROR
  522. SX4 X2-TSNE
  523. NZ X4,RDB2 IF ERRORS IN *TINVOKE*
  524. SA3 TMSW+6
  525. SA2 RDBL
  526. NZ X2,RDB2 IF *TRMREC* ERRORS
  527. EQ RDB4 START TERMINAL INPUT
  528.  
  529. RDB2 SX6 CSTT TERMINATE *TAF*
  530. SA6 RDBC TRANSACTION STEP
  531. PL X3,RDB3 IF NORMAL CEASE
  532. SX7 B1
  533. BX3 -X3
  534. SA7 RDBM ABNORMAL CEASE
  535. RDB3 SA3 X3
  536. AX3 18
  537. SCALL TMSG,(X3,A3) SEND DAYFILE MESSAGE
  538. EQ RDB5 ISSUE *WSTAT* REQUEST
  539.  
  540. RDB4 SX6 CSST START TERMINAL/JOB INPUT
  541. SA6 RDBC TRANSACTION STEP
  542.  
  543. * ISSUE A *CALLRTN* TO *BTASK* TO RECOVER *BTRAN* TRANSACTIONS
  544. * AND A *WSTAT* REQUEST TO TERMINATE TAF OR START INPUT.
  545.  
  546. RDB5 CALLRTN RDBO
  547. SCALL WSTAT,(RDBA,RDBB,RDBC)
  548. SA2 RDBA
  549. SX3 CTAH TASK LOGICAL ERROR
  550. SX4 X2-TSNE
  551. NZ X4,CTA4 IF ERRORS IN *WSTAT*
  552. SA2 RDBM
  553. ZR X2,CTA3 IF NORMAL CEASE
  554. EQ CTA5 ABNORMAL CEASE WITH MEMORY DUMP
  555.  
  556. * *WSTAT* REQUEST PARAMETERS.
  557.  
  558. RDBA CON 0 STATUS OF REQUEST
  559. RDBB DATA 4HSTEP KEYWORD *STEP*
  560. RDBC CON 0 TRANSACTION STEP
  561.  
  562. * *CRMSTAT* REQUEST PARAMETERS.
  563.  
  564. RDBD VFD 42/0,18/RDBE
  565. VFD 42/0,18/RDBF
  566. VFD 42/0,18/RDBG
  567. VFD 42/0,18/RDBH
  568. CON 0
  569.  
  570. RDBE CON 0 *CRM* STATUS FUNCTION
  571. RDBF CON 0 STATUS OF REQUEST
  572. RDBG BSSZ RMDM*CMDM*TSEQE+TSEQE+1+2*AAMQFL+AIBFL+AOBFL+1
  573. RDBH CON *-RDBG LENGTH OF *CRMSTAT* TABLE
  574.  
  575. * *TINVOKE* REQUEST PARAMETERS.
  576.  
  577. RDBI CON 0 STATUS OF REQUEST
  578. RDBJ CON 0 NEW SYSTEM IDENTIFIER
  579. RDBK CON 0 OLD SYSTEM IDENTIFIER
  580.  
  581. RDBL CON 0 *TRMREC* ERROR COUNTER
  582. RDBM CON 0 NORMAL CEASE FLAG
  583. RDBN CON 0 RECOVERY PROCESSING COMPLETE FLAG
  584.  
  585. * *CALLRTN* TASK LIST.
  586.  
  587. RDBO CON 5LBTASK
  588. CON 0
  589. RTF SPACE 4,40
  590. ** RTF - RECOVER TERMINAL FAILURE.
  591. *
  592. * TO RECOVER TERMINAL FAILURES, SUBROUTINE *RBH* HANDLES THE
  593. * PROCESSING BY CHECKING THE TRANSACTION SEQUENCE NUMBER
  594. * FROM THE *TAF* RECOVERY FILE AGAINST THE ENTRIES IN
  595. * THE *CRMSTAT* TABLE. IF A MATCH IS FOUND, THE BEGIN
  596. * IDENTIFIERS FROM THE *CRMSTAT* TABLE ARE USED AS INPUT
  597. * PARAMETERS IN *WSTAT*. THEN A *WSTAT* REQUEST IS
  598. * ISSUED TO RECORD THE BEGIN-COMMIT HISTORY ON THE *TAF*
  599. * RECOVERY FILE. SUBROUTINE *CSN* COMPARES THE TRANSACTION
  600. * SEQUENCE NUMBERS FROM THE *TRF* AND THE *CRMSTAT* TABLE.
  601. *
  602. * WHEN RECOVERY PROCESSING IS COMPLETE, ROLL BACK PRO-
  603. * CESSING IS STARTED. SUBROUTINE *RCS* HANDLES THE ROLL
  604. * BACK PROCESSING BY USING THE TRANSACTION SEQUENCE NUMBER
  605. * FROM THE *TRF* AS THE *OLD-SYS-ID* ON THE *TINVOKE*
  606. * REQUEST. THIS ESTABLISHES THE TASK/JOB AS A CONTINUATION
  607. * OF A PREVIOUS ONE FOR THE PURPOSE OF ISSUING A *TRMREC*
  608. * REQUEST TO ROLL BACK THE DATA TO A CONSISTENT STATE.
  609. *
  610. * WITH THE COMPLETION OF ROLL BACK PROCESSING, A *WSTAT*
  611. * REQUEST IS ISSUED TO START TERMINAL INPUT TO *TAF* AND
  612. * TERMINAL FAILURE RECOVERY IS COMPLETE.
  613. *
  614. * ENTRY (TMSW+1) = RECOVERY FLAG.
  615. *
  616. * EXIT TO *CTA3* FOR NORMAL CEASE.
  617. * TO *CTA5* FOR ABNORMAL CEASE.
  618. *
  619. * ERROR APPROPRIATE ERROR MESSAGE ISSUED TO DAYFILE.
  620. * TO *CTA4* IF NOT SYSTEM ORIGIN TRANSACTION.
  621. *
  622. * USES X - 2, 3, 4, 6, 7.
  623. * A - 2, 6, 7.
  624. *
  625. * CALLS RBH, RCS.
  626. *
  627. * MACROS SCALL.
  628.  
  629.  
  630. RTF SA2 TNAM
  631. SX3 -CTAH TASK LOGICAL ERROR
  632. LX2 59-CBSYS
  633. PL X2,CTA4 IF NOT SYSTEM ORIGIN TRANSACTION
  634. SX7 B0
  635. SA2 TMSW+1 GET RECOVERY FLAG
  636. SA7 RDBM INITIALIZE NORMAL CEASE
  637. PL X2,RTF3 IF NO *CRM* RECOVERY
  638. SX7 B1+
  639. SA7 RDBN RECOVERY PROCESSING NOT COMPLETE
  640.  
  641. * RECOVER *TAF/CRM* DATA BASE BEGIN-COMMIT HISTORY.
  642.  
  643. RJ RBH RECOVER BEGIN-COMMIT HISTORY
  644. SA2 RDBN
  645. NZ X2,RTF1 IF RECOVERY PROCESSING NOT COMPLETE
  646. SA2 RBHA
  647. NZ X2,RTF3 IF ROLL BACK PROCESSING NOT NECESSARY
  648. SX7 B0+
  649. SA7 RDBL INITIALIZE *TRMREC* COUNTER
  650.  
  651. * ROLL BACK THE DATA BASE TO A CONSISTENT STATE.
  652.  
  653. RJ RCS ROLL BACK TO CONSISTENT STATE
  654. SX6 X3+
  655. SA6 TMSW+6 SAVE ERROR MESSAGE
  656. SA2 TRSQ GET TRANSACTION SEQUENCE NUMBER
  657. MX4 -CBTSN
  658. BX6 -X4*X2
  659. SA6 RDBK SET OLD SYSTEM IDENTIFIER
  660.  
  661. * RESTORE *CTASK* SEQUENCE NUMBER BEFORE CEASING.
  662.  
  663. SCALL TINVOKE,(RDBI,RDBJ,RDBK)
  664. SA2 RDBI GET STATUS OF REQUEST
  665. SX3 -CTAH TASK LOGICAL ERROR
  666. SX4 X2-TSNE
  667. NZ X4,RTF1 IF ERRORS IN *TINVOKE*
  668. SA3 TMSW+6
  669. SA2 RDBL
  670. NZ X2,RTF1 IF *TRMREC* ERRORS
  671. EQ RTF3 START TERMINAL INPUT
  672.  
  673. RTF1 SX6 CSTT TERMINATE *TAF*
  674. SA6 RDBC TRANSACTION STEP
  675. PL X3,RTF2 IF NORMAL CEASE
  676. SX7 B1
  677. BX3 -X3
  678. SA7 RDBM ABNORMAL CEASE WITH DUMP
  679. RTF2 SA3 X3
  680. AX3 18
  681. SCALL TMSG,(X3,A3) SEND DAYFILE MESSAGE
  682. EQ RTF4 ISSUE *WSTAT* REQUEST
  683.  
  684. RTF3 SX6 CSST START TERMINAL/JOB INPUT
  685. SA6 RDBC TRANSACTION STEP
  686.  
  687. * ISSUE *WSTAT* REQUEST TO TERMINATE *TAF* OR START INPUT.
  688.  
  689. RTF4 SCALL WSTAT,(RDBA,RDBB,RDBC)
  690. SA2 RDBA GET STATUS OF REQUEST
  691. SX3 CTAH TASK LOGICAL ERROR
  692. SX4 X2-TSNE
  693. NZ X4,CTA4 IF ERRORS IN *WSTAT*
  694. SA2 RDBM
  695. ZR X2,CTA3 IF NORMAL CEASE
  696. EQ CTA5 ABNORMAL CEASE WITH MEMORY DUMP
  697. CTASK SPACE 4,10
  698. ** CCE - COUNT *CRMSTAT* ENTRIES.
  699. *
  700. * ENTRY (B2) = NUMBER OF ENTRIES IN *CRMSTAT* TABLE.
  701. * RDBG = FWA OF *CRMSTAT* TABLE.
  702. *
  703. * EXIT (B3) = NUMBER OF VALID ENTRIES IN *CRMSTAT* TABLE.
  704. *
  705. * USES X - 2, 3.
  706. * A - 2, 3.
  707. * B - 2, 3.
  708.  
  709.  
  710. CCE SUBR ENTRY/EXIT
  711. SB3 B0+ VALID ENTRY COUNT
  712. SA2 RDBG+TSSQW-TSEQE INITIALIZE FWA OF *CRMSTAT* TABLE
  713. CCE1 SB2 B2-1 DECREMENT ENTRY COUNT
  714. ZR B2,CCEX IF END OF *CRMSTAT* TABLE
  715. SA2 A2+TSEQE GET NEXT ENTRY FROM *CRMSTAT* TABLE
  716. ZR X2,CCE1 IF NULL ENTRY
  717. SA3 A2+TSRCW
  718. LX3 59-TSRCS TASK RECOVERED FROM *BRF* BIT
  719. PL X3,CCE1 IF TASK NOT RECOVERED FROM *BRF*
  720. SB3 B3+1 INCREMENT VALID ENTRY COUNT
  721. EQ CCE1 LOOP FOR NEXT ENTRY IN *CRMSTAT* TABLE
  722. CTASK SPACE 4,15
  723. ** CSN - COMPARE SEQUENCE NUMBERS.
  724. *
  725. * ENTRY (RBCF) = *TSTAT* SEQUENCE NUMBER.
  726. * (RBCD) = *TSTAT* USER NAME.
  727. * RDBG = FWA OF *CRMSTAT* TABLE.
  728. *
  729. * EXIT (X0) = 0, IF MATCH FOUND.
  730. * 1, IF NO MATCH.
  731. * (A3) = FWA OF *CRMSTAT* ENTRY IF MATCH FOUND.
  732. *
  733. * USES X - 0, 1, 2, 3, 4, 5, 6.
  734. * A - 1, 2, 3, 6.
  735. * B - 3, 4.
  736.  
  737.  
  738. CSN SUBR ENTRY/EXIT
  739. SA2 TMSW TERMINAL FAILURE CASE
  740. SB4 X2-TYTF
  741. SB3 RMDM*CMDM+2 INITIALIZE ENTRY COUNTER
  742. SA2 RBCF GET *SEQ* NUMBER FROM *TSTAT*
  743. SX0 B1+ NO MATCH
  744. SA3 RDBG+TSSQW-TSEQE INITIALIZE FWA OF *CRMSTAT* TABLE
  745. CSN1 SB3 B3-1 DECREMENT ENTRY COUNT
  746. ZR B3,CSNX IF END OF *CRMSTAT* TABLE, RETURN
  747. SA3 A3+TSEQE GET NEXT ENTRY FROM *CRMSTAT* TABLE
  748. ZR X3,CSN1 IF NULL ENTRY
  749. ZR B4,CSN2 IF TERMINAL FAILURE CASE
  750. SA1 A3+TSRCW
  751. LX1 59-TSRCS TASK RECOVERED FROM *BRF* BIT
  752. PL X1,CSN1 IF TASK NOT RECOVERED FROM *BRF*
  753. CSN2 MX4 TSSQN
  754. BX5 X4*X3 MASK OFF *CRM* SEQUENCE NUMBER
  755. LX5 TSSQN-1-TSSQS RIGHT JUSTIFY *CRM* SEQUENCE NUMBER
  756. IX3 X5-X2
  757. NZ X3,CSN1 IF NO MATCH
  758. SA1 A3+TSUNW GET USER FROM *CRMSTAT* TABLE
  759. SA2 RBCD GET USER FROM *TSTAT*
  760. MX4 TSUNN
  761. BX1 X4*X1
  762. BX2 X4*X2
  763. BX4 X1-X2
  764. NZ X4,CSN1 IF USER NAMES DO NOT MATCH
  765. SX0 B0+ MATCH FOUND
  766. EQ CSNX RETURN
  767. CTASK SPACE 4,20
  768. ** RBC - RECOVER BEGIN-COMMIT HISTORY.
  769. *
  770. * ENTRY *CRMSTAT* TABLE LOADED.
  771. * (RDBN) = 1, FOR RECOVERY PROCESSING NOT COMPLETE.
  772. *
  773. * EXIT (RDBN) = 0, IF RECOVERY PROCESSING COMPLETE.
  774. * = 1, IF NOT COMPLETE.
  775. *
  776. * ERROR (X3) = ADDRESS OF ERROR MESSAGE WHEN NOT COMPLETE.
  777. *
  778. * USES X - 2, 3, 4, 6, 7.
  779. * A - 2, 3, 6, 7.
  780. * B - 2.
  781. *
  782. * CALLS CCE, CSN.
  783. *
  784. * MACROS SCALL.
  785.  
  786.  
  787. RBC SUBR ENTRY/EXIT
  788. SB2 RMDM*CMDM+2
  789. SA3 RBCS GET BLANK WORD
  790. BX6 X3
  791. RJ CCE COUNT *CRMSTAT* ENTRIES
  792. SX7 B3+B1 VALID ENTRY COUNT
  793. SA6 RBCD INITIALIZE *NEXT* FOR *TSTAT*
  794. SA7 RBCT
  795. RBC1 SA1 RBCT
  796. SX6 X1-1 DECREMENT ENTRY COUNT
  797. ZR X6,RBC4 IF END OF *CRMSTAT* TABLE
  798. SA6 A1+
  799.  
  800. * ISSUE *TSTAT* REQUEST TO RETURN OPERATIONAL ENVIRONMENT.
  801.  
  802. RBC2 SCALL TSTAT,(RBCA,RBCC,RBCD,RBCE,RBCF,RBCG,RBCH,RBCI,RBCJ,RBC
  803. ,K,RBCL,RBCM,RBCN) ISSUE *TSTAT* REQUEST
  804. SA2 RBCA GET STATUS OF REQUEST
  805. SX4 X2-TSRU RECOVERY UNAVAILABLE STATUS
  806. ZR X4,RBC4 IF RECOVERY UNAVAILABLE
  807. SX4 X2-TSEN
  808. ZR X4,RBC4 IF END OF *NEXT* PROCESSING
  809. SX3 CTAK USER NOT DEFINED IN NETWORK FILE
  810. SX4 X2-TSUU USER UNKNOWN STATUS
  811. ZR X4,RBCX IF USER UNKNOWN, RETURN
  812. SX3 -CTAH TASK LOGICAL ERROR
  813. SX4 X2-TSNE NO ERRORS STATUS
  814. NZ X4,RBCX IF ERRORS IN *TSTAT*, RETURN
  815. RJ CSN COMPARE SEQUENCE NUMBERS
  816. NZ X0,RBC2 IF NO MATCH FOUND
  817. SX6 CSBC
  818. SA6 RBCH SET TRANSACTION STEP
  819. SA3 A3+TSBCW GET BEGIN IDENTIFIERS FROM *CRMSTAT* TABLE
  820. ERRNZ TSBPW-TSBCW ID-S NOT IN SAME WORD
  821. MX4 -TSBCN
  822. ERRNZ TSBPN-TSBCN ID-LENGTH NOT EQUAL
  823. BX6 -X4*X3 MASK OFF CURRENT BEGIN IDENTIFIER
  824. LX3 TSBPN-1-TSBPS RIGHT JUSTIFY PREVIOUS BEGIN IDENTIFIER
  825. BX7 -X4*X3 MASK OFF PREVIOUS BEGIN IDENTIFIER
  826. SA6 RBCR CURRENT *CRM* IDENTIFIER
  827. SA7 RBCP PREVIOUS *CRM* IDENTIFIER
  828.  
  829. * ISSUE *WSTAT* REQUEST TO RECORD BEGIN-COMMIT HISTORY.
  830.  
  831. SCALL WSTAT,(RBCA,RBCB,RBCD,RBCE,RBCF,RBCG,RBCH,RBCI,RBCJ,RBC
  832. ,K,RBCL,RBCM,RBCN,RBCO,RBCP,RBCQ,RBCR) ISSUE *WSTAT* REQUEST
  833. SA2 RBCA GET STATUS OF REQUEST
  834. SX3 CTAK USER NOT DEFINED IN NETWORK FILE
  835. SX4 X2-TSUU USER UNKNOWN STATUS
  836. ZR X4,RBCX IF USER UNKNOWN, RETURN
  837. SX3 -CTAH TASK LOGICAL ERROR
  838. SX4 X2-TSNE NO ERRORS STATUS
  839. NZ X4,RBCX IF ERRORS IN *WSTAT*, RETURN
  840. EQ RBC1 LOOP FOR NEXT ENTRY IN *CRMSTAT* TABLE
  841.  
  842. RBC4 SX7 B0+ RECOVER PROCESSING COMPLETE
  843. SA7 RDBN
  844. EQ RBCX RETURN
  845.  
  846. * *TSTAT* AND *WSTAT* REQUEST PARAMETERS.
  847.  
  848. RBCA CON 0 STATUS OF REQUEST
  849. RBCB DATA 4HUSER KEYWORD *USER*
  850. RBCC DATA 4HNEXT KEYWORD *NEXT*
  851. RBCD CON 0 NEXT USER FROM *TAF* RECOVERY FILE
  852. RBCE DATA 3HSEQ KEYWORD *SEQ*
  853. RBCF CON 0 TRANSACTION SEQUENCE NUMBER
  854. RBCG DATA 4HSTEP KEYWORD *STEP*
  855. RBCH CON 0 TRANSACTION STEP
  856. RBCI DATA 4HTRAN KEYWORD *TRAN*
  857. RBCJ CON 0 TRANSACTION TYPE
  858. RBCK DATA 3HCRM KEYWORD *CRM*
  859. RBCL CON 0 *CRM* TRANSACTION USAGE
  860. RBCM DATA 4HCDCS KEYWORD *CDCS*
  861. RBCN CON 0 *CDCS* TRANSACTION USAGE
  862. RBCO DATA 5HOLDID KEYWORD *OLDID*
  863. RBCP CON 0 PREVIOUS *CRM* IDENTIFIER
  864. RBCQ DATA 5HNEWID KEYWORD *NEWID*
  865. RBCR CON 0 CURRENT *CRM* IDENTIFIER
  866. RBCS DATA 1H BLANK WORD
  867. RBCT CON 0 ENTRY COUNT
  868. RBH SPACE 4,20
  869. ** RBH - RECOVER BEGIN-COMMIT HISTORY FOR TERMINAL FAILURES.
  870. *
  871. * ENTRY (RDBN) = 1 FOR RECOVERY PROCESSING NOT COMPLETE.
  872. *
  873. * EXIT (RDBN) = 0, IF RECOVERY PROCESSING COMPLETE.
  874. * = 1, IF NOT COMPLETE.
  875. * (RBHA) = 0, IF ROLL BACK PROCESSING NECESSARY.
  876. * = 1, IF NOT NECESSARY.
  877. *
  878. * ERROR (X3) = FWA OF ERROR MESSAGE PARAMETERS WHEN NOT
  879. * COMPLETE.
  880. *
  881. * USES X - 2, 3, 4, 6, 7.
  882. * A - 2, 3, 6, 7.
  883. *
  884. * CALLS CSN.
  885. *
  886. * MACROS CRMSTAT, SCALL.
  887.  
  888.  
  889. RBH SUBR ENTRY/EXIT
  890. SA2 TNAM GET TERMINAL NAME
  891. MX3 TSUNN
  892. BX6 X3*X2
  893. SA6 RBCD
  894.  
  895. * ISSUE *TSTAT* REQUEST TO RETURN OPERATIONAL ENVIRONMENT.
  896.  
  897. SCALL TSTAT,(RBCA,RBCB,RBCD,RBCE,RBCF,RBCG,RBCH,RBCI,RBCJ,RBC
  898. ,K,RBCL,RBCM,RBCN)
  899. SA2 RBCA GET STATUS OF REQUEST
  900. SX3 CTAK USER NOT DEFINED IN NETWORK FILE
  901. SX4 X2-TSUU
  902. ZR X4,RBHX IF USER UNKNOWN
  903. SX3 -CTAH TASK LOGICAL ERROR
  904. SX4 X2-TSNE
  905. NZ X4,RBHX IF ERRORS IN *TSTAT*
  906. SA2 RBCL GET *CRM* USAGE
  907. SX6 B1+
  908. ZR X2,RBH2 IF *CRM* MAY NOT BE USED
  909.  
  910. * ISSUE *CRMSTAT* REQUEST TO GET BEGIN-COMMIT HISTORY.
  911.  
  912. CRMSTAT RDBD
  913. SA2 RDBF GET STATUS OF REQUEST
  914. SX3 CTAC FILE IS NOT INSTALLED
  915. SX4 X2-TERB
  916. ZR X4,RBHX IF FILE IS NOT INSTALLED
  917. SX3 CTAG TABLE AREA NOT LARGE ENOUGH
  918. SX4 X2-TERAN
  919. ZR X4,RBHX IF TABLE AREA NOT LARGE ENOUGH
  920. SX3 -CTAH TASK LOGICAL ERROR
  921. NZ X2,RBHX IF REQUEST NOT SUCCESSFUL
  922. RJ CSN COMPARE SEQUENCE NUMBERS
  923. SX6 B1+
  924. NZ X0,RBH2 IF NO MATCH FOUND
  925. SA2 RBCH GET TRANSACTION STEP
  926. SX4 X2-CSTI
  927. ZR X4,RBH1 IF RECOVERABLE TRANSACTION/JOB INPUT
  928. SX4 X2-CSBC
  929. ZR X4,RBH1 IF BEGIN-COMMIT *CRM* ID-S LOGGED
  930. SX4 X2-CSND
  931. SX6 B0+
  932. NZ X4,RBH2 IF *NAM* NOT DOWN
  933. RBH1 SX6 CSBC
  934. SA6 RBCH SET ID-S LOGGED STEP
  935. SA3 A3+TSBCW GET ID-S FROM *CRMSTAT* TABLE
  936. MX4 -TSBCN
  937. BX6 -X4*X3
  938. LX3 TSBPN-1-TSBPS
  939. BX7 -X4*X3
  940. SA6 RBCR CURRENT *CRM* ID
  941. SA7 RBCP PREVIOUS *CRM* ID
  942.  
  943. * ISSUE *WSTAT* REQUEST TO RECORD BEGIN-COMMIT HISTORY.
  944.  
  945. SCALL WSTAT,(RBCA,RBCB,RBCD,RBCE,RBCF,RBCG,RBCH,RBCI,RBCJ,RBC
  946. ,K,RBCL,RBCM,RBCN,RBCO,RBCP,RBCQ,RBCR)
  947. SA2 RBCA GET STATUS OF REQUEST
  948. SX3 CTAK USER NOT DEFINED IN NETWORK FILE
  949. SX4 X2-TSUU
  950. ZR X4,RBHX IF USER UNKNOWN
  951. SX3 -CTAH TASK LOGICAL ERROR
  952. SX4 X2-TSNE
  953. NZ X4,RBHX IF ERRORS IN *WSTAT*
  954. SX6 B0+
  955. RBH2 SX7 B0+
  956. SA6 RBHA ROLL BACK PROCESSING FLAG
  957. SA7 RDBN RECOVERY PROCESSING COMPLETE
  958. EQ RBHX RETURN
  959.  
  960. RBHA CON 0 ROLL BACK PROCESSING FLAG
  961. CTASK SPACE 4,15
  962. ** RDC - ROLL BACK DATA TO CONSISTENT STATE.
  963. *
  964. * ENTRY RDBG = FWA OF *CRMSTAT* TABLE.
  965. *
  966. * EXIT (RDBL) = 0, IF ROLL BACK PROCESSING COMPLETE.
  967. * = NON-ZERO, IF NOT COMPLETE.
  968. *
  969. * ERROR (X3) = FWA OF ERROR MESSAGE PARAMETERS WHEN NOT
  970. * COMPLETE.
  971. *
  972. * USES X - 2, 3, 4, 5, 6, 7.
  973. * A - 2, 3, 6, 7.
  974. *
  975. * MACROS SCALL, TRMREC.
  976.  
  977.  
  978. RDC SUBR ENTRY/EXIT
  979. SX6 RMDM*CMDM+2
  980. SX7 RDBG+TSSQW-TSEQE
  981. SA6 RDCG
  982. SA7 RDCH
  983. RDC1 SA2 RDCG
  984. SX6 X2-1
  985. ZR X6,RDC2 IF END OF *CRMSTAT* TABLE
  986. SA6 A2
  987. SA2 A2+B1
  988. SA3 X2+TSEQE GET NEXT ENTRY FROM *CRMSTAT* TABLE
  989. SX7 A3
  990. SA7 A2
  991. ZR X3,RDC1 IF NULL ENTRY
  992. MX5 TSSQN
  993. BX6 X5*X3 MASK OFF *CRM* SEQUENCE NUMBER
  994. LX6 TSSQN-1-TSSQS RIGHT JUSTIFY *CRM* SEQUENCE NUMBER
  995. SA6 RDCC OLD SYSTEM IDENTIFIER
  996.  
  997. * ISSUE *TINVOKE* REQUEST TO GET NEW SYSTEM IDENTIFIER.
  998.  
  999. SCALL TINVOKE,(RDCA,RDCB,RDCC) ISSUE *TINVOKE* REQUEST
  1000. SA2 RDCA GET STATUS OF REQUEST
  1001. SX3 CTAF SYSTEM IDENTIFIER UNKNOWN STATUS
  1002. SX4 X2-TSSU
  1003. ZR X4,RDC3 IF SYSTEM ID UNKNOWN
  1004. SX3 -CTAH TASK LOGICAL ERROR
  1005. SX4 X2-TSNE NO ERRORS STATUS
  1006. NZ X4,RDC3 IF ERRORS IN *TINVOKE*
  1007.  
  1008. * ISSUE *TRMREC* REQUEST TO ROLL BACK DATA TO CONSISTENT STATE.
  1009.  
  1010. TRMREC RDCD
  1011. SA2 RDCF GET STATUS OF REQUEST
  1012. ZR X2,RDC1 IF REQUEST SUCCESSFUL
  1013. SA1 RDBL *TRMREC* ERROR COUNTER
  1014. SX7 X1+1
  1015. SA7 A1+ INCREMENT ERROR COUNTER
  1016. EQ RDC1 LOOP FOR NEXT ENTRY IN *CRMSTAT* TABLE
  1017.  
  1018. RDC2 SX3 CTAJ *TRMREC* ERROR
  1019. EQ RDCX RETURN
  1020.  
  1021. RDC3 SX6 CMDM+1
  1022. SA6 RDBL *TINVOKE* ERROR
  1023. EQ RDCX RETURN
  1024.  
  1025. * *TINVOKE* REQUEST PARAMETERS.
  1026.  
  1027. RDCA CON 0 STATUS OF REQUEST
  1028. RDCB CON 0 NEW SYSTEM IDENTIFIER
  1029. RDCC CON 0 OLD SYSTEM IDENTIFIER
  1030.  
  1031. * *TRMREC* REQUEST PARAMETERS.
  1032.  
  1033. RDCD VFD 42/0,18/RDCE
  1034. VFD 42/0,18/RDCF
  1035. CON 0
  1036.  
  1037. RDCE CON 0 ZERO WORD
  1038. RDCF CON 0 STATUS OF REQUEST
  1039. RDCG CON 0 NUMBER OF *CRMSTAT* ENTRIES
  1040. RDCH CON 0 FWA OF *CRMSTAT* TABLE
  1041. RCS SPACE 4,15
  1042. ** RCS - ROLL BACK DATA TO CONSISTENT STATE FOR
  1043. * TERMINAL FAILURES.
  1044. *
  1045. * ENTRY (RBCF) = SEQUENCE NUMBER.
  1046. *
  1047. * EXIT (RDBL) = 0, IF ROLL BACK PROCESSING COMPLETE.
  1048. * = NON-ZERO, IF NOT COMPLETE.
  1049. *
  1050. * ERROR (X3) = FWA OF ERROR MESSAGE PARAMETERS WHEN NOT
  1051. * COMPLETE.
  1052. *
  1053. * USES X - 2, 3, 4, 7.
  1054. * A - 2, 7.
  1055. *
  1056. * MACROS SCALL, TRMREC.
  1057.  
  1058.  
  1059. RCS SUBR ENTRY/EXIT
  1060.  
  1061. * ISSUE *TINVOKE* REQUEST TO GET NEW SYSTEM ID.
  1062.  
  1063. SCALL TINVOKE,(RDCA,RDCB,RBCF)
  1064. SA2 RDCA GET STATUS OF REQUEST
  1065. SX3 CTAF SYSTEM ID UNKNOWN
  1066. SX4 X2-TSUU
  1067. ZR X4,RCS3 IF SYSTEM ID UNKNOWN
  1068. SX3 -CTAH TASK LOGICAL ERROR
  1069. SX4 X2-TSNE
  1070. NZ X4,RCS3 IF ERRORS IN *TINVOKE*
  1071.  
  1072. * ISSUE *TRMREC* REQUEST TO ROLL BACK DATA TO CONSISTENT STATE.
  1073.  
  1074. TRMREC RDCD
  1075. SA2 RDCF GET STATUS OF REQUEST
  1076. ZR X2,RCSX IF REQUEST SUCCESSFUL
  1077. SX3 CTAJ *TRMREC* ERROR
  1078. SX7 B1+
  1079. RCS2 SA7 RDBL *TRMREC* ERROR COUNTER
  1080. EQ RCSX RETURN
  1081.  
  1082. RCS3 SX7 CMDM+1 *TINVOKE* ERROR
  1083. EQ RCS2 SET *TRMREC* COUNT
  1084. CTASK SPACE 4,15
  1085. ** RID - RESTORE DATA BASE IDENTIFIERS.
  1086. *
  1087. * ENTRY (TMSW+2) = *OLDID* FROM COMMUNICATION BLOCK.
  1088. * (TMSW+3) = *NEWID* FROM COMMUNICATION BLOCK.
  1089. *
  1090. * EXIT (X2) = STATUS OF *RSTDBI* REQUEST.
  1091. *
  1092. * USES X - 2, 3, 6, 7.
  1093. * A - 2, 3, 6, 7.
  1094. *
  1095. * MACROS RSTDBI.
  1096.  
  1097.  
  1098. RID SUBR ENTRY/EXIT
  1099. SA2 TMSW+2 GET *OLDID*
  1100. SA3 TMSW+3 GET *NEWID*
  1101. BX6 X2
  1102. BX7 X3
  1103. SA6 RIDD PREVIOUS BEGIN IDENTIFIER
  1104. SA7 RIDB CURRENT BEGIN IDENTIFIER
  1105. RSTDBI RIDA RESTORE BEGIN IDENTIFIERS
  1106. SA2 RIDC GET STATUS OF REQUEST
  1107. EQ RIDX RETURN
  1108.  
  1109. * *RSTDBI* REQUEST PARAMETERS.
  1110.  
  1111. RIDA VFD 42/0,18/RIDB
  1112. VFD 42/0,18/RIDC
  1113. VFD 42/0,18/RIDD
  1114. CON 0
  1115.  
  1116. RIDB CON 0 CURRENT BEGIN IDENTIFIER
  1117. RIDC CON 0 STATUS OF REQUEST
  1118. RIDD CON 0 PREVIOUS BEGIN IDENTIFIER
  1119.  
  1120. END CTASK
cdc/nos2.source/opl871/ctask.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator