Table of Contents

BLDABH

Table Of Contents

  • [00006] BLDABH - BUILD APPLICATION BLOCK HEADER.
  • [00021] BUILD APPLICATION BLOCK HEADER.
  • [00100] GET APPLICATION BLOCK HEADER.
  • [00180] FKA - FIND KEYWORD ARGUMENT.
  • [00219] TABLE OF KEYWORD PARAMETERS.

Source Code

BLDABH.txt
  1. IDENT BLDABH
  2. ENTRY BLDABH
  3. ENTRY GETABH
  4. *COMMENT BLDABH - BUILD APPLICATION BLOCK HEADER.
  5. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  6. TITLE BLDABH - BUILD APPLICATION BLOCK HEADER.
  7. SPACE 4
  8. ***** BLDABH - BUILD APPLICATION BLOCK HEADER.
  9. * W.E. MARTIN. 77/01/31.
  10.  
  11.  
  12. * COMMON TEXT DEFINITION.
  13.  
  14.  
  15. *CALL COMCMAC
  16. *CALL COMKFLD
  17. *CALL COMKMAC
  18. *CALL COMKNWF
  19. *CALL COMSPRD
  20. BLDABH SPACE 4,35
  21. *** BLDABH - BUILD APPLICATION BLOCK HEADER.
  22. *
  23. * *BLDABH* WILL FORMAT THE APPLICATION BLOCK HEADER, *ABH*,
  24. * FOR A FORTRAN EXTENDED OR COBOL USER. SINCE THE HEADER
  25. * IS PACKED INTO FIELDS THAT ARE MEANINGFUL ONLY TO THE
  26. * SUPERVISORY MESSAGE PROCESSOR, THIS ROUTINE WILL MAP USER
  27. * SUPPLIED (KEYWORD,VALUE) PAIRS INTO THE APPROPRIATE FIELDS
  28. * VIA TABLE LOOKUP OF THE KEYWORD.
  29. *
  30. * CALL FORMAT -
  31. *
  32. * FORTRAN EXTENDED -
  33. *
  34. * CALL BLDABH(KEYWORD1,VALUE1, ... )
  35. *
  36. * COBOL -
  37. *
  38. * ENTER BLDABH USING KEYWORD1,VALUE1, ... .
  39. *
  40. * WHERE - KEYWORD1 = MAY BE OF THE FORM 3CXXX, WHERE C IS THE
  41. * HOLLERITH CHARACTER DESCRIPTOR, L OR H,
  42. * AND XXX IS ANY OF THE KEYWORDS WHOSE
  43. * UNION DETERMINES THE SET OF FIELDS IN THE
  44. * *ABH*.
  45. *
  46. * VALUE1 = VALUE TO BE ASSOCIATED WITH PRECEDING
  47. * KEYWORD.
  48. * FORTRAN EXTENDED = INTEGER.
  49. * COBOL = COMPUTATIONAL-1.
  50.  
  51.  
  52. VFD 42/0LBLDABH,18/BLDABH
  53. BLDABH SUBR ENTRY/EXIT
  54. SX6 A0
  55. SB1 1
  56. SA2 A1 READ TERMINAL NAME
  57. SA6 BLDA SAVE (A0)
  58. SA3 =XABH. DEFAULT APPLICATION BLOCK HEADER
  59. ZR X1,BLD2 IF NO ARGUMENTS - ABORT TASK
  60. BX0 X3
  61. SA1 X2
  62.  
  63. * PROCESS (KEYWORD,VALUE) PAIRS.
  64.  
  65. BLD1 RJ ZFN ZERO FILL NAME
  66. RJ FKA FIND KEYWORD ARGUMENT
  67. NZ X6,BLD2 IF KEYWORD NOT FOUND
  68. MX1 1
  69. SB5 B3+B4
  70. AX1 B4 FORM MASK
  71. SB5 B5+B1 INCREMENT SHIFT COUNT
  72. SA2 A2+B1 READ VALUE FIELD
  73. LX1 B5
  74. ZR X2,BLD2 IF PREMATURE END OF ARGUMENT LIST
  75. SA3 X2
  76. BX0 -X1*X0
  77. UX3 X3 UNPACK POSSIBLE COBOL ARGUMENT
  78. LX3 B3
  79. BX0 X0+X3 MERGE VALUE
  80. SA2 A2+B1
  81. SA1 X2 NEXT KEYWORD
  82. NZ X2,BLD1 IF NOT END OF ARGUMENT LIST
  83. BX6 X0
  84. SA1 BLDA SAVE (A0)
  85. SA6 =XABH.
  86. SA0 X1
  87. EQ BLDABHX RETURN
  88.  
  89. * ABORT TASK DUE TO ARGUMENT ERROR.
  90.  
  91. BLD2 SA1 BLDABH
  92. MX0 30
  93. LX1 30
  94. SA2 X1-1 READ *RJ* FROM CALLING PROGRAM
  95. BX6 -X0*X2 SET TRACE-BACK WORD INTO BUFFER
  96. SA6 BLDB
  97. ARGERR A6 EXIT TO EXECUTIVE
  98.  
  99. GETABH SPACE 4,10
  100. *** GETABH - GET APPLICATION BLOCK HEADER.
  101. *
  102. * GET APPLICATION BLOCK HEADER MAKES A *CTI* REQUEST
  103. * FOR RETURN OF THE LAST APPLICATION BLOCK HEADER THAT
  104. * ACCOMPANIED A TERMINAL REQUEST. THE KEYWORDS ARE
  105. * LOOKED UP, THE APPROPRIATE FIELDS INTERROGATED AND
  106. * RETURNED TO THE LOCATIONS SPECIFIED IN THE PARAMETER
  107. * LIST. IF THE TERMINAL IS LOGGED IN, THE STATUS WORD
  108. * WILL BE RETURNED NON-ZERO; FURTHER, THE TASK WILL BE
  109. * ABORTED IF THE REQUEST ATTEMPTS TO CROSS DATA BASES.
  110. *
  111. * CALL FORMAT -
  112. *
  113. * ALL CALLS ARE EXACTLY AS SPECIFIED IN *BLDABH*, WITH
  114. * THE VALUES BEING RETURNED TO THE USER, INSTEAD OF
  115. * BEING ACCEPTED.
  116.  
  117.  
  118. VFD 42/0LGETABH,18/GETABH
  119. GETABH SUBR ENTRY/EXIT
  120. MX0 42
  121. SA2 X1 TERMINAL NAME
  122. SB1 1
  123. ZR X1,GAH3 IF NO PARAMETERS
  124. SX6 A0
  125. UX1,B6 X2
  126. SA6 BLDA
  127. ZR X1,GAH1 IF NO TERMINAL NAME
  128. BX1 X0*X2
  129. RJ ZFN ZERO FILL NAME
  130. GAH1 BX6 X1
  131. SA3 A1+B1
  132. SA6 BLDB
  133. SX7 X3 (X7) = ADRESS OF STATUS PARAMETER
  134. SX5 A1+ (X5) = ADDRESS OF PARAMETER LIST
  135. SA7 A6+B1
  136. GETABH A6
  137. SA2 BLDB+2 APPLICATION BLOCK HEADER
  138. BX0 X2 (X0) = ABH
  139. SA2 BLDB+1 ADDRESS OF LOGGIN STATUS WORD
  140. SA3 X2 (X3) = TERMINAL LOGIN STATUS
  141. UX3 X3
  142. NZ X3,GAH3 IF TERMINAL LOGGED IN
  143. GAH2 SA1 BLDA
  144. SA0 X1+
  145. EQ GETABHX RETURN - TERMINAL NOT LOGGED IN
  146.  
  147. GAH3 SA2 X5+2 READ ADDRESS OF KEYWORD
  148. ZR X2,GAH5 IF SHORT ARGUMENT LIST
  149. SA1 X2+
  150. GAH4 RJ ZFN ZERO FILL NAME
  151. RJ FKA FIND KEYWORD ARGUMENT
  152. NZ X6,GAH5 IF KEYWORD NOT FOUND
  153. MX3 1
  154. SB5 B3+B4 (B5) = SHIFT COUNT TO POSITION MASK
  155. AX3 B4
  156. SB5 B5+B1
  157. LX3 B5 POSITION MASK
  158. SA2 A2+B1 READ ADDRESS OF VALUE PARAMETER
  159. BX6 X0*X3
  160. AX6 B3
  161. ZR X2,GAH5 IF NO LOCATION FOR KEYWORD
  162. PX6 X6
  163. SA6 X2
  164. SA2 A2+B1 READ ADDRESS OF KEYWORD PARAMETER
  165. SA1 X2 READ NEXT KEYWORD
  166. NZ X2,GAH4 IF SHOULD CONTINUE PROCESSING
  167. EQ GAH2 RESTORE (A0) AND RETURN
  168.  
  169. * ABORT TASK DUE TO ARGUMENT ERRORS.
  170.  
  171. GAH5 SA1 GETABH
  172. MX0 30
  173. LX1 30
  174. SA2 X1-1 READ *RJ* FROM CALLING PROGRAM
  175. BX6 -X0*X2 SET TRACE-BACK WORD INTO BUFFER
  176. SA6 BLDB
  177. ARGERR A6 EXIT TO EXECUTIVE
  178.  
  179. SPACE 4,10
  180. ** FKA - FIND KEYWORD ARGUMENT.
  181. *
  182. * FIND KEYWORD ARGUMENT FINDS A KEYWORD PARAMETER AND RETURNS
  183. * A FIELD WIDTH AND SHIFT COUNT WITH WHICH TO FORM A MASK IN
  184. * THE APPROPRIATE FIELD OF THE *ABH*.
  185. *
  186. * ENTRY (X1) = KEYWORD TO BE FOUND - LEFT JUSTIFIED.
  187. *
  188. * EXIT (B3) = SHIFT COUNT FOR A MASK RIGHT JUSTIFIED.
  189. * (B4) = FIELD WIDTH FOR MASK OF KEYWORD.
  190. * (X6) = NON-ZERO - IF ARGUMENT NOT FOUND.
  191. *
  192. * USES X - 3, 4, 5, 6, 7.
  193. * B - 3, 4.
  194. * A - 3.
  195.  
  196.  
  197. FKA SUBR ENTRY/EXIT
  198. MX4 18
  199. SB3 TABHL
  200. MX7 -6
  201. FKA1 SA3 TABH-1+B3 CURRENT ENTRY
  202. BX5 X4*X3
  203. SB3 B3-B1
  204. BX6 X5-X1
  205. ZR X6,FKA2 IF KEY WORD FOUND
  206. GE B3,FKA1 IF TABLE NOT EXHAUSTED
  207. EQ FKAX RETURN - ARGUMENT NOT VALID KEYWORD
  208.  
  209. FKA2 BX4 -X7*X3
  210. AX3 6
  211. SB3 X4 (B3) = SHIFT COUNT
  212. BX4 -X7*X3
  213. SB4 X4 (B4) = FIELD WIDTH OF KEYWORD
  214. EQ FKAX RETURN
  215. SPACE 4,10
  216. BLDA BSS 1 TEMPORARY STORAGE FOR (A0)
  217. BLDB BSS 3 PARAMETER BLOCK FOR *CTI* REQUEST
  218. SPACE 4
  219. ** TABH - TABLE OF KEYWORD PARAMETERS.
  220. *
  221. *T 18/KEYWORD, 30/0, 6/MASK, 6/BIT
  222. *
  223. * WHERE - MASK = MASK WIDTH-1.
  224. *
  225. * BIT = BEGINNING BIT POSITION OF FIELD.
  226.  
  227. TABH BSS 0
  228. VFD 18/3LABT,30/0,6/AHBTN-1,6/AHBTS-AHBTN+1
  229. VFD 18/3LADR,30/0,6/AHADN-1,6/AHADS-AHADN+1
  230. VFD 18/3LABN,30/0,6/AHBNN-1,6/AHBNS-AHBNN+1
  231. VFD 18/3LACT,30/0,6/AHCTN-1,6/AHCTS-AHCTN+1
  232. VFD 18/3LIBU,30/0,6/AHBUN-1,6/AHBUS-AHBUN+1
  233. VFD 18/3LRFE,30/0,6/AHRFN-1,6/AHRFS-AHRFN+1
  234. VFD 18/3LNFE,30/0,6/AHNFN-1,6/AHNFS-AHNFN+1
  235. VFD 18/3LXPT,30/0,6/AHPTN-1,6/AHPTS-AHPTN+1
  236. VFD 18/3LCAN,30/0,6/AHCNN-1,6/AHCNS-AHCNN+1
  237. VFD 18/3LBIT,30/0,6/AHPRN-1,6/AHPRS-AHPRN+1
  238. VFD 18/3LAIM,30/0,6/AHPRN-1,6/AHPRS-AHPRN+1
  239. VFD 18/3LPEF,30/0,6/AHPRN-1,6/AHPRS-AHPRN+1
  240. VFD 18/3LTLC,30/0,6/AHLCN-1,6/AHLCS-AHLCN+1
  241. TABHL EQU *-TABH LENGTH OF KEYWORD PARAMETER TABLE
  242. SPACE 4
  243. * COMMON DECKS.
  244.  
  245.  
  246. *CALL COMKZFN
  247. SPACE 4
  248. END