Table of Contents

RTASK

Table Of Contents

  • [00010] RECOVER TERMINAL TASK.
  • [00088] RECOVER TERMINAL TASK.
  • [00367] SND - SEND MESSAGE.

Source Code

RTASK.txt
  1. IDENT RTASK
  2. SST BEGN,CMBL
  3. LCC OVERLAY(RTASK,0,0)
  4. ENTRY RTASK
  5. SYSCOM B1
  6. RTASK TITLE RTASK - RECOVER TERMINAL TASK.
  7. *COMMENT RTASK - RECOVER TERMINAL TASK.
  8. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  9. RTASK SPACE 4,10
  10. *** RTASK - RECOVER TERMINAL TASK.
  11. *
  12. * E. D. REDIG. 80/05/07.
  13. RTASK SPACE 4,40
  14. *** THE TASK *RTASK* IS A CONTROL DATA SYSTEMS SUPPLIED
  15. * RECOVERY TASK THAT SHOULD HANDLE MOST TRANSACTION
  16. * APPLICATION NEEDS. HOWEVER, SOME CUSTOMERS MAY WISH
  17. * TO MODIFY *RTASK* TO MEET THEIR SPECIAL REQUIREMENTS.
  18. *
  19. * TERMINAL DISCONNECTS, *NAM* ABORTS, *TAF* ABORTS, AND
  20. * SYSTEM CRASHES WILL MEAN THAT THE TERMINAL MUST GO
  21. * THROUGH THE LOGIN PROCEDURES WITH *TAF*. UPON TERMINAL
  22. * LOGIN *RTASK* WOULD BE CALLED. *RTASK* THEN DOES THE
  23. * FOLLOWING.
  24. *
  25. * 1. IF A RECOVERABLE TRANSACTION IS NO LONGER RERUNNABLE,
  26. * *RTASK* TELLS THE TERMINAL OPERATOR THAT RECOVERY HAS
  27. * OCCURRED, THAT THE RECOVERABLE TRANSACTION WILL NOT
  28. * BE RERUN AUTOMATICALLY, TO ENTER THE NEXT INPUT, AND
  29. * CEASES. THIS SITUATION OCCURS WHEN AN INPUT/OUTPUT
  30. * ERROR OCCURRED ON THE *TAF* RECOVERY FILE.
  31. *
  32. * 2. IF THE TRANSACTION UNIT IS NOT RECOVERABLE, *RTASK*
  33. * SENDS *READY* TO INDICATE THE TERMINAL OPERATOR
  34. * SHOULD ENTER THE NEXT COMMAND, AND CEASES.
  35. *
  36. * 3. IF THE TRANSACTION COMMIT UNIT IS SECURE AND THE DATA
  37. * BASE COMMIT UNIT IS COMMITTED, *RTASK* SENDS THE TERM-
  38. * INAL CONFIRMATION MESSAGE, AND CEASES. THE TERMINAL
  39. * CONFIRMATION MESSAGE IS STORED ON THE *TAF* RECOVERY
  40. * FILE AS A RESULT OF THE SECURE REQUEST.
  41. *
  42. * 4. *RTASK* CALLS *CTASK*. *CTASK* REQUESTS A NEW TRANS-
  43. * ACTION SEQUENCE NUMBER AND RETURNS THE BEGIN-COMMIT
  44. * HISTORY TO *TAF CRM*. *CTASK* THEN MAKES A RERUN
  45. * REQUEST. THE RERUN REQUEST TURNS OFF THE RECOVERY
  46. * STATUS AND RETRIEVES TERMINAL INPUT FROM THE *TAF*
  47. * RECOVERY FILE. THE TRANSACTION WILL BE RUN USING THE
  48. * NEW SEQUENCE NUMBER. *ITASK* WILL LATER PROCESS THE
  49. * INPUT AS IF THE INPUT HAD COME FROM THE TERMINAL.
  50.  
  51.  
  52. *** COMMON DECKS.
  53.  
  54.  
  55. *CALL COMCMAC
  56. *CALL COMKTAF
  57. *CALL COMKFLD
  58. *CALL COMKIPR
  59. *CALL COMKMAC
  60. BEGN BSS 0 SAVE ORIGIN COUNTER
  61. *CALL COMKCBD
  62. LIST X
  63. *CALL COMKTRF
  64. LIST -X
  65. *CALL COMKTSC
  66. ORG BEGN RESTORE ORIGIN COUNTER
  67. RTASK SPACE 4,15
  68. *** COMMUNICATION BLOCK HEADER WORDS AND MESSAGES.
  69. *
  70. *T TMSW 60/ CASE
  71. *T, TMSW+1 60/ RECOVERY FLAG (RF)
  72. *T, TMSW+2 60/ OLDID
  73. *T, TMSW+3 60/ NEWID
  74. *T, TMSW+5 60/ *RERUN* STATUS (RS)
  75. *
  76. * CASE = 1, RECOVER INTERACTIVE USER.
  77. * RF BIT 59 = 1, IF *CRM* AUTOMATIC RECOVERY USED.
  78. * BIT 0 = 1, IF *TAF* AUTOMATIC RECOVERY USED.
  79. * OLDID = PREVIOUS *CRM* IDENTIFIER.
  80. * NEWID = CURRENT *CRM* IDENTIFIER.
  81. * RS = 0, IF *SRERUN* SUCCESSFUL.
  82. * = 1, IF *SRERUN* NOT SUCCESSFUL.
  83. * = -1, IF DATA BASE FILE DOWN.
  84.  
  85.  
  86. BSS CMBL RESERVE SPACE FOR COMMUNICATION BLOCK
  87. RTASK SPACE 4,20
  88. ** RTASK - RECOVER TERMINAL TASK.
  89. *
  90. * ENTRY (TMSW+1) = RECOVERY FLAG.
  91. *
  92. * EXIT TERMINAL RECOVERY MESSAGE.
  93. * (TMSW) = RECOVER INTERACTIVE USER CASE.
  94. * (TMSW+1) = RECOVERY FLAG.
  95. * (TMSW+2) = OLDID.
  96. * (TMSW+3) = NEWID.
  97. *
  98. * ERROR TO *RTA3* IF ERROR AND NORMAL CEASE.
  99. * TO *RTA5* IF ERROR AND ABNORMAL CEASE.
  100. *
  101. * USES X - 1, 2, 3, 4, 5, 6, 7.
  102. * A - 1, 2, 3, 5, 6, 7.
  103. * B - 1.
  104. *
  105. * MACROS BLDABH, CALLTRN, CEASE, FMSG, MOVE, SCALL, WAIT,
  106. * WAITINP.
  107.  
  108.  
  109. RTASK SB1 1
  110.  
  111. * ISSUE *TSTAT* REQUEST TO OBTAIN STATUS OF TRANSACTION.
  112.  
  113. SCALL TSTAT,(RTAA,RTAB,RTAC,RTAD,RTAE,RTAF,RTAG,RTAH,RTAI,RTA
  114. ,J,RTAK,RTAL,RTAM) ISSUE *TSTAT* REQUEST
  115. SA2 RTAA GET STATUS OF REQUEST
  116. SX5 RTAAC
  117. SX4 X2-TSRU RECOVERY UNAVAILABLE
  118. ZR X4,RTA2 IF RECOVERY UNAVAILABLE
  119. SX5 RTAAA
  120. SX4 X2-TSNE NO ERRORS STATUS
  121. NZ X4,RTA5 IF ERRORS IN *TSTAT*
  122. SA2 RTAC GET TRANSACTION STEP
  123. SX5 RTAAC
  124. SA3 RTAE GET TRANSACTION TYPE
  125. SX4 X3-TYIT TERMINAL USER TYPE
  126. NZ X4,RTA14 IF NOT TERMINAL USER
  127. ZR X2,RTA2 IF TERMINAL TRANSACTION NON-RECOVERABLE
  128. SX4 X2-CSTA
  129. ZR X4,RTA2 IF TRANSACTION ABORT STEP
  130. SX5 RTAAB
  131. SX4 X2-CSTN NO LONGER RERUNNABLE STEP
  132. ZR X4,RTA2 IF STEP NO LONGER RERUNNABLE
  133.  
  134. * TRANSACTION WILL BE RERUN OR PUSHED THROUGH TO
  135. * COMPLETION BY SENDING THE *SECURE* MESSAGE.
  136.  
  137. SX6 TYIT SET RECOVER INTERACTIVE USER CASE
  138. SA2 RTAK GET *OLDID*
  139. SA3 RTAM GET *NEWID*
  140. SA6 TMSW STORE CASE IN COMMUNICATION BLOCK
  141. BX6 X2
  142. BX7 X3
  143. SA6 TMSW+2 STORE *OLDID* IN COMMUNICATION BLOCK
  144. SA7 TMSW+3 STORE *NEWID* IN COMMUNICATION BLOCK
  145. SX7 MAXWS*10 MAXIMUM MESSAGE LENGTH
  146. SX6 4 SET MESSAGE UNITS TO DISPLAY
  147. SA7 RTAP STORE MAXIMUM MESSAGE LENGTH
  148. SA6 RTAQ STORE MESSAGE UNITS
  149.  
  150. * ISSUE *RSECURE* REQUEST TO OBTAIN *SECURE* MESSAGE.
  151. * IF NO *SECURE* MESSAGE, RERUN TRANSACTION.
  152.  
  153. SCALL RSECURE,(RTAN,RTAO,RTAP,RTAQ,RTAR,RTAS)
  154. SA2 RTAO GET STATUS OF REQUEST
  155. SX4 X2-TSNM NO MESSAGE STATUS
  156. ZR X4,RTA4 IF NO MESSAGE FROM *RSECURE*
  157. SX4 X2-TSNE NO ERRORS STATUS
  158. SX5 RTAAA
  159. NZ X4,RTA5 IF ERRORS IN *RSECURE*
  160. SA2 RTAI
  161. NZ X2,RTA4 IF *CDCS* USED
  162. SA2 RTAG
  163. ZR X2,RTA1 IF *CRM* NOT USED
  164.  
  165. * IF *CRM* CURRENT BEGIN-COMMIT ID IS SUCCESSFUL, *SEND*
  166. * *SECURE* MESSAGE ELSE CALL *CTASK* TO RERUN THE TRANSACTION.
  167.  
  168. SA2 RTAM
  169. NZ X2,RTA4 IF *NEWID* NOT ZERO
  170.  
  171. * ISSUE *BLDABH* REQUEST TO BUILD APPLICATION BLOCK HEADER.
  172.  
  173. RTA1 SCALL BLDABH,(RTAT,RTAQ,RTAU,RTAR,RTAV,RTAS)
  174.  
  175. * ISSUE *SEND* REQUEST TO SEND THE SECURE MESSAGE AND CEASE.
  176.  
  177. SCALL SEND,(RTAN,RTAP,RTAW,RTAX)
  178.  
  179. RTA2 RJ SND SEND MESSAGE
  180. RTA3 CEASE EXIT TASK WITH CEASE
  181.  
  182. RTA3.1 CEASE -1 CEASE BUT TERMINAL WILL REMAIN LOCKED
  183.  
  184. * CALL *CTASK* TO RERUN THE TRANSACTION.
  185.  
  186. RTA4 SX5 RTAAE
  187. RJ SND SEND MESSAGE
  188. CALLRTN RTAZ CALL *CTASK*
  189. SA2 TMSW+5 GET *RERUN* STATUS
  190. ZR X2,RTA3.1 IF TRANSACTION WAS RERUNNABLE
  191. NG X2,RTA6 IF DATA BASE FILE DOWN
  192. SX5 RTAAF
  193. RTA5 RJ SND SEND MESSAGE
  194. CEASE 2 ABNORMAL CEASE WITH DUMP
  195.  
  196. * RECOVERY NOT POSSIBLE NOW BECAUSE DATA BASE FILE IS
  197. * DOWN. SEND MENU OF OPTIONS TO TAKE.
  198.  
  199. RTA6 SX6 B0+ MESSAGE COUNT
  200. SA6 RTSA
  201. RTA7 SA2 RTSA GET MESSAGE COUNT
  202. SA5 TRTA+X2 GET MESSAGE ADDRESS
  203. SX6 X2-TRTAL
  204. PL X6,RTA8 IF END OF TABLE
  205. SX6 X2+B1 INCREMENT MESSAGE COUNT
  206. SA6 A2
  207. RJ SND SEND MESSAGE
  208. EQ RTA7 GET NEXT MESSAGE
  209.  
  210. * SAVE C.B. MESSAGE AREA AND THEN REQUEST OPTION.
  211.  
  212. RTA8 MOVE 4,TMSW,RTSC SAVE C.B. MESSAGE AREA
  213. RTA9 SX6 300
  214. SA6 RTSG
  215. WAITINP RTSG
  216. SA1 TMSW
  217. SX3 X1-1
  218. ZR X3,RTA11 IF TERMINAL TIMEOUT
  219. RJ SFN SPACE FILL NAME
  220. SA2 RTSD
  221. BX3 X2-X6
  222. ZR X3,RTA10 IF WAIT AND TRY AGAIN
  223. SA2 RTSE
  224. BX3 X2-X6
  225. ZR X3,RTA12 IF LOG OFF
  226. SA2 A2+B1
  227. BX3 X2-X6
  228. ZR X3,RTA13 IF ENTER NEXT TRANSACTION
  229. SX5 RTAAT
  230. RJ SND SEND MESSAGE
  231. EQ RTA9 REQUEST OPTION
  232.  
  233. * TAF WILL WAIT 5 MINUTES BEFORE ATTEMPTING RERUN
  234. * OF TRANSACTION.
  235.  
  236. RTA10 SX5 RTAAU
  237. RJ SND SEND MESSAGE
  238. WAIT RTSB WAIT FOR 5 MINUTES
  239. MOVE 4,RTSC,TMSW RESTORE C.B. MESSAGE AREA
  240. EQ RTA4 RERUN TRANSACTION
  241.  
  242. * TERMINAL TIMEOUT, OPTION B ASSUMED.
  243.  
  244. RTA11 SX5 RTAAS
  245. RJ SND SEND MESSAGE
  246.  
  247. * LOG OFF WITH THE PREVIOUS RECOVERABLE INFORMATION
  248. * REMAINING INTACT.
  249.  
  250. RTA12 SX5 RTAAV
  251. RJ SND SEND MESSAGE
  252. LOGT B1 LOG TERMINAL OUT
  253. EQ RTA3 CEASE
  254.  
  255. * ALLOW ENTRY OF NEXT TRANSACTION. THE PREVIOUS
  256. * RECOVERABLE INFORMATION WILL BE LOST.
  257.  
  258. RTA13 SX5 RTAAW
  259. RJ SND SEND MESSAGE
  260. EQ RTA3 CEASE
  261.  
  262. * LOG INTERACTIVE TERMINAL USER OFF WITH THE PREVIOUS
  263. * RECOVERABLE INFORMATION REMAINING INTACT.
  264.  
  265. RTA14 SX4 X2-CSNR
  266. ZR X4,RTA3 IF NON-RECOVERABLE TRANSACTION
  267. SX4 X2-CSCE
  268. ZR X4,RTA3 IF CEASE/JOB END
  269. SX5 RTAAX
  270. RJ SND SEND MESSAGE
  271. LOGT B1 LOG TERMINAL OUT
  272. EQ RTA3 CEASE
  273.  
  274. * *TSTAT* REQUEST PARAMETERS.
  275.  
  276. RTAA CON 0 STATUS OF *TSTAT* REQUEST
  277. RTAB DATA 4HSTEP KEYWORD *STEP*
  278. RTAC CON 0 TRANSACTION STEP
  279. RTAD DATA 4HTRAN KEYWORD *TRAN*
  280. RTAE CON 0 TRANSACTION TYPE
  281. RTAF DATA 3HCRM KEYWORD *CRM*
  282. RTAG CON 0 *CRM* TRANSACTION USAGE
  283. RTAH DATA 4HCDCS KEYWORD *CDCS*
  284. RTAI CON 0 *CDCS* TRANSACTION USAGE
  285. RTAJ DATA 5HOLDID KEYWORD *OLDID*
  286. RTAK CON 0 PREVIOUS *CRM* IDENTIFIER
  287. RTAL DATA 5HNEWID KEYWORD *NEWID*
  288. RTAM CON 0 CURRENT *CRM* IDENTIFIER
  289.  
  290. * *RSECURE* REQUEST PARAMETERS.
  291.  
  292. RTAN BSS MAXWS MESSAGE BUFFER
  293. RTAO CON 0 STATUS OF *RSECURE* REQUEST
  294. RTAP CON 0 MESSAGE LENGTH
  295. RTAQ CON 0 MESSAGE UNITS
  296. RTAR CON 0 FORMAT EFFECTOR
  297. RTAS CON 0 TRANSPARENT MODE
  298.  
  299. * *BLDABH* REQUEST PARAMETERS.
  300.  
  301. RTAT DATA 3LACT APPLICATION CHARACTER TYPE
  302. RTAU DATA 3LNFE FORMAT EFFECTORS
  303. RTAV DATA 3LXPT TRANSPARENT MODE
  304.  
  305. * *SEND* REQUEST PARAMETERS.
  306.  
  307. RTAW CON 0 SEND TO ORIGINATING TERMINAL
  308. RTAX CON 1 CEASE FLAG
  309.  
  310. RTAZ DATA 5LCTASK CALL TO *CTASK*
  311. CON 0
  312. RTSA CON 0 MESSAGE COUNT
  313. RTSB CON 300 *WAIT* TIME IN SECONDS
  314. RTSC BSSZ 4 C.B. STORAGE BUFFER
  315. RTSD CON 1HA
  316. RTSE CON 1HB
  317. RTSF CON 1HC
  318. RTSG CON 0 *WAITINP* TIME IN SECONDS
  319.  
  320. * SEND MESSAGES.
  321.  
  322. RTAAA FMSG (TASK LOGICAL ERROR.)
  323. RTAAB FMSG (RECOVERY, TRANSACTION NOT RERUNNABLE, ENTER NEXT TRANS
  324. ,ACTION.)
  325. RTAAC FMSG (READY.)
  326. RTAAE FMSG (RECOVERY, RERUNNING TRANSACTION.)
  327. RTAAF FMSG (TAF TRANSACTION NOT RERUNNABLE.)
  328. RTAAG FMSG (RECOVERY NOT POSSIBLE NOW BECAUSE DATA BASE FILE IS DO
  329. ,WN.)
  330. RTAAH FMSG (SELECT DESIRED OPTION FROM FOLLOWING LIST BY ENTERING
  331. ,LETTER.)
  332. RTAAI FMSG ( )
  333. RTAAJ FMSG (A = WAIT 5 MINUTES AND TRY AGAIN. TAF WILL WAIT 5 MIN
  334. ,UTES)
  335. RTAAK FMSG ( BEFORE ATTEMPTING RERUN OF TRANSACTION.)
  336. RTAAL FMSG ( )
  337. RTAAM FMSG (B = LOG OFF. THE PREVIOUS RECOVERABLE INFORMATION WIL
  338. ,L)
  339. RTAAN FMSG ( REMAIN INTACT, LOG IN AT A LATER TIME TO ATTEMPT R
  340. ,ERUN.)
  341. RTAAO FMSG ( )
  342. RTAAP FMSG (C = ALLOW ENTRY OF NEXT TRANSACTION. THE PREVIOUS REC
  343. ,OVERABLE)
  344. RTAAQ FMSG ( INFORMATION WILL BE LOST.)
  345. RTAAR FMSG (?)
  346. RTAAS FMSG (TERMINAL TIMEOUT, OPTION B ASSUMED.)
  347. RTAAT FMSG (VALID OPTIONS ARE A, B OR C.)
  348. RTAAU FMSG (WAITING.)
  349. RTAAV FMSG (TRANSACTION SESSION ENDED.)
  350. RTAAW FMSG (ENTER NEXT TRANSACTION.)
  351. RTAAX FMSG (TERMINAL NOT AVAILABLE.)
  352.  
  353. TRTA CON RTAAG
  354. CON RTAAH
  355. CON RTAAI
  356. CON RTAAJ
  357. CON RTAAK
  358. CON RTAAL
  359. CON RTAAM
  360. CON RTAAN
  361. CON RTAAO
  362. CON RTAAP
  363. CON RTAAQ
  364. CON RTAAR
  365. TRTAL EQU *-TRTA LENGTH OF MESSAGE TABLE
  366. SND SPACE 4,10
  367. ** SND - SEND MESSAGE.
  368. *
  369. * ENTRY (X5) = ADDRESS OF MESSAGE.
  370. *
  371. * MACROS SEND.
  372.  
  373.  
  374. SND SUBR ENTRY/EXIT
  375. SEND X5 SEND MESSAGE
  376. EQ SNDX RETURN
  377. SPACE 4,10
  378. ** COMMON DECKS.
  379.  
  380.  
  381. *CALL COMCMVE
  382. *CALL COMCSFN
  383.  
  384.  
  385. END RTASK