Table of Contents

AAML

Table Of Contents

  • [00026] AAML - ADVANCED ACCESS METHODS LIBRARY.
  • [00263] RTN - RETURN ADDRESS FOR ENTRY POINTS.
  • [00284] TASK INTERFACE ROUTINES.
  • [00286] CLOSE - CLOSE FILE.
  • [00301] DBCOMIT - DATA BASE COMMIT REQUEST.
  • [00314] DBEGIN - DATA BASE BEGIN REQUEST.
  • [00327] DBFREE - DATA BASE FREE REQUEST.
  • [00340] DBSTAT - DATA BASE STATUS REQUEST.
  • [00353] DELETE - DELETE RECORD.
  • [00368] LOCK - LOCK RECORD.
  • [00382] FLOCK - LOCK FILE.
  • [00396] OPEN - OPEN FILE FOR TASK.
  • [00410] READ - READ BY KEY.
  • [00426] READL - READ BY KEY WITH LOCK.
  • [00442] READM - READ BY MAJOR KEY.
  • [00458] READN - READ NEXT RECORD.
  • [00473] READNL - READ NEXT RECORD WITH LOCK.
  • [00489] REWIND - REWIND FILE.
  • [00503] REWRITE - REWRITE RECORD.
  • [00518] SKIPBL - SKIP BACKWARD LOGICAL RECORDS.
  • [00532] SKIPFL - SKIP FORWARD LOGICAL RECORDS.
  • [00546] UNLOCK - UNLOCK RECORD.
  • [00560] UNFLOCK - UNLOCK FILE.
  • [00574] WRITE - WRITE RECORD BY KEY.
  • [00590] START - SET STARTING POSITION.
  • [00605] REQUEST ROUTINE.
  • [00607] ISR - ISSUE REQUEST.
  • [00645] TRTN - TABLE OF RETURN ADDRESS FOR REQUESTS.

Source Code

AAML.txt
  1. IDENT AAML
  2. SST
  3. ENTRY CLOSE
  4. ENTRY DBCOMIT
  5. ENTRY DBEGIN
  6. ENTRY DBFREE
  7. ENTRY DBSTAT
  8. ENTRY DELETE
  9. ENTRY LOCK
  10. ENTRY FLOCK
  11. ENTRY OPEN
  12. ENTRY READ
  13. ENTRY READL
  14. ENTRY READM
  15. ENTRY READN
  16. ENTRY READNL
  17. ENTRY REWIND
  18. ENTRY REWRITE
  19. ENTRY SKIPBL
  20. ENTRY SKIPFL
  21. ENTRY START
  22. ENTRY UNLOCK
  23. ENTRY UNFLOCK
  24. ENTRY WRITE
  25. SYSCOM B1
  26. TITLE AAML - ADVANCED ACCESS METHODS LIBRARY.
  27. *COMMENT AAML - ADVANCED ACCESS METHODS LIBRARY.
  28. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  29. AAM SPACE 4,10
  30. ***** AAM - ADVANCED ACCESS METHODS.
  31. *
  32. * G. W. PROPP. 78/08/07.
  33. * L. E. LOVETT. 80/05/01.
  34. *
  35. * AAM IS AN USER LIBRARY INTERFACE FOR COBOL5 AND FORTRAN TASKS
  36. * MAKING ADVANCED ACCESS METHOD CYBER RECORD MANAGER REQUESTS
  37. * OF THE TRANSACTION FACILITY. DECK *AAML* IS PLACED ON THE
  38. * TRANSACTION USER LIBRARY CALLED *TRANLIB*. THE COBOL5
  39. * *ENTER* VERB AND THE FORTRAN *CALL* STATEMENT INTERFACE USER
  40. * TASKS TO THE TRANSACTION FACILITY.
  41. *
  42. * AAML HAS BEEN MODIFIED TO PROVIDE TASK LEVEL
  43. * INTERFACE TO THE TRANSACTION FACILITY FOR
  44. * DATA BASE RECOVERY CALLS.
  45. *
  46. *** THE REQUESTS FOR *TAF CMR* ARE AS FOLLOWS -
  47. *
  48. * TO CLOSE A FILE FOR A TASK -
  49. * ENTER CLOSE USING FILE,TSTAT,CSTAT.
  50. * CALL CLOSE(FILE,TSTAT,CSTAT).
  51. *
  52. * TO COMMIT AN UPDATE SEQUENCE -
  53. * ENTER DBCOMIT USING TSTAT.
  54. * CALL DBCOMIT(TSTAT)
  55. *
  56. * TO BEGIN AN UPDATE SEQUENCE -
  57. * ENTER DBEGIN USING UBID,TSTAT.
  58. * CALL DBEGIN(UBID,TSTAT)
  59. *
  60. * TO FREE AN UPDATE SEQUENCE -
  61. * ENTER DBFREE USING TSTAT.
  62. * CALL DBFREE(TSTAT)
  63. *
  64. * TO OBTAIN STATUS OF UPDATE SEQUENCE(S) -
  65. * ENTER DBSTAT USING PBID,TSTAT,CBID.
  66. * CALL DBSTAT(PBID,STAT,CBID)
  67. *
  68. * TO DELETE A RECORD -
  69. * ENTER DELETE USING FILE,TSTAT,CSTAT,KEYA,KEYP.
  70. * CALL DELETE(FILE,TSTAT,CSTAT,KEYA,KEYP)
  71. *
  72. * TO LOCK A RECORD -
  73. * ENTER LOCK USING FILE,TSTAT,KEYA,KEYP.
  74. * CALL(FILE,TSTAT,KEYA,KEYP).
  75. *
  76. * TO LOCK A FILE -
  77. * ENTER FLOCK USING FILE,TSTAT.
  78. * CALL FLOCK(FILE,TSTAT).
  79. *
  80. * TO OPEN A FILE FOR A TASK -
  81. * ENTER OPEN USING FILE,TSTAT,CSTAT.
  82. * CALL OPEN(FILE,TSTAT,CSTAT).
  83. *
  84. * TO READ A RECORD BY KEY -
  85. * ENTER READ USING FILE,TSTAT,CSTAT,WSA,WSAL,RL,KEYA,KEYP-
  86. * ,FSTAT,ALTKEY,KEYR,KEYL-.
  87. * CALL READ(FILE,TSTAT,CSTAT,WSA,WSAL,RL,KEYA,KEYP-,FSTAT
  88. * ,ALTKEY,KEYR,KEYL-).
  89. *
  90. * TO READ A RECORD BY KEY WITH LOCK -
  91. * ENTER READL USING FILE TSTAT,CSTAT,WSA,WSAL,RL,KEYA,KEYP-
  92. * ,FSTAT,ALTKEY,KEYR,KEYL-.
  93. * CALL READL(FILE,TSTAT,CSTAT,WSA,WSAL,RL,KEYA,KEYP-,FSTAT
  94. * ,ALTKEY,KEYR,KEYL-).
  95. *
  96. * TO READ A RECORD BY MAJOR KEY -
  97. * ENTER READM USING FILE,TSTAT,CSTAT,WSA,WSAL,RL,KEYR,
  98. * KEYL,KEYA,KEYP,MKEYL-,FSTAT,ALTKEY-.
  99. * CALL READM(FILE,TSTAT,CSTAT,WSA,WSAL,RL,KEYR,
  100. * KEYL,KEYA,KEYP,MKEYL-,FSTAT,ALTKEY-).
  101. *
  102. * TO READ NEXT RECORD -
  103. * ENTER READN USING FILE,TSTAT,CSTAT,WSA,WSAL,RL,KEYR,KEYL-
  104. * ,FSTAT-.
  105. * CALL READN(FILE,TSTAT,CSTAT,WSA,WSAL,RL,KEYR,KEYL-,FSTAT-).
  106. *
  107. * TO READ NEXT RECORD WITH LOCK -
  108. * ENTER READNL USING FILE,TSTAT,CSTAT,WSA,WSAL,RL,KEYR,KEYL-
  109. * ,FSTAT-.
  110. * CALL READNL(FILE,TSTAT,CSTAT,WSA,WSAL,RL,KEYR,KEYL-,FSTAT-).
  111. *
  112. * TO REWIND A FILE -
  113. * ENTER REWIND USING FILE,TSTAT,CSTAT.
  114. * CALL REWIND(FILE,TSTAT,CSTAT).
  115. *
  116. * TO REWRITE A RECORD -
  117. * ENTER REWRITE USING FILE,TSTAT,CSTAT,WSA,RL,KEYA,KEYP.
  118. * CALL REWRITE(FILE,TSTAT,CSTAT,WSA,RL,KEYA,KEYP).
  119. *
  120. * TO SKIP A LOGICAL RECORD BACKWARD -
  121. * ENTER SKIPBL USING FILE,TSTAT,CSTAT,COUNT.
  122. * CALL SKIPBL(FILE,TSTAT,CSTAT,COUNT).
  123. *
  124. * TO SKIP A LOGICAL RECORD FORWARD -
  125. * ENTER SKIPFL USING FILE,TSTAT,CSTAT,COUNT.
  126. * CALL SKIPFL(FILE,TSTAT,CSTAT,COUNT).
  127. *
  128. * TO SET THE STARTING POSITION -
  129. * ENTER START USING FILE,TSTAT,CSTAT,REL,KEYA,KEYP-,FSTAT
  130. * ,ALTKEY,MKEYL-.
  131. * CALL START(FILE,TSTAT,CSTAT,REL,KEYA,KEYP-,FSTAT,ALTKEY
  132. * ,MKEYL-).
  133. *
  134. * TO UNLOCK A RECORD -
  135. * ENTER UNLOCK USING FILE,TSTAT,KEYA,KEYP.
  136. * CALL UNLOCK(FILE,TSTAT,KEYA,KEYP).
  137. *
  138. * TO UNLOCK A FILE -
  139. * ENTER UNFLOCK USING FILE,TSTAT.
  140. * CALL UNFLOCK(FILE,TSTAT).
  141. *
  142. * TO WRITE A RECORD -
  143. * ENTER WRITE USING FILE,TSTAT,CSTAT,WSA,RL,KEYA,KEYP-,KEYR
  144. * ,KEYL-.
  145. * CALL WRITE(FILE,TSTAT,CSTAT,WSA,RL,KEYA,KEYP-,KEYR,KEYL-).
  146. *
  147. * PARAMETERS ENCLOSED IN - - ARE OPTIONAL.
  148. *
  149. *** THE PARAMETERS FOR *TAF CRM* REQUESTS ARE DEFINED BELOW -
  150. *
  151. * FILE FILE NAME SELECTED BY DATA BASE ADMINISTRATOR. THE
  152. * FILE NAME MUST BEGIN ON A WORD BOUNDARY AND CONSIST OF
  153. * 2-7 CHARACTERS WITH BLANK OR BINARY ZERO FILL.
  154. * COBOL5 - 01 LEVEL DATA NAME.
  155. * FORTRAN - INTEGER.
  156. *
  157. * TSTAT TRANSACTION FACILITY STATUS. SEE DECK *COMKTER* .
  158. * COBOL5 - 01 LEVEL COMPUTATIONAL-1 DATA NAME.
  159. * FORTRAN - INTEGER.
  160. *
  161. * CSTAT *CRM* STATUS.
  162. * COBOL5 - 01 LEVEL COMPUTATIONAL-1 DATA NAME.
  163. * FORTRAN - INTEGER.
  164. *
  165. * WSA WORKING STORAGE AREA LARGE ENOUGH TO CONTAIN RECORD.
  166. * COBOL5 - 01 LEVEL DATA NAME.
  167. * FORTRAN - INTEGER ARRAY.
  168. *
  169. *
  170. * WSAL WORKING STORAGE AREA LENGTH IN CHARACTERS.
  171. * COBOL5 - 01 LEVEL COMPUTATIONAL-1 DATA NAME.
  172. * FORTRAN - INTEGER.
  173. *
  174. * KEYR KEY RETURN AREA LARGE ENOUGH TO CONTAIN PRIMARY KEY
  175. * COBOL5 - 01 LEVEL DATA NAME.
  176. * FORTRAN - INTEGER.
  177. *
  178. * KEYL KEY RETURN AREA LENGTH IN CHARACTERS.
  179. * COBOL5 - 01 LEVEL COMPUTATIONAL-1 DATA NAME.
  180. * FORTRAN - INTEGER.
  181. *
  182. * MKEYL MAJOR KEY LENGTH IN CHARACTERS.
  183. * COBOL5 - 01 LEVEL COMPUTATIONAL-1 DATA NAME.
  184. * FORTRAN - INTEGER.
  185. *
  186. * KEYP KEY CHARACTER POSITION WITH RESPECT TO *KEYA*. *KEYP*
  187. * STARTS AT ONE FOR FIRST CHARACTER OF *KEYA*.
  188. * COBOL5 - 01 COMPUTATIONAL-1 DATA NAME.
  189. * FORTRAN - INTEGER.
  190. *
  191. * KEYA KEY AREA. THIS IS A DATA NAME CONTAINING THE KEY
  192. * VALUE.
  193. * COBOL5 - 01 LEVEL DATA NAME.
  194. * FORTRAN - INTEGER.
  195. *
  196. * RL RECORD LENGTH IN CHARACTERS. ON AN INPUT REQUEST
  197. * THE TRANSACTION FACILITY RETURNS THE LENGTH. ON
  198. * OUTPUT THE TASK MUST SPECIFY THE LENGTH.
  199. * COBOL5 - 01 LEVEL COMPUTATIONAL-1 DATA NAME.
  200. * FORTRAN - INTEGER.
  201. *
  202. * COUNT COUNT OF LOGICAL RECORDS TO SKIP.
  203. * COBOL5 - 01 LEVEL COMPUTATIONAL-1 DATA ANME.
  204. * FORTRAN - INTEGER.
  205. *
  206. * UBID USER SUPPLIED BEGIN IDENTIFIER.
  207. * ON A DBEGIN REQUEST THE USER SUPPLIES A 5 CHARACTER
  208. * BEGIN IDENTIFIER.
  209. * COBOL5 - 01 LEVEL ALPHANUMERIC DATA NAME.
  210. * FORTRAN - INTEGER.
  211. *
  212. * PBID BEGIN IDENTIFIER OF THE (LAST) SUCCESSFULLY
  213. * COMPLETED UPDATE SEQUENCE. ON A DBSTAT REQUEST THE
  214. * TRANSACTION FACILITY WILL RETURN THIS IDENTIFIER
  215. * IN THE UPPER 30 BITS OF THE WORD, THE LOWER 30 BITS
  216. * REMAIN UNCHANGED.
  217. * COBOL5 - 01 LEVEL ALPHANUMERIC DATA NAME.
  218. * FORTRAN - INTEGER.
  219. *
  220. * CBID BEGIN IDENTIFIER OF THE CURRENT UPDATE SEQUENCE.
  221. * ON A DBSTAT REQUEST THE TRANSACTION FACILITY WILL
  222. * RETURN THIS IDENTIFIER IN THE UPPER 30 BITS OF THE
  223. * WORD, THE LOWER 30 BITS REMAIN UNCHANGED.
  224. * COBOL5 - 01 LEVEL ALPHANUMERIC DATA NAME.
  225. * FORTRAN - INTEGER.
  226. *
  227. * REL CODE GOVERNING POSITION RELATIVE TO GIVEN KEY AFTER
  228. * OPERATION.
  229. * VALUES EQ, GE, GT.
  230. * COBOL5 - 01 LEVEL DATA NAME.
  231. * FORTRAN - INTEGER DISPLAY CODE LEFT JUSTIFIED.
  232. *
  233. * FSTAT FILE POSITION INFORMATION.
  234. * RETURNED VALUES 0.
  235. * 1 NOT ON KEY.
  236. * 10B END OF KEY.
  237. * 100B END OF INFORMATION.
  238. * COBOL5 - 01 LEVEL COMPUTATIONAL-1 DATA NAME.
  239. * FORTRAN - INTEGER.
  240. *
  241. * ALTKEY ORDINAL OF ALTERNATE KEY FOR OPERATION
  242. * VALUES -1 NO CHANGE FROM CURRENT.
  243. * 0 PRIMARY KEY.
  244. * N ALTERNATE KEY N.
  245. * COBOL5 - 01 LEVEL COMPUTATIONAL-1 DATA NAME.
  246. * FORTRAN - INTEGER.
  247. SPACE 4,10
  248.  
  249.  
  250. * COMMON DECKS.
  251.  
  252. *CALL COMKTAF
  253. *CALL COMKIPR
  254. *CALL COMKTDM
  255. *CALL COMCMAC
  256. *CALL COMKFLD
  257. BEGINT BSS 0
  258. LIST X
  259. *CALL COMKCRM
  260. SPACE 4,10
  261. ORG BEGINT DO NOT RESERVE SPACE FOR *TAF CRM* TABLES
  262. LIST -X
  263. ** RTN - RETURN ADDRESS FOR ENTRY POINTS.
  264. * *RTN* GENERATES RETURN ADDRESS FOR ROUTINE ISSUING
  265. * *CRM* REQUEST. THE MACRO ALSO ENSURES THE RETURN
  266. * ADDRESS IS POSITIONED CORRECTLY IN THE TABLE OF
  267. * RETURN ADDRESSES.
  268. *
  269. * ENTRY CODE = TASK REQUEST CODE.
  270. * RETN = ENTRY POINT TO PROCESS TASK REQUEST.
  271. * (.1) = RETURN ADDRESS TABLE COUNTER.
  272. *
  273. * EXIT RETURN ADDRESS *RETN* IS PLACED IN TABLE.
  274. * (.1) = (.1) + 1.
  275.  
  276.  
  277. PURGMAC RTN
  278.  
  279. RTN MACRO CODE,RETN
  280. ERRNZ .1-CODE IF REQUEST CODE NOT IN ORDER
  281. VFD 12/0,18/RETN
  282. .1 SET .1+1
  283. ENDM
  284. TITLE TASK INTERFACE ROUTINES.
  285. CLOSE SPACE 4,10
  286. ** CLOSE - CLOSE FILE.
  287. *
  288. * ENTRY ENTER CLOSE USING FILE,TSTAT,CSTAT.
  289. * CALL CLOSE(FILE,TSTAT,CSTAT).
  290. *
  291. * EXIT TO *ISR* TO ISSUE REQUEST.
  292. *
  293. * USES X - 1.
  294.  
  295.  
  296. VFD 42/0LAAML,18/CLOSE IDENTIFY DECK
  297. CLOSE SUBR ENTRY/EXIT
  298. SX1 TRCL CLOSE FILE FOR TASK
  299. EQ ISR ISSUE REQUEST
  300. SPACE 4,10
  301. ** DBCOMIT - DATA BASE COMMIT REQUEST.
  302. *
  303. * ENTRY ENTER DBCOMIT USING TSTAT.
  304. * CALL DBCOMIT(TSTAT)
  305. *
  306. * EXIT TO *ISR* TO ISSUE REQUEST.
  307. *
  308. * USES X - 1.
  309.  
  310. DBCOMIT SUBR ENTRY/EXIT
  311. SX1 TRDC DATA BASE COMMIT REQUEST
  312. EQ ISR ISSUE REQUEST
  313. SPACE 4,10
  314. ** DBEGIN - DATA BASE BEGIN REQUEST.
  315. *
  316. * ENTRY ENTER DBEGIN USING UBID,TSTAT.
  317. * CALL DBEGIN(UBID,TSTAT)
  318. *
  319. * EXIT TO *ISR* TO ISSUE REQUEST.
  320. *
  321. * USES X - 1.
  322.  
  323. DBEGIN SUBR ENTRY/EXIT
  324. SX1 TRDB DATA BASE BEGIN REQUEST
  325. EQ ISR ISSUE REQUEST
  326. SPACE 4,10
  327. ** DBFREE - DATA BASE FREE REQUEST.
  328. *
  329. * ENTRY ENTER DBFREE USING TSTAT.
  330. * CALL DBFREE(TSTAT)
  331. *
  332. * EXIT TO *ISR* TO ISSUE REQUEST.
  333. *
  334. * USES X - 1.
  335.  
  336. DBFREE SUBR ENTRY/EXIT
  337. SX1 TRDF DATA BASE FREE REQUEST
  338. EQ ISR ISSUE REQUEST
  339. SPACE 4,10
  340. ** DBSTAT - DATA BASE STATUS REQUEST.
  341. *
  342. * ENTRY ENTER DBSTAT USING PBID,TSTAT,CBID.
  343. * CALL DBSTST(PBID,TSTAT,CBID)
  344. *
  345. * EXIT TO *ISR* TO ISSUE REQUEST.
  346. *
  347. * USES X - 1.
  348.  
  349. DBSTAT SUBR ENTRY/EXIT
  350. SX1 TRDS DATA BASE STATUS REQUEST
  351. EQ ISR ISSUE REQUEST
  352. DELETE SPACE 4,10
  353. ** DELETE - DELETE RECORD.
  354. *
  355. * ENTRY ENTER DELETE USING FILE,TSTAT,CSTAT,KEYA,KEYP.
  356. * CALL DELETE(FILE,TSTAT,CSTAT,KEYA,KEYP).
  357. *
  358. * EXIT TO *ISR* TO ISSUE REQUEST.
  359. *
  360. * USES X - 1.
  361.  
  362.  
  363. DELETE SUBR ENTRY/EXIT
  364. SX1 TRDE DELETE RECORD
  365. EQ ISR ISSUE REQUEST
  366. LOCK SPACE 4,10
  367. LOCK SPACE 4,10
  368. ** LOCK - LOCK RECORD.
  369. *
  370. * ENTRY ENTER LOCK USING FILE,TSTAT,KEYA,KEYP.
  371. * CALL(FILE,TSTAT,KEYA,KEYP).
  372. *
  373. * EXIT TO *ISR* TO ISSUE REQUEST.
  374. *
  375. * USES X - 1.
  376.  
  377.  
  378. LOCK SUBR ENTRY/EXIT
  379. SX1 TRLC LOCK RECORD
  380. EQ ISR ISSUE REQUEST
  381. FLOCK SPACE 4,10
  382. ** FLOCK - LOCK FILE.
  383. *
  384. * ENTRY ENTER FLOCK USING FILE,TSTAT.
  385. * CALL FLOCK(FILE,TSTAT).
  386. *
  387. * EXIT TO *ISR* TO ISSUE REQUEST.
  388. *
  389. * USES X - 1.
  390.  
  391.  
  392. FLOCK SUBR ENTRY/EXIT
  393. SX1 TRLF LOCK FILE
  394. EQ ISR ISSUE REQUEST
  395. OPEN SPACE 4,10
  396. ** OPEN - OPEN FILE FOR TASK.
  397. *
  398. * ENTRY ENTER OPEN USING FILE,TSTAT,CSTAT.
  399. * CALL OPEN(FILE,TSTAT,CSTAT).
  400. *
  401. * EXIT TO *ISR* TO ISSUE REQUEST.
  402. *
  403. * USES X - 1.
  404.  
  405.  
  406. OPEN SUBR ENTRY/EXIT
  407. SX1 TROP OPEN FILE FOR TASK
  408. EQ ISR ISSUE REQUEST
  409. READ SPACE 4,10
  410. ** READ - READ BY KEY.
  411. *
  412. * ENTRY ENTER READ USING FILE,TSTAT,CSTAT,WSA,WSAL,RL,KEYA,
  413. * KEYP-,FSTAT,ALTKEY-.
  414. * CALL READ(FILE,TSTAT,CSTAT,WSA,WSAL,RL,KEYA,KEYP-,
  415. * FSTAT,ALTKEY-).
  416. *
  417. * EXIT TO *ISR* TO ISSUE REQUEST.
  418. *
  419. * USES X - 1.
  420.  
  421.  
  422. READ SUBR ENTRY/EXIT
  423. SX1 TRRD READ BY KEY
  424. EQ ISR ISSUE REQUEST
  425. READL SPACE 4,10
  426. ** READL - READ BY KEY WITH LOCK.
  427. *
  428. * ENTRY ENTER READL USING FILE,TSTAT,CSTAT,WSA,WSAL,RL,KEYA,
  429. * KEYP-,FSTAT,ALTKEY-.
  430. * CALL READL(FILE,TSTAT,CSTAT,WSA,WSAL,RL,KEYA,KEYP-
  431. * ,FSTAT,ALTKEY-).
  432. *
  433. * EXIT TO *ISR* TO ISSUE REQUEST
  434. *
  435. * USES X - 1.
  436.  
  437.  
  438. READL SUBR ENTRY/EXIT
  439. SX1 TRRL READ BY KEY WITH LOCK
  440. EQ ISR ISSUE REQUEST
  441. READM SPACE 4,10
  442. ** READM - READ BY MAJOR KEY.
  443. *
  444. * ENTRY ENTER READM USING FILE,TSTAT,CSTAT,WSA,WSAL,RL,KEYR,
  445. * KEYRL,KEYA,KEYP,MKEYL-,FSTAT,ALTKEY-.
  446. * CALL READM(FILE,TSTAT,CSTAT,WSA,WSAL,RL,KEYR,KEYRL,
  447. * KEYA,KEYP,MKEYL-,FSTAT,ALTKEY-).
  448. *
  449. * EXIT TO *ISR* TO ISSUE REQUEST.
  450. *
  451. * USES X - 1.
  452.  
  453.  
  454. READM SUBR ENTRY/EXIT
  455. SX1 TRRM READ BY MAJOR KEY
  456. EQ ISR ISSUE REQUEST
  457. READN SPACE 4,10
  458. ** READN - READ NEXT RECORD.
  459. *
  460. * ENTRY ENTER READN USING FILE,TSTAT,CSTAT,WSA,WSAL,RL,KEYR,
  461. * KEYL-,FSTAT-.
  462. * CALL READN(FILE,TSTAT,CSTAT,WSA,RL,KEYR,KEYL-,FSTAT-).
  463. *
  464. * ENIT TO *ISR* TO ISSUE REQUEST.
  465. *
  466. * USES X - 1.
  467.  
  468.  
  469. READN SUBR ENTRY/EXIT
  470. SX1 TRRN READ NEXT RECORD WITHOUT LOCK
  471. EQ ISR ISSUE REQUEST
  472. READNL SPACE 4,10
  473. ** READNL - READ NEXT RECORD WITH LOCK.
  474. *
  475. * ENTRY ENTER READNL USING FILE,TSTAT,CSTAT,WSA,WSAL,RL,KEYR,
  476. * KEYL-,FSTAT-.
  477. * CALL READNL(FILE,TSTAT,CSTAT,WSA,RL,KEYR,KEYL-
  478. * ,FSTAT-).
  479. *
  480. * EXIT TO *ISR* TO ISSUE REQUEST.
  481. *
  482. * USES X - 1.
  483.  
  484.  
  485. READNL SUBR ENTRY/EXIT
  486. SX1 TRRO READ NEXT RECORD WITH LOCK
  487. EQ ISR ISSUE REQUEST
  488. REWIND SPACE 4,10
  489. ** REWIND - REWIND FILE.
  490. *
  491. * ENTRY ENTER REWIND USING FILE,TSTAT,CSTAT.
  492. * CALL REWIND(FILE,TSTAT,CSTAT).
  493. *
  494. * EXIT TO *ISR* TO ISSUE REQUEST
  495. *
  496. * USES X - 1.
  497.  
  498.  
  499. REWIND SUBR ENTRY/EXIT
  500. SX1 TRRP REWIND FILE
  501. EQ ISR ISSUE REQUEST
  502. REWRITE SPACE 4,10
  503. ** REWRITE - REWRITE RECORD.
  504. *
  505. * ENTRY ENTER REWRITE USING FILE,TSTAT,CSTAT,WSA,RL,KEYA,
  506. * KEYP.
  507. * CALL REWRITE(FILE,TSTAT,CSTAT,WSA,RL,KEYA,KEYP).
  508. *
  509. * EXIT TO *ISR* TO ISSUE REQUEST.
  510. *
  511. * USES X - 1.
  512.  
  513.  
  514. REWRITE SUBR ENTRY/EXIT
  515. SX1 TRRW REWRITE RECORD
  516. EQ ISR ISSUE REQUEST
  517. SKIPBL SPACE 4,10
  518. ** SKIPBL - SKIP BACKWARD LOGICAL RECORDS.
  519. *
  520. * ENTRY ENTER SKIPBL USING FILE,TSTAT,CSTAT,COUNT.
  521. * CALL SKIPBL(FILE,TSTAT,CSTAT,COUNT).
  522. *
  523. * EXIT TO *ISR* TO ISSUE REQUEST.
  524. *
  525. * USES X - 1.
  526.  
  527.  
  528. SKIPBL SUBR ENTRY/EXIT
  529. SX1 TRSB SKIP LOGICAL RECORDS BACKWARD
  530. EQ ISR ISSUE REQUEST
  531. SKIPFL SPACE 4,10
  532. ** SKIPFL - SKIP FORWARD LOGICAL RECORDS.
  533. *
  534. * ENTRY ENTER SKIPFL USING FILE,TSTAT,CSTAT,COUNT.
  535. * CALL SKIPFL(FILE,TSTAT,CSTAT,COUNT).
  536. *
  537. * EXIT TO *ISR* TO ISSUE REQUEST.
  538. *
  539. * USES X - 1.
  540.  
  541.  
  542. SKIPFL SUBR ENTRY/EXIT
  543. SX1 TRSF SKIP FORWARD LOGICAL RECORD
  544. EQ ISR ISSUE REQUEST
  545. UNLOCK SPACE 4,10
  546. ** UNLOCK - UNLOCK RECORD.
  547. *
  548. * ENTRY ENTER UNLOCK USING FILE,TSTAT,KEYA,KEYP.
  549. * CALL UNLOCK(FILE,TSTAT,KEYA,KEYP).
  550. *
  551. * EXIT TO *ISR* TO ISSUE REQUEST.
  552. *
  553. * USES X - 1.
  554.  
  555.  
  556. UNLOCK SUBR ENTRY/EXIT
  557. SX1 TRUC UNLOCK RECORD
  558. EQ ISR ISSUE REQUEST
  559. UNFLOCK SPACE 4,10
  560. ** UNFLOCK - UNLOCK FILE.
  561. *
  562. * ENTRY ENTER UNFLOCK USING FILE,TSTAT.
  563. * CALL UNFLOCK(FILE,TSTAT).
  564. *
  565. * EXIT TO *ISR* TO ISSUE REQUEST.
  566. *
  567. * USES X - 1.
  568.  
  569.  
  570. UNFLOCK SUBR ENTRY/EXIT
  571. SX1 TRUF UNLOCK FILE
  572. EQ ISR ISSUE REQUEST
  573. WRITE SPACE 4,10
  574. ** WRITE - WRITE RECORD BY KEY.
  575. *
  576. * ENTRY ENTER WRITE USING FILE,TSTAT,CSTAT,WSA,RL,KEYA,
  577. * KEYP-,KEYR,KEYL-.
  578. * CALL WRITE(FILE,TSTAT,CSTAT,WSA,RL,KEYA,KEYP-,KEYR
  579. * ,KEYL-).
  580. *
  581. * EXIT TO *ISR* TO ISSUE REQUEST.
  582. *
  583. * USES X - 1.
  584.  
  585.  
  586. WRITE SUBR ENTRY/EXIT
  587. SX1 TRWR WRITE RECORD BY KEY
  588. EQ ISR ISSUE REQUEST
  589. START SPACE 4,20
  590. ** START - SET STARTING POSITION.
  591. *
  592. * ENTRY ENTER START USING FILE,TSTAT,CSTAT,REL,KEYA,KEYP-
  593. * ,FSTAT,ALTKEY,MKEYL-.
  594. *
  595. * CALL START(FILE,TSTAT,CSTAT,REL,KEYA,KEYP-,FSTAT
  596. * ,ALTKEY,MKEYL-).
  597. *
  598. * EXIT TO *ISR* TO ISSUE REQUEST.
  599. *
  600. * USES X - 1.
  601.  
  602. START SUBR ENTRY/EXIT
  603. SX1 TRST SET STARTING POSITION
  604. EQ ISR ISSUE REQUEST
  605. TITLE REQUEST ROUTINE.
  606. ISR SPACE 4,10
  607. ** ISR - ISSUE REQUEST.
  608. *
  609. * ENTRY (X1) = REQUEST CODE.
  610. * (A1) = ADDRESS OF REQUEST PARAMETERS.
  611. *
  612. * USES X - 0, 1, 2, 6, 7.
  613. * A - 2.
  614. * B - 1, 7.
  615. *
  616. * EXIT (B1) = 1.
  617. *
  618. * CALLS SYS=.
  619.  
  620.  
  621. ISR SB1 1
  622.  
  623. * DETERMINE RETURN ADDRESS OF CALLER.
  624.  
  625. SX2 X1 COMPUTE WORD INDEX INTO *TRTN* TABLE
  626. LX1 59-0 DETERMINE LOWER OR UPPER TABLE ENTRY
  627. AX2 1 DIVIDE BY 2
  628. SA2 X2+TRTN
  629. NG X1,ISR1 IF UPPER ENTRY
  630. LX2 30
  631. ISR1 SX0 X2 RETURN ADDRESS
  632.  
  633. * SET UP REQUEST.
  634.  
  635. SX6 3RAAM
  636. SX7 A1 PARAMETER ADDRESS
  637. LX6 59-17
  638. BX6 X7+X6
  639. LX1 23-5+1 REQUEST CODE
  640. BX6 X6+X1
  641. RJ =XSYS= ISSUE REQUEST
  642. SB7 X0 RETURN ADDRESS
  643. JP B7 RETURN
  644. TRTN SPACE 4,10
  645. ** TRTN - TABLE OF RETURN ADDRESS FOR REQUESTS.
  646. * TWO RETURN ADDRESS ARE PACKED PER WORD TO SAVE CORE.
  647. * THE TABLE MUST BE IN ASCENDING ORDER ACCORDING
  648. * TO REQUEST CODE GIVEN IN *COMKCRM*.
  649. *
  650. *T 12/0,18/ RTN1,12/0,18/ RTN2
  651. *
  652. * RTN1 - ODD REQUEST CODE RETURN ADDRESS.
  653. * RTN2 - EVEN REQUEST CODE RETURN ADDRESS.
  654.  
  655.  
  656. .1 SET 0 REQUEST CODE SEQUENCE COUNTER
  657. TRTN BSS 0 TABLE OF RETURN ADDRESS FOR REQUESTS
  658. RTN TRCL,CLOSE
  659. RTN TRDE,DELETE
  660. RTN TRLC,LOCK
  661. RTN TRLF,FLOCK
  662. RTN TROP,OPEN
  663. RTN TRRD,READ
  664. RTN TRRL,READL
  665. RTN TRRM,READM
  666. RTN TRRN,READN
  667. RTN TRRO,READNL
  668. RTN TRRP,REWIND
  669. RTN TRRW,REWRITE
  670. RTN TRSB,SKIPBL
  671. RTN TRSF,SKIPFL
  672. RTN TRUC,UNLOCK
  673. RTN TRUF,UNFLOCK
  674. RTN TRWR,WRITE
  675. RTN TRST,START
  676. RTN TRDB,DBEGIN
  677. RTN TRDC,DBCOMIT
  678. RTN TRDF,DBFREE
  679. RTN TRDS,DBSTAT
  680. ERRNZ .1-.TREQL IF ALL TASK REQUESTS NOT IN TABLE
  681. END