Table of Contents

ITASK

Table Of Contents

  • [00042] TIMCNT - DEFINE A TIME ORIGINATING TASK.
  • [00052] TRAN - DEFINE A TRANSACTION CODE.
  • [00081] STRAN - DEFINE A SUBTRANSACTION CODE.
  • [00110] TRANT - TRANSACTION CODE TABLE.
  • [00227] PROCESS TRANSACTION INPUT.
  • [00473] CYB - CYBERLOAN INPUT PROCESSING.
  • [00518] BIN - BINARY SEARCH TABLE.
  • [00559] CCS - CHECK CHARACTER STRING FOR TRANSACTION UNIT NAME.
  • [00600] CTL - CHECK TIMED TRANSACTION UNIT LIST.

Source Code

ITASK.txt
  1. IDENT ITASK
  2. ENTRY ITASK
  3. LCC OVERLAY(ITASK,0,0)
  4. SST BEGN,CMBL
  5. SYSCOM B1
  6.  
  7. *COMMENT INITIAL TASK.
  8. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  9. ITASK TITLE INITIAL TASK.
  10.  
  11. *** INITIAL TASK
  12. * M. M. CHEN 1977.
  13. * E. D. REDIG. 80/06/20. *TAF* AUTOMATIC RECOVERY.
  14. SPACE 4,15
  15. *** INITIALIZE TASK IS THE INTERFACE BETWEEN THE TRANSACTION
  16. * EXECUTIVE AND USER-S APPLICATION TASK. *ITASK* PROCESSES
  17. * ALL TRANSACTION INPUT TO DETERMINE WHICH TRANSACTION UNIT
  18. * TO CALL TO FURTHER PROCESS THE INPUT, AND STATUS MESSAGES
  19. * CONCERNING THE STATE OF THE TRANSACTION SYSTEM.
  20. *
  21. * BECAUSE TRANSACTION INPUT WILL VARY FROM APPLICATION TO
  22. * APPLICATION, INITIAL TASK WILL HAVE TO VARY TO ADAPT TO
  23. * DIFFERENT INPUT FORMATS AND OPERATIONAL CONDITIONS. THIS
  24. * INITIAL TASK IS PROVIDED TO SERVE AS AN EXAMPLE. EACH
  25. * INSTALLATION WILL NEED ITS OWN INITIAL TASK TO SERVE ITS OWN
  26. * SPECIFIC NEEDS.
  27.  
  28.  
  29. MACROS TITLE MACROS
  30. *CALL COMKTAF
  31. *CALL COMKFLD
  32. *CALL COMKIPR
  33. *CALL COMKMAC
  34. BEGN BSS 0 SAVE ORIGIN COUNTER
  35. *CALL COMKCBD
  36. ORG BEGN RESTORE ORIGIN COUNTER
  37.  
  38. NOREF .1,.2
  39. .1 SET 0
  40. .2 SET 0
  41. TIMCNT SPACE 4
  42. ** TIMCNT - DEFINE A TIME ORIGINATING TASK.
  43. *
  44.  
  45.  
  46. PURGMAC TIMCNT
  47.  
  48. TIMCNT MACRO HH,MM,SS,ADDR
  49. VFD 18/ADDR,24/0,6/HH,6/MM,6/SS
  50. ENDM
  51. TRAN SPACE 4,20
  52. ** TRAN - DEFINE A TRANSACTION CODE.
  53. *
  54. * THE *TRAN* MACRO SETS UP ENTRIES FOR THE TABLE OF
  55. * TRANSACTION CODES *TRANT*. NOTE - A PARTICULAR
  56. * TRAN ENTRY SETS UP THE TRANT ENTRY FOR THE PRECEDING
  57. * DECLARED TRANSACTION CODE. *ITASK* ASSUMES THAT
  58. * THE *TRANT* TABLE IS SET UP IN DISPLAY ORDER. IT
  59. * USES THE DISPLAY CODE VALUE OF THE TRANSACTION CODE
  60. * ENTERED BY THE USER TO LOCATE THE PROPER ENTRY IN
  61. * *TRANT*.
  62. *
  63. * TRAN CODE
  64. *
  65. * ENTRY CODE = ONE-CHARACTER TRANSACTION CODE.
  66. * TRANS = SYMBOL SPECIFYING THE RELATIVE ADDRESS
  67. * OF SUBTRANSACTION CODES.
  68. *
  69. * EXIT ENTRY MADE INTO THE TABLE OF TRANSACTION
  70. * CODES *TRANT*.
  71.  
  72.  
  73. PURGMAC TRAN
  74.  
  75. TRAN MACRO A
  76. VFD 12/2000B+.1,48/TRANS+.2
  77. .2 SET .2+.1
  78. .1 SET 0
  79. ENDM
  80. STRAN SPACE 4,15
  81. ** STRAN - DEFINE A SUBTRANSACTION CODE.
  82. *
  83. * THE *STRAN* MACRO MAKES ENTRIES IN THE TABLE OF
  84. * SUBTRANSACTION CODES *TRANS*. *TRANS* CONTAINS THE
  85. * SUBTRANSACTION CODE AND THE CORRESPONDING NAME OF
  86. * THE TRANSACTION UNIT.
  87. *
  88. * STRAN CODE,TNAME
  89. *
  90. * ENTRY CODE = TWO-CHARACTER SUBTRANSACTION CODE.
  91. * TNAME = NAME OF THE TRANSACTION UNIT TO BE CALLED.
  92. *
  93. * EXIT ENTRY MADE INTO THE TABLE OF SUBTRANSACTION
  94. * CODES *TRANS*.
  95.  
  96.  
  97. PURGMAC STRAN
  98.  
  99. STRAN MACRO CODE,TNAME
  100. STRAN RMT
  101. VFD 12/0H_CODE,6/0,42/0L_TNAME
  102. STRAN RMT
  103. .1 SET .1+1 ADVANCE SUB TRANSACTION CODE COUNT
  104. ENDM
  105.  
  106.  
  107. BSS CMBL RESERVE SPACE FOR COMMUNICATION BLOCK
  108. TABLES TITLE TRANSACTION TABLES.
  109. TRANT SPACE 4,20
  110. ** TRANT - TRANSACTION CODE TABLE.
  111. *
  112. * EACH GROUP OF ENTRIES RELATING TO THE SAME TRANSACTION
  113. * CODE IS PLACED IMMEDIATELY FOLLOWING THE *TRANT* ENTRY
  114. * FOR THAT CODE, ALTHOUGH THE SUBTRANSACTION TABLE IS
  115. * ASSEMBLED ELSEWHERE. THE FOLLOWING IS AN EXAMPLE OF
  116. * THE USE OF THE *TRAN* AND *STRAN* MACROS.
  117. *
  118. * TRANT BSS 0
  119. *
  120. * TRAN A
  121. *
  122. * STRAN 02,TNAME1
  123. *
  124. * STRAN 03,TNAME2
  125. *
  126. * WHERE, *A* IS THE TRANSACTION CODE, *02* AND *03* ARE
  127. * THE SUBTRANSACTION CODES, AND *TNAME1* AND *TNAME2*
  128. * ARE THE RESPECTIVE TRANSACTION UNITS TO BE REQUESTED.
  129. *
  130. * THE DECLARATION OF A TRANSACTION UNIT AND THE ASSOCIATION
  131. * OF ATTRIBUTES WITH IT IS ACCOMPLISHED THROUGH *LIBTASK*
  132. * DIRECTIVES.
  133.  
  134.  
  135. TRANT BSS 0
  136. LOC 1
  137. TRAN A
  138. TRAN B
  139. TRAN C
  140. TRAN D
  141. TRAN E
  142. STRAN (X.),XTRAN EXECUTE NAMED TASK
  143.  
  144. * CAUTION: THE FOLLOWING IS AN EXAMPLE OF A *LIBTASK*
  145. * DIRECTIVE NEEDED FOR THE TRANSACTION UNIT *XTRAN*.
  146. *
  147. * /XTRAN,T1=XTASK
  148.  
  149. TRAN F
  150. TRAN G
  151. TRAN H
  152. TRAN I
  153. TRAN J
  154. TRAN K
  155. TRAN L
  156. TRAN M
  157. TRAN N
  158. TRAN O
  159. TRAN P
  160. TRAN Q
  161. TRAN R
  162. TRAN S
  163. TRAN T
  164. TRAN U
  165. TRAN V
  166. TRAN W
  167. TRAN X
  168. TRAN Y
  169. TRAN Z
  170. TRAN 0
  171. TRAN 1
  172. TRAN 2
  173. TRAN 3
  174. TRAN 4
  175. TRAN 5
  176. TRAN 6
  177. TRAN 7
  178. TRAN 8
  179. TRAN 9
  180. TRAN +
  181. TRAN -
  182. TRAN *
  183. TRAN /
  184. TRAN )
  185. TRAN (
  186. TRAN $
  187. TRAN =
  188. TRAN 1R
  189. TRAN ,
  190. TRAN .
  191. TRAN #
  192. TRAN [
  193. TRAN ]
  194. TRAN :
  195. TRAN "
  196. TRAN _
  197. TRAN !
  198. TRAN &
  199. TRAN '
  200. TRAN ?
  201. TRAN <
  202. TRAN :
  203. TRAN @
  204. TRAN \
  205. TRAN ^
  206. TRAN ;
  207. TRAN
  208. LOC *O
  209. STAN SPACE 4,10
  210. ** SUBTRANSACTION CODE TABLES.
  211. *
  212.  
  213.  
  214. TRANS BSS 0
  215. STRAN HERE
  216. TTOT SPACE 4,10
  217. ** TABLE OF TIME ORIGINATING TASKS.
  218. * TIMCNT MACROS WOULD BE PUT IN THIS TABLE.
  219.  
  220.  
  221. TTOT BSS 0
  222. TTOTL EQU *-TTOT
  223.  
  224.  
  225. ITASK TITLE ITASK
  226. ITASK SPACE 4,80
  227. ** ITASK - PROCESS TRANSACTION INPUT.
  228. *
  229. * *ITASK* EXTRACTS THE DATA BASE NAME FROM THE COMMUNICATION
  230. * BLOCK AND SEARCHES A DATA BASE NAME TABLE TO DETERMINE WHAT
  231. * INPUT PROCESSING IS NECESSARY.
  232. *
  233. * *ITASK* MAY BE CALLED WITH SYSTEM ORIGIN TRANSACTIONS,
  234. * WITH THE TYPE OF CALL IN WORD *TMSW* OF THE COMMUNICATION
  235. * BLOCK.
  236. *
  237. * ENTRY (TRSQ) = 12/ DB,24/ UA,24/ SEQ
  238. * (TNAM) = 42/ TN,1/S,1/P,1/B,2/ ,1/M,12/WC
  239. * (TMSW) = MESSAGE IF S .EQ. 0.
  240. * = RC IF S .EQ. 1.
  241. *
  242. * DB DATA BASE FOR TERMINAL
  243. * UA USER ARGUMENT FIELD FOR TERMINAL
  244. * SEQ TRANSACTION SEQUENCE NUMBER
  245. * TN TERMINAL NAME
  246. *
  247. * S =1 IF SYSTEM ORIGIN TRANSACTION.
  248. * P =1 IF PARITY ERROR OCCURRED ON TERMINAL INPUT.
  249. * B =1 IF TRANSACTION INPUT CAME FROM BATCH.
  250. * M =1 IF MULTIPLE COMMUNICATION BLOCKS USED.
  251. * WC MESSAGE LENGTH IN WORDS.
  252. *
  253. * RC = 1 IMPLIES SYSTEM TIMED ACTIVATION.
  254. * = 2 IMPLIES IDLE DOWN (K.IDLE).
  255. * = 3 IMPLIES RECOVERY HAS TAKEN PLACE.
  256. * = 4 IMPLIES TERMINAL LOGIN.
  257. * = 5 IMPLIES SYSTEM MESSAGE.
  258. * SYSTEM MESSAGE IS HANDLED BY *SYSMSG* TASK
  259. * NOT BY ITASK.
  260. * = 6 IMPLIES TERMINAL BREAK FROM NAM.
  261. * = 7 IMPLIES TERMINAL CONNECTION BROKEN FROM NAM
  262. * = 8 IMPLIES NETWORK SHUT DOWN -NORMAL.
  263. * = 9 IMPLIES NAM ABORTED.
  264. * = 10 IMPLIES NETWORK SHUT DOWN - FORCED.
  265. * = 11 IMPLIES TERMINAL INACTIVE.
  266. * = 14 IMPLIES LOGICAL ERROR.
  267. * = 15 IMPLIES BLOCK NOT DELIVERED.
  268. * = 16 IMPLIES TERMINAL CHARACTERISTICS.
  269. * = 17 IMPLIES INPUT TOO LARGE.
  270. * = 18 IMPLIES TERMINAL STATUS REQUEST.
  271. *
  272. * SEE COMMON DECK *COMKSTC* FOR SYBOLS AND THEIR VALUES.
  273. *
  274. * FOR CODES 1, 2, 3, 8, 9, AND 10
  275. * THE COMMUNICATION BLOCK HEADER CONTAINS ZERO FOR TERMINAL
  276. * NAME AND USER AREA, THE DATA BASE IS *SY* WITH SECURITY
  277. * CODES OF 7.
  278. *
  279. * FOR CODE 4, THE COMMUNICATION BLOCK HEADER IS SET UP WITH
  280. * THE FOLLOWING INFORMATION FOR THE TERMINAL LOGGED IN.
  281. *
  282. * (TMSW+1) = 23/ ,12/BSZ,1/HW/8/DT,8/PW,8/PL
  283. *
  284. * BSZ = BLOCK SIZE. (IN CHARACTERS, BITS 25-37)
  285. * HW = HARD WIRED LINE. (BIT 24)
  286. * DT = DEVICE TYPE/TERMINAL CLASS. (BIT 16-23)
  287. * PW = PAGE WIDTH OF TERMINAL. (BIT 8-15)
  288. * PL = PAGE LENGTH OF TERMINAL. (BIT 0-7)
  289. *
  290. * FOR CODES 6, 7, AND 11 - 17
  291. * THE COMMUNICATION BLOCK IS SET UP WITH NORMAL SEQUENCE
  292. * NUMBER, TERMINAL NAME OF MALFUNCTION, THE DATA BASE FOR
  293. * THE TERMINAL, READ AND UPDATE SECURITY OF 7 AND THE NETWORK
  294. * SUPERVISORY MESSAGE IS FORMED IN (TMSW+1).
  295. *
  296. * THE FORMATS OF NETWORK SUPERVISORY MESSAGES ARE GIVEN IN
  297. * COMMON DECK *COMKNWF*. THE VALUES FOR THE FIELDS ARE GIVEN
  298. * IN COMMON DECK *COMSNCD*.
  299. *
  300. * USES A - 1, 2, 5, 6, 7.
  301. * B - 3.
  302. * X - 0, 1, 2, 5, 6, 7.
  303. *
  304. * CALLS BIN, CBT, CCS, CTL, CYB.
  305. *
  306. * MACROS CALLTRN, CALLTSK, CEASE, FMSG, JOURNL, SCALL, SEND.
  307.  
  308.  
  309. ITASK SB1 1 ENTRY
  310. SA2 TNAM
  311. SA5 A2+B1 SYSTEM TRANSACTION CODE
  312. LX2 59-CBSYS LEFT JUSTIFY SYSTEM ORIGIN
  313. SA1 A2-B1
  314. SX0 X5
  315. NG X2,ITA1 IF SYSTEM ORIGIN TRANSACTION
  316. BX3 X2
  317. LX2 59-CBIDS-59+CBSYS
  318. NG X2,ITA15 IF OPERATOR IDLE DOWN
  319. LX3 59-CBCDS-59+CBSYS
  320. NG X3,ITA16 IF CDCS ABORTED
  321.  
  322. * IF INPUT FOUND IN TRANSACTION, SUBTRANSACTION TABLES
  323. * SCHEDULE TRANSACTION UNIT SPECIFIED BY TABLES. OTHERWISE
  324. * USE INPUT AS TRANSACTION UNIT TO SCHEDULE.
  325.  
  326. RJ CYB PROCESS INPUT
  327. NZ X1,ITA8 IF TRANSACTION UNIT FOUND
  328. RJ CCS CHECK CHARACTER STRING
  329. ZR X1,ITA7 IF NO TRANSACTION UNIT TO SCHEDULE
  330. EQ ITA8 SCHEDULE TRANSACTION UNIT
  331.  
  332. * DETERMINE PROCESSOR FOR SYSTEM ORIGIN TRANSACTION.
  333.  
  334. ITA1 LX0 -1
  335. SX6 X0-TITAL
  336. SB3 X0
  337. PL X6,ITA14 IF UNKNOWN REASON CODE
  338. JP B3+TITA JUMP THRU TABLE
  339.  
  340. TITA PL X0,ITA14 IF UNKNOWN REASON CODE
  341. EQ ITA13 IF SYSTEM TIMED ACTIVATION
  342. PL X0,ITA13 IF IDLE
  343. EQ ITA13 IF RECOVERY HAS TAKEN PLACE
  344. PL X0,ITA2 IF TERMINAL LOG IN
  345. EQ ITA13 IF SYSTEM MESSAGE
  346. PL X0,ITA3 IF BREAK
  347. EQ ITA12 IF CONNECTION BROKEN
  348. PL X0,ITA12 IF NETWORK SHUT DOWN - NORMAL
  349. EQ ITA12 IF NETWORK ABORT
  350. PL X0,ITA12 IF NETWORK SHUT DOWN - FORCED
  351. EQ ITA12 IF TERMINAL INACTIVE
  352. PL X0,ITA14 IF UNKNOWN REASON CODE
  353. EQ ITA14 IF UNKNOWN REASON CODE
  354. PL X0,ITA4 IF TASK LOGICAL ERROR
  355. EQ ITA5 IF BLOCK NOT DELIVERED
  356. PL X0,ITA12 IF TERMINAL CHARACTERISTICS
  357. EQ ITA6 IF INPUT TOO LARGE
  358. PL X0,ITA12 IF TERMINAL STATUS REQUEST
  359. EQ ITA14 IF UNKNOWN REASON CODE
  360. TITAL EQU *-TITA LENGTH OF *ITASK* JUMP TABLE
  361.  
  362. * PROCESS TERMINAL LOG IN.
  363.  
  364. ITA2 SEND ITAF SEND *READY.*
  365. SA1 TRSQ FIRST WORD OF COMMUNICATION BLOCK
  366. RJ CBT CHECK FOR BINARY TERMINAL
  367. ZR X6,ITA13 IF NOT BINARY TERMINAL
  368. SA6 ITAE
  369. SX7 ITAD BINARY INPUT REQUEST MESSAGE
  370. EQ ITA10 SEND MESSAGE AND CEASE
  371.  
  372. * PROCESS TERMINAL BREAK.
  373. * APPLICATION MAY WISH TO ACTIVE RECOVERY TASK.
  374.  
  375. ITA3 SX7 1 *BREAK RECEIVED.* MESSAGE CODE
  376. EQ ITA18 CALLTSK TO SEND MESSAGE
  377.  
  378. * PROCESS TASK LOGICAL ERROR.
  379. * APPLICATION MAY WISH TO DUMP THE TASK.
  380.  
  381. ITA4 SX7 ITAH *TASK LOGICAL ERROR.* MESSAGE
  382. EQ ITA11 SEND AND JOURNAL MESSAGE THEN CEASE
  383.  
  384. * PROCESS BLOCK NOT DELIVERED.
  385. * APPLICATION MAY WISH TO ACTIVE RECOVERY TASK.
  386.  
  387. ITA5 SX7 ITAI *BLOCK LOST.* MESSAGE
  388. EQ ITA11 SEND AND JOURNAL MESSAGE THEN CEASE
  389.  
  390. * PROCESS INPUT TOO LARGE.
  391.  
  392. ITA6 SX7 0 *INPUT TOO LARGE.* MESSAGE CODE
  393. EQ ITA18 CALLTSK TO SEND MESSAGE
  394.  
  395. * PROCESS NO TRANSACTION UNIT TO SCHEDULE.
  396.  
  397. ITA7 SX7 2 ILLEGAL TRANSACTION UNIT MESSAGE CODE
  398. EQ ITA18 CALLTSK TO SEND MESSAGE
  399.  
  400. * SCHEDULE A TRANSACTION UNIT AND CEASE.
  401.  
  402. ITA8 BX7 X1
  403. SA7 ITAA TRANSACTION UNIT NAME
  404. RJ CTL CHECK TIME LIST
  405. NZ X2,ITA9 IF TIME TO SCHEDULE TRANSACTION UNIT
  406. CALLTRN ITAA SCHEDULE TRANSACTION UNIT AND CEASE
  407.  
  408. ITA9 CALLTSK ITAA SCHEDULE THE TIMED TASK
  409. SA1 CTLA TRANSACTION UNIT TO SCHEDULE
  410. EQ ITA8 SCHEDULE TRANSACTION UNIT
  411.  
  412. ITA10 SEND X7 SEND MESSAGE
  413. EQ ITA13 CEASE
  414.  
  415. ITA11 SEND X7 SEND MESSAGE
  416.  
  417. * PROCESS CONNECTION BROKEN, NETWORK ABORT, NETWORK
  418. * SHUTDOWN, TERMINAL INACTIVE, STOP AND START ON
  419. * DOWNLINE CONNECTION. JOURNAL MESSAGE.
  420.  
  421. ITA12 JOURNL ITAC JOURNAL MESSAGE
  422. CEASE -1 EXIT WITHOUT UNLOCKING TERMINAL
  423.  
  424. ITA13 CEASE EXIT WITHOUT SCHEDULING TRANSACTION UNIT
  425.  
  426. * PROCESS UNKNOWN REASON CODE.
  427.  
  428. ITA14 SCALL TMSG,(ITAB) SEND MESSAGE TO DAYFILE
  429. CEASE 2 ABNORMAL CEASE WITH DUMP
  430.  
  431. * TAF IS IDLING DOWN, ONLY ACCEPT *EX.LOGT*
  432. * AS INPUT.
  433.  
  434. ITA15 SX7 ITAL *TAF IDLING DOWN.*
  435. EQ ITA17 SEND MESSAGE AND CEASE
  436.  
  437. * CDCS ABORTED, ONLY ACCEPT *EX.LOGT*
  438. * AS INPUT.
  439.  
  440. ITA16 SX7 ITAM *CDCS ABORTED PLEASE WAIT*
  441.  
  442. * CHECK FOR *EX.LOGT*.
  443.  
  444. ITA17 SA1 ITAN
  445. IX2 X1-X5 PROCESS INPUT
  446. MX1 42
  447. BX2 X1*X2
  448. NZ X2,ITA10 IF NOT *EX.LOGT*
  449. RJ CYB
  450.  
  451. ITA18 SA7 TMSW
  452. SA1 ITAO
  453. BX7 X1
  454. SA7 ITAA
  455. CALLTSK ITAA,CEASE
  456.  
  457. EQ ITA8 PROCESS *EX.LOGT*
  458. ITAA BSSZ 2 TRANSACTION UNIT LIST FOR *CALLTRN*
  459. ITAB DATA C* UNKNOWN REASON CODE.*
  460. ITAC VFD 6/0,18/0,18/2,18/TRSQ
  461. ITAD VFD 12/0,18/ITAE,12/0,18/ITAEL SEND CONTROL WORD
  462. ITAE CON 0
  463. ITAEL EQU *-ITAE
  464. ITAF FMSG READY.
  465. ITAH FMSG (TASK LOGICAL ERROR.)
  466. ITAI FMSG (BLOCK LOST.)
  467. ITAL FMSG (TAF IDLING DOWN.)
  468. ITAM FMSG (CDCS ABORTED PLEASE WAIT.)
  469. ITAN VFD 60/0LEX.LOGT
  470. ITAO VFD 60/0LSTASK
  471. CYB TITLE CYBERLOAN/NIXDORF INPUT PROCESSING.
  472. CYB SPACE 4,20
  473. ** CYB - CYBERLOAN INPUT PROCESSING.
  474. *
  475. * THE FIRST THREE CHARACTERS OF INPUT ARE USED
  476. * TO DETERMINE WHICH TRANSACTION UNIT TO CALL.
  477. *
  478. * ENTRY (X5) = FIRST WORD OF DATA MESSAGE.
  479. *
  480. * EXIT (X1) = TRANSACTION UNIT TO SCHEDULE.
  481. * = 0, IF NO TRANSACTION UNIT TO SCHEDULE.
  482. *
  483. * USES A - 1, 2, 7.
  484. * B - 2, 3.
  485. * X - 0, 1, 2, 5, 7.
  486. *
  487. * CALLS BIN.
  488.  
  489.  
  490. CYB SUBR ENTRY/EXIT
  491.  
  492. * THE FIRST CHARACTER OF INPUT DETERMINES THE
  493. * SUBTRANSACTION TABLE.
  494.  
  495. MX2 -6
  496. LX5 6
  497. BX2 -X2*X5 TRANSACTION CODE
  498. MX0 12
  499. SA2 X2+TRANT INDEX TO SUB TRANSACTION CODES
  500. BX7 X0*X5 SUB TRANSACTION CODES
  501. UX2,B3 X2
  502. SB2 X2 START OF SUB TRANSACTION CODES
  503.  
  504. * CHARACTERS 2 AND 3 DETERMINE THE TRANSACTION UNIT
  505. * TO SCHEDULE FROM THE SUBTRANSACTION TABLE.
  506.  
  507. RJ BIN SEARCH SUB TRANSACTION CODE TABLE
  508. ZR X3,CYB1 IF ILLEGAL SUB-TRANSACTION CODE
  509. LX1 18
  510. MX7 42
  511. BX1 X7*X1 TRANSACTION UNIT NAME TO SCHEDULE
  512. EQ CYBX RETURN
  513.  
  514. CYB1 SX1 X3 NO TRANSACTION UNIT TO SCHEDULE
  515. LX5 -6 REPOSITION TERMINAL INPUT
  516. EQ CYBX RETURN
  517. BIN SPACE 4,15
  518. ** BIN - BINARY SEARCH TABLE.
  519. *
  520. * ENTRY (X0) = MASK.
  521. * (X7) = CRITERION.
  522. * (B2) = START OF TABLE.
  523. * (B3) = LENGTH OF TABLE.
  524. *
  525. * EXIT (X3) = 0 IF MATCH NOT FOUND.
  526. * (X1) = ENTRY IF MATCH.
  527. *
  528. * USES A - 1.
  529. * B - 2, 3.
  530. * X - 1, 2, 3, 6.
  531.  
  532.  
  533. BIN SUBR ENTRY/EXIT
  534. SX3 B3+
  535. SB3 B2+B3
  536. SB3 B3-B1
  537. ZR X3,BINX IF THERE ARE NO ELEMENTS TO SEARCH
  538. BIN1 SX3 B3-B2
  539. AX3 1
  540. SA1 X3+B2 TABLE ENTRY
  541. NO
  542. BX2 X0*X1
  543. IX6 X2-X7
  544. NG X6,BIN2 IF RAISE LOWER LIMIT
  545. ZR X6,BIN3 IF FOUND ENTRY
  546. SB3 A1-1 LOWER UPPER LIMIT
  547. GE B3,B2,BIN1 IF NOT END OF TABLE
  548. SX3 0
  549. EQ BINX RETURN - NO MATCH FOUND
  550.  
  551. BIN2 SB2 A1+B1
  552. LE B2,B3,BIN1 IF NOT END OF TABLE
  553. BX3 X3-X3
  554. EQ BINX RETURN - NO MATCH FOUND
  555.  
  556. BIN3 SX3 1
  557. EQ BINX RETURN - MATCH FOUND
  558. ITASK SPACE 4,15
  559. ** CCS - CHECK CHARACTER STRING FOR TRANSACTION UNIT NAME.
  560. *
  561. * THE FIRST ONE TO SEVEN ALPHANUMERIC CHARACTERS OF INPUT
  562. * ARE USED TO DETERMINE WHICH TRANSACTION UNIT TO SCHEDULE.
  563. *
  564. * ENTRY (X5) = FIRST WORD OF TERMINAL INPUT.
  565. *
  566. * EXIT (X1) = TRANSACTION UNIT TO SCHEDULE.
  567. * = 0, IF NO TRANSACTION UNIT TO SCHEDULE.
  568. *
  569. * USES X - 0, 1, 2, 3, 4, 5, 6.
  570. * B - 2, 3.
  571.  
  572.  
  573. CCS SUBR ENTRY/EXIT
  574. MX2 48 EIGHT CHARACTER MASK
  575. SB2 6
  576. BX6 X6-X6 CLEAR TRANSACTION UNIT NAME
  577. SX0 1R+
  578. BX5 X5*X2 MASK OFF CHARACTER STRING
  579. MX3 -6 ONE CHARACTER MASK
  580. SB3 60
  581. LX5 6 POSITION TERMINAL INPUT
  582. BX1 X6
  583. CCS1 BX4 -X3*X5 GET A CHARACTER
  584. ZR X4,CCS2 IF END OF TRANSACTION UNIT NAME
  585. IX2 X4-X0
  586. PL X2,CCS3 IF NOT ALPHANUMERIC
  587. LX6 6
  588. SB3 B3-B2
  589. BX6 X6+X4 TRANSFER A CHARACTER
  590. LX5 6
  591. EQ CCS1 LOOP FOR NEXT CHARACTER
  592.  
  593. CCS2 SB2 12
  594. EQ B2,B3,CCSX IF TOO MANY CHARACTERS
  595. CCS3 ZR X6,CCSX IF ZERO LENGTH TRANSACTION UNIT NAME
  596. LX6 X6,B3 POSITION TRNASACTION UNIT NAME
  597. BX1 X6
  598. EQ CCSX RETURN
  599. CTL SPACE 4,20
  600. ** CTL - CHECK TIMED TRANSACTION UNIT LIST.
  601. *
  602. * THIS ROUTINE CHECKS TIME DEPENDENT TRANSACTION UNITS.
  603. * IF IT IS TIME TO SCHEDULE A TRANSACTION UNIT THEN (X2) =
  604. * THE ADDRESS OF THE TRANSACTION UNIT, OTHERWISE (X2) = 0.
  605. *
  606. * APPLICATIONS MAY WISH TO GENERATE TIME DEPENDENT TRANS-
  607. * ACTION TABLES BY MACRO *TIMCNT* AND CHANGE THIS ROUTINE
  608. * TO SEARCH FOR THE PROPER TRANSACTION UNIT TO SCHEDULE.
  609. * DEFAULT VALUE FOR *TAF* IS NO TIMED TRANSACTION UNIT.
  610. *
  611. * ENTRY NONE.
  612. *
  613. * EXIT (X2) = FWA OF TRANSACTION UNIT TO SCHEDULE.
  614. * (X2) = 0 IF NOT TIME TO SCHEDULE TIMED TRANSACTION.
  615. *
  616. * USES X - 2.
  617.  
  618.  
  619. CTL SUBR ENTRY/EXIT
  620. SX2 0
  621. EQ CTLX RETURN
  622.  
  623. CTLA BSS 1 NEXT TIMED TRANSACTION UNIT TO SCHEDULE
  624. SPACE 4
  625. * COMMON DECKS.
  626.  
  627.  
  628. LIST X
  629. *CALL COMKCBT
  630. *CALL COMKSTC
  631. END ITASK