User Tools

Site Tools


cdc:nos2.source:nam5871:ndlckrg

NDLCKRG

Table Of Contents

  • [00005] PROC NDLCKRG(KWID,VALUE,VAL$STAT)
  • [00009] CHECK RANGE FOR PARAMETER.
  • [00042] PROC NDLEM2
  • [00043] FUNC XCDD C(10)
  • [00044] FUNC XCHD C(10)

Source Code

NDLCKRG.txt
  1. *DECK NDLCKRG
  2. USETEXT NDLER2T
  3. USETEXT NDLTBLT
  4. USETEXT NDLDATT
  5. PROC NDLCKRG(KWID,VALUE,VAL$STAT);
  6. BEGIN
  7. *IF,DEF,IMS
  8. #
  9. ** NDLCKRG - CHECK RANGE FOR PARAMETER.
  10. *
  11. * D.K. ENDO 81/10/12
  12. *
  13. * THIS PROCEDURE CHECKS RANGE TABLE FOR PARAMETER AND THEN CHECKS
  14. * IF VALUE IS WITHIN RANGE.
  15. *
  16. * PROC NDLCKRG(KWID,VALUE,VAL$STAT)
  17. *
  18. * ENTRY KWID = KEYWORD I.D.
  19. * VALUE = VALUE ASSIGNED TO KEYWORD
  20. *
  21. * EXIT VAL$STAT = STATUS FLAG, SET IF VALUE IS O.K.
  22. *
  23. * METHOD
  24. *
  25. * SEARCH RANGE TABLE FOR KEYWORD I.D.
  26. * IF FOUND
  27. * CHECK IF VALUE IS WITHIN LEGAL LIMITS
  28. * IF NOT WITHIN RANGE
  29. * CONVERT NUMBER TO DISPLAY CODE.
  30. * FLAG ERROR -- VALUE OUT OF RANGE.
  31. *
  32. #
  33. *ENDIF
  34. ITEM KWID; # KEYWORD I.D. #
  35. ITEM VALUE; # VALUE ASSIGNED TO KEYWORD #
  36. ITEM VAL$STAT B; # RETURN STATUS -- SET IF VALUE IS O.K. #
  37. #
  38. **** PROC NDLCKRG - XREF LIST BEGINS
  39. #
  40. XREF
  41. BEGIN
  42. PROC NDLEM2; # MAKES ENTRY IN ERROR-FILE-2 #
  43. FUNC XCDD C(10); # CONVERTS INTEGER TO DECIMAL DISPLAY CODE#
  44. FUNC XCHD C(10); # CONVERTS INTERGER TO HEX DISPLAY CODE #
  45. END
  46. #
  47. ****
  48. #
  49. ITEM CHARVAL C(10); # CHARACTER TEMPORARY FOR VALUE #
  50. ITEM FOUND B; # KEYWORD I.D. FOUND FLAG #
  51. ITEM I; # SCRATCH ITEM #
  52. DEF MAXRT # 66 #;
  53. ARRAY RANGE$TABLE [0:MAXRT] S(2);
  54. BEGIN
  55. ITEM RTWC U(0,51,9) = [MAXRT];
  56. ITEM RTKWID U(0,0,9) = [, 21, # P1 #
  57. 23, # P2 #
  58. 30, # NI #
  59. 31, # PORT #
  60. 35, # AL #
  61. 37, # DFL #
  62. 38, # FRAME #
  63. 39, # RTIME #
  64. 40, # RCOUNT #
  65. 41, # NSVC #
  66. 46, # LCN #
  67. 55, # CA #
  68. 56, # CO #
  69. 58, # MREC #
  70. 59, # W #
  71. 61, # NCIR #
  72. 62, # NEN #
  73. 68, # ABL #
  74. 69, # DBZ #
  75. 70, # UBZ #
  76. 71, # DBL #
  77. 72, # UBL #
  78. 73, # XBZ #
  79. 74, # DO #
  80. 75, # STREAM #
  81. 76, # HN #
  82. 80, # P80 #
  83. 81, # P81 #
  84. 82, # P82 #
  85. 83, # P83 #
  86. 84, # P84 #
  87. 85, # P85 #
  88. 86, # P86 #
  89. 87, # P87 #
  90. 88, # P88 #
  91. 89, # P89 #
  92. 90, # AB #
  93. 92, # BS #
  94. 93, # B1 #
  95. 94, # B2 #
  96. 95, # CI #
  97. 96, # CN #
  98. 97, # CT #
  99. 98, # DLC #
  100. 100, # DLX #
  101. 103, # LI #
  102. 107, # PL #
  103. 108, # PW #
  104. 111, # XLC #
  105. 112, # XLX #
  106. 115, # ELX #
  107. 123, # EBX #
  108. 125, # MC #
  109. 126, # XLY #
  110. 130, # MCI #
  111. 131, # MLI #
  112. 146, # MXCOPYS #
  113. 154, # SNODE #
  114. 155, # DNODE #
  115. 156, # ACCLEV #
  116. 157, # DHOST #
  117. 158, # DPLR #
  118. 159, # DPLS #
  119. 162, # WR #
  120. 163, # WS #
  121. 200, # SHOST #
  122. ];
  123. ITEM RTTYPE U(0,9,3) = [, 2, # P1 #
  124. 2, # P2 #
  125. 1, # NI #
  126. 2, # PORT #
  127. 1, # AL #
  128. 1, # DFL #
  129. 1, # FRAME #
  130. 1, # RTIME #
  131. 1, # RCOUNT #
  132. 1, # NSVC #
  133. 1, # LCN #
  134. 2, # CA #
  135. 1, # CO #
  136. 1, # MREC #
  137. 1, # W #
  138. 1, # NCIR #
  139. 1, # NEN #
  140. 1, # ABL #
  141. 1, # DBZ #
  142. 1, # UBZ #
  143. 1, # DBL #
  144. 1, # UBL #
  145. 1, # XBZ #
  146. 1, # DO #
  147. 1, # STREAM #
  148. 1, # HN #
  149. 2, # P80 #
  150. 2, # P81 #
  151. 2, # P82 #
  152. 2, # P83 #
  153. 2, # P84 #
  154. 2, # P85 #
  155. 2, # P86 #
  156. 2, # P87 #
  157. 2, # P88 #
  158. 2, # P89 #
  159. 2, # AB #
  160. 2, # BS #
  161. 2, # B1 #
  162. 2, # B2 #
  163. 2, # CI #
  164. 2, # CN #
  165. 2, # CT #
  166. 1, # DLC #
  167. 2, # DLX #
  168. 1, # LI #
  169. 1, # PL #
  170. 1, # PW #
  171. 1, # XLC #
  172. 2, # XLX #
  173. 2, # ELX #
  174. 2, # EBX #
  175. 2, # MC #
  176. 2, # XLY #
  177. 1, # MCI #
  178. 1, # MLI #
  179. 1, # MXCOPYS #
  180. 1, # SNODE #
  181. 1, # DNODE #
  182. 1, # ACCLEV #
  183. 2, # DHOST #
  184. 1, # DPLR #
  185. 1, # DPLS #
  186. 1, # WR #
  187. 1, # WS #
  188. 2, # SHOST #
  189. ];
  190. ITEM RTMIN (0,12,18) = [, 1, # P1 #
  191. 1, # P2 #
  192. 1, # NI #
  193. 1, # PORT #
  194. 0, # AL #
  195. 16, # DFL #
  196. 1, # FRAME #
  197. 0, # RTIME #
  198. 1, # RCOUNT #
  199. 0, # NSVC #
  200. 0, # LCN #
  201. X"70", # CA #
  202. 1, # CO #
  203. 1, # MREC #
  204. 1, # W #
  205. 1, # NCIR #
  206. 1, # NEN #
  207. 1, # ABL #
  208. 1, # DBZ #
  209. 1, # UBZ #
  210. 1, # DBL #
  211. 1, # UBL #
  212. 200, # XBZ #
  213. 1, # DO #
  214. 1, # STREAM #
  215. 1, # HN #
  216. 0, # P80 #
  217. 0, # P81 #
  218. 0, # P82 #
  219. 0, # P83 #
  220. 0, # P84 #
  221. 0, # P85 #
  222. 0, # P86 #
  223. 0, # P87 #
  224. 0, # P88 #
  225. 0, # P89 #
  226. 0, # AB #
  227. 0, # BS #
  228. 0, # B1 #
  229. 0, # B2 #
  230. 0, # CI #
  231. 0, # CN #
  232. 0, # CT #
  233. 1, # DLC #
  234. 0, # DLX #
  235. 0, # LI #
  236. 0, # PL #
  237. 0, # PW #
  238. 1, # XLC #
  239. 0, # XLX #
  240. 0, # ELX #
  241. 0, # EBX #
  242. 0, # MC #
  243. 0, # XLY #
  244. 0, # MCI #
  245. 0, # MLI #
  246. 1, # MXCOPYS #
  247. 0, # SNODE #
  248. 0, # DNODE #
  249. 0, # ACCLEV #
  250. 0, # DHOST #
  251. 16, # DPLR #
  252. 16, # DPLS #
  253. 1, # WR #
  254. 1, # WS #
  255. 0, # SHOST #
  256. ];
  257. ITEM RTMAX (1,0,60) = [, 254, # P1 #
  258. 254, # P2 #
  259. 254, # NI #
  260. 254, # PORT #
  261. 7, # AL #
  262. 1024, # DFL #
  263. 7, # FRAME #
  264. 25500, # RTIME #
  265. 15, # RCOUNT #
  266. 255, # NSVC #
  267. 255, # LCN #
  268. X"7F", # CA #
  269. 255, # CO #
  270. 7, # MREC #
  271. 7, # W #
  272. 255, # NCIR #
  273. 255, # NEN #
  274. 7, # ABL #
  275. 2043, # DBZ #
  276. 20, # UBZ #
  277. 7, # DBL #
  278. 31, # UBL #
  279. 2043, # XBZ #
  280. 7, # DO #
  281. 7, # STREAM #
  282. 255, # HN #
  283. 255, # P80 #
  284. 255, # P81 #
  285. 255, # P82 #
  286. 255, # P83 #
  287. 255, # P84 #
  288. 255, # P85 #
  289. 255, # P86 #
  290. 255, # P87 #
  291. 255, # P88 #
  292. 255, # P89 #
  293. 127, # AB #
  294. 127, # BS #
  295. 127, # B1 #
  296. 127, # B2 #
  297. 99, # CI #
  298. 127, # CN #
  299. 127, # CT #
  300. 4095, # DLC #
  301. 255, # DLX #
  302. 99, # LI #
  303. 255, # PL #
  304. 255, # PW #
  305. 4095, # XLC #
  306. 255, # XLX #
  307. 127, # ELX #
  308. X"FF", # EBX #
  309. 255, # MC #
  310. 255, # XLY #
  311. 250, # MCI #
  312. 250, # MLI #
  313. 15, # MXCOPYS #
  314. 255, # SNODE #
  315. 255, # DNODE #
  316. 15, # ACCLEV #
  317. X"FF", #DHOST #
  318. 1024, # DPLR #
  319. 1024, # DPLS #
  320. 7, # WR #
  321. 7, # WS #
  322. X"FFFFFF", # SHOST #
  323. ];
  324. END
  325. SWITCH VALTYPE , # UNKNOWN #
  326. DECIMAL , # DECIMAL #
  327. HEXIDECIMAL ; # HEXIDEC #
  328. CONTROL EJECT;
  329. # #
  330. # NDLCKRG CODE BEGINS HERE #
  331. # #
  332. VAL$STAT = TRUE; # SET RETURN STATUS TO O.K. #
  333. FOUND = FALSE; # CLEAR FOUND FLAG #
  334. FOR I=1 STEP 1 WHILE NOT FOUND AND I LQ MAXRT DO
  335. BEGIN # SEARCH RANGE TABLE FOR KEYWORD I.D. #
  336. IF KWID EQ RTKWID[I]
  337. THEN # IF KEYWORD I.D. MATCHES #
  338. BEGIN
  339. FOUND = TRUE; # SET FOUND FLAG #
  340. IF VALUE LS RTMIN[I] OR VALUE GR RTMAX[I]
  341. THEN # VALUE IS OUT OF RANGE #
  342. BEGIN
  343. GOTO VALTYPE[RTTYPE[I]]; # CONVERT VALUE TO DISPLAY CODE #
  344. DECIMAL:
  345. CHARVAL = XCDD(VALUE); # CONVERT TO DISPLAY CODE #
  346. GOTO NEXT;
  347. HEXIDECIMAL:
  348. CHARVAL = XCHD(VALUE); # CONVERT TO HEXIDECIMAL #
  349. GOTO NEXT;
  350. NEXT:
  351. IF RTKWID[I] EQ KID"AL" # IF AL IS THE KEYWORD #
  352. THEN
  353. BEGIN
  354. NDLEM2(ERR163,STLNUM[0],CHARVAL); # FLAG WARNING #
  355. END
  356. ELSE
  357. BEGIN
  358. NDLEM2(ERR100,STLNUM[0],CHARVAL);
  359. END
  360. VAL$STAT = FALSE; # RETURN ERROR STATUS #
  361. END
  362. END
  363. END
  364. RETURN; # **** RETURN **** #
  365. END # NDLCKRG #
  366. TERM
cdc/nos2.source/nam5871/ndlckrg.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator