Table of Contents

DMKCQY Source

References

Source Listing

DMKCQY.ASSEMBLE.txt
  1. CQY TITLE 'DMKCQY (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 VALIDATE SEQUENCING OF INPUT @V407490 00002000
  3. *. 00003000
  4. * MODULE NAME - 00004000
  5. * 00005000
  6. * DMKCQY 00006000
  7. * 00007000
  8. * FUNCTION - 00008000
  9. * 00009000
  10. * TO HANDLE QUERY FUNCTIONS: TIME, LOGMSG, NAME, USERS, 00010000
  11. * PF, SASSIST, CPASSIST, CPUID... 00011000
  12. * 00012000
  13. * ATTRIBUTES - 00013000
  14. * 00014000
  15. * RE-ENTERABLE, PAGEABLE, CALLED VIA SVC 8 00015000
  16. * 00016000
  17. * ENTRY POINTS - 00017000
  18. * 00018000
  19. * DMKCQYEY - MAIN ENTRY POINT FROM DMKCFC 00019000
  20. * 00020000
  21. * ENTRY CONDITIONS - 00021000
  22. * 00022000
  23. * R9 - ADDRESS OF COMMAND LINE BUFFER 00023000
  24. * R11- ADDRESS OF VMBLOK 00024000
  25. * R12- BASE ADDRESS OF MODULE 00025000
  26. * R13- ADDRESS OF SAVEAREA 00026000
  27. * 00027000
  28. * EXIT CONDITIONS - 00028000
  29. * 00029000
  30. * NORMAL - R2 = 0 00030000
  31. * ERROR - R2 = ERROR MESSAGE NUMBER 00031000
  32. * 00032000
  33. * CALLS TO OTHER ROUTINES - 00033000
  34. * 00034000
  35. * DMKSCNFD - TO GET FIELDS FROM COMMAND BUFFER 00035000
  36. * DMKCVTBD - TO CONVERT BINARY TO DECIMAL 00036000
  37. * DMKCVTBH - TO CONVERT BINARY TO HEX 00037000
  38. * DMKCVTDT - TO GET DATE AND TIME 00038000
  39. * DMKCVTDB - TO CONVERT DEC TO BINARY 00039000
  40. * DMKACOTM - TO ISSUE USER ACCOUNTING MESSAGE 00040000
  41. * DMKSCNAU - TO SCAN FOR ACTIVE USER 00041000
  42. * DMKSCNRD - TO GET REAL DEVICE NAME 00042000
  43. * DMKERMSG - TO ISSUE ERROR MESSAGES 00043000
  44. * 00044000
  45. * EXTERNAL REFERENCES 00045000
  46. * 00046000
  47. * DMKSYSDW - DAY OF THE WEEK 00047000
  48. * DMKSYSTI - TIME ZONE 00048000
  49. * DMKSYSLG - SYSTEM LOGMSG START 00049000
  50. * DMKSYSND - NUMBER OF USERS DIALED 00050000
  51. * DMKSYSNM - NUMBER OF USERS LOGGED ON 00051000
  52. * 00052000
  53. * TABLES/WORKAREAS 00053000
  54. * 00054000
  55. * SAVEAREA WORK AREAS USED FOR SCRATCH DATA 00055000
  56. * BRANCH TABLE FOR FUNCTION AT GNVECTOR 00056000
  57. * INDEX INTO TABLE BY R6 SET IN DMKCFC 00057000
  58. * 00058000
  59. * REGISTER USAGE 00059000
  60. * 00060000
  61. * R0 - LENGTH OF FIELD 00061000
  62. * R1 - ADDRESS OF FIELDS 00062000
  63. * R2 - PARM PASSING 00063000
  64. * R3 - STACK LINKAGE 00064000
  65. * R4 - R9 WORK REGISTERS FOR BUFFERS AND DSECTS 00065000
  66. * R10 - VMBLOK FOR SEARCHES 00066000
  67. * R11 - VMBLOK OF CALLER 00067000
  68. * R12 - BASE OF MODULE 00068000
  69. * R13 - SAVEAREA 00069000
  70. * R14 R15 - LINKAGE REGISTERS 00070000
  71. * 00071000
  72. * NOTES - 00072000
  73. * 00073000
  74. * NONE 00074000
  75. * 00075000
  76. * OPERATION - 00076000
  77. * 00077000
  78. * THE QUERY FUNCTIONS ARE ENTERED BY A BRANCH TABLE INDEX 00078000
  79. * THAT IS SET UP BY THE CALLING MODULE DMKCFC 00079000
  80. * THE FUNCTIONS ARE SEPARATE AND RETURN TO THE CALLER 00080000
  81. * EACH FUNCTION IS DESCRIBED AT THE SECTION 00081000
  82. * 00082000
  83. *. 00083000
  84. EJECT 00084000
  85. DMKCQY START 0 @V407490 00085000
  86. USING PSA,R0 @V407490 00086000
  87. USING VMBLOK,R11 @V407490 00087000
  88. USING SAVEAREA,R13 @V407490 00088000
  89. EXTRN DMKSCNFD,DMKCVTBD,DMKCVTBH @V407490 00089000
  90. EXTRN DMKCVTDT,DMKACOTM,DMKSCNAU @V407490 00090000
  91. EXTRN DMKSYSDW,DMKSYSTI,DMKSYSLG @V407490 00091000
  92. EXTRN DMKSYSND,DMKSYSNM,DMKSCNRD @V407490 00092000
  93. EXTRN DMKCVTDB @V407490 00093000
  94. EXTRN DMKERMSG @V407490 00094000
  95. EXTRN DMKSYSID HRC108DK 00094100
  96. SPACE 00095000
  97. ENTRY DMKCQYEY @V407490 00096000
  98. EJECT 00097000
  99. * THIS ROUTINE IS CALLED BY DMKCFCQU. SINCE THERE IS NO NEED 00098000
  100. * TO RETURN TO DMKCFCQU, THE SAVEAREA POINTED TO BY REG 13 00099000
  101. * WILL BE RELEASED. THUS, WHEN THIS ROUTINE RETURNS IT WIL 00100000
  102. * GO DIRECTLY BACK TO CFM TO SCAN FOR THE NEXT COMMAND. 00101000
  103. * UPON ENTRY GPR6 HAS BEEN SET UP BY CFCQU TO INDEX INTO THE 00102000
  104. * LIST OF BRANCHES ACCORDING TO ARGUMENT FOUND,THEREFORE THE 00103000
  105. * ORDER OF BRANCHES MUST BE THE SAME AS THE LIST IN CFCQU. 00104000
  106. SPACE 2 00105000
  107. MODID DC CL8'DMKCQY' @V407490 00106000
  108. USING *,R12 @V407490 00107000
  109. DMKCQYEY SVC 16 GIVE UP SAVEAREA @V407490 00108000
  110. SL R12,=A(DMKCQYEY-DMKCQY) SET BASE @V407490 00109000
  111. USING DMKCQY,R12 @V407490 00110000
  112. STM R0,R1,SAVER0 SAVE REG 0-1 IN NEW SAVE AREA. @V407490 00111000
  113. MVC SAVEWRK1(4),ZEROES ZERO FLAG AREA @V407490 00112000
  114. B GNVECTOR(R6) R6 CONTAINS INDEX INTO TABLE @V407490 00113000
  115. * INDEX SET BY CFCQU 00114000
  116. SPACE 00115000
  117. GNVECTOR EQU * @V407490 00116000
  118. B QRYTIME Q TIME @V407490 00117000
  119. B QRYLMSG Q LOGMSG @V407490 00118000
  120. B QRYNAME Q NAME @V407490 00119000
  121. B QRYUSER Q USERS @V407490 00120000
  122. B QRYPF Q PF @V407490 00121000
  123. B QRYSAS Q SASSIST @V407490 00122000
  124. B QRYCPA Q CPASSIST @V407490 00123000
  125. B QRYCPUID Q CPUID @V407490 00124000
  126. B QRYUSRID Q USERID HRC107DK 00124100
  127. SPACE 2 00125000
  128. QRYWRIT CALL DMKQCNWT,PARM=NORET SEND THE RESPONSE @V407490 00126000
  129. QRYEXIT EXIT RETURN TO CFM @V407490 00127000
  130. EJECT 00128000
  131. *. 00129000
  132. * QUERY LOGMSG 00130000
  133. * 00131000
  134. * COMMAND FORMAT 00132000
  135. * 00133000
  136. * +-----------+--------------+ 00134000
  137. * | QUERY | LOGMSG | 00135000
  138. * +-----------+--------------+ 00136000
  139. * 00137000
  140. * 1. GET EACH LINE OF THE LOGMSG AND CALL DMKQCNWT 00138000
  141. * 00139000
  142. * RESPONSE 00140000
  143. * 00141000
  144. * LOGMSG TEXT 00142000
  145. * * LOGMSG TEXT ... 00143000
  146. * .... 00144000
  147. * 00145000
  148. *. 00146000
  149. SPACE 2 00147000
  150. QRYLMSG L R4,=A(DMKSYSLG) LOAD ADDRESS OF LOGMSG START @V407490 00148000
  151. QRYLNXT L R4,0(,R4) LOAD NEXT LINE ADDRESS @V407490 00149000
  152. LTR R4,R4 ARE THERE ANY MORE LINES ? @V407490 00150000
  153. BZ QRYEXIT RETURN IF NO @V407490 00151000
  154. LH R0,4(,R4) LOAD MESSAGE LENGTH @V407490 00152000
  155. LA R1,8(,R4) LOAD MESSAGE ADDRESS @V407490 00153000
  156. CALL DMKQCNWT,PARM=NORET @V407490 00154000
  157. B QRYLNXT NO - CONTINUE @V407490 00155000
  158. EJECT 00156000
  159. *. 00157000
  160. * QUERY NAMES 00158000
  161. * 00159000
  162. * COMMAND FORMAT 00160000
  163. * 00161000
  164. * +----------+-------------+ 00162000
  165. * | QUERY | NAMES | 00163000
  166. * +----------+-------------+ 00164000
  167. * 00165000
  168. * 1. USE SUBROUTINE QRYUSRN TO FORMAT EACH USER FIELD 00166000
  169. * 2. PLACE FIELD IN BUFFER FOUR TO A LINE 00167000
  170. * 3. STACK BUFFER WHEN FULL 00168000
  171. * 4. REPEAT FOR ALL ACTIVE USERS 00169000
  172. * 00170000
  173. * RESPONSE 00171000
  174. * 00172000
  175. * USERID - ADR, . . . 00173000
  176. * ... , . . . 00174000
  177. * 00175000
  178. *. 00176000
  179. SPACE 2 00177000
  180. QRYNAME LA R0,8 LOAD BUFFER SIZE @V407490 00178000
  181. CALL DMKFREE GET A BUFFER FOR THE RESPONSE @V407490 00179000
  182. ST R1,SAVEWRK1 SAVE THE BUFFER ADDRESS @V407490 00180000
  183. L R10,VMPNT GET NEXT VMBLOK ADDRESS @V407490 00181000
  184. DROP R11 @V407490 00182000
  185. USING VMBLOK,R10 @V407490 00183000
  186. QRYNEWL LA R4,16 ADDRESS INCREMENT @V407490 00184000
  187. L R2,SAVEWRK1 BUFFER START @V407490 00185000
  188. LA R5,48(R2) SET BUFFER END ADDRESS @V407490 00186000
  189. LR R3,R2 POINT R3 TO START OF BUFFER @V407490 00187000
  190. QRYNEXT BAL R9,QRYUSRN FORMAT USERID AND HIS TERMINAL @V407490 00188000
  191. BXLE R3,R4,QRYCHKEN IF BUFFER NOT FULL GO CHECK FOR @V407490 00189000
  192. * LAST NAME 00190000
  193. B QRYMSGL IF FULL---GO SEND IT @V407490 00191000
  194. QRYCHKEN CR R10,R11 BACK AT START ????? @V407490 00192000
  195. BE QRYMSGL YES - GO SEND IT @V407490 00193000
  196. L R10,VMPNT LOAD NEXT VMBLOK ADDRESS @V407490 00194000
  197. B QRYNEXT GO BUILD NEXT NAME @V407490 00195000
  198. QRYMSGL LR R0,R3 LOAD CURRENT LINE END @V407490 00196000
  199. LA R1,2(,R2) LOAD FIRST CHARACTER ADDRESS @V407490 00197000
  200. SR R0,R1 COMPUTE THE LINE LENGTH @V407490 00198000
  201. BAL R3,STACK STACK LINE FOR OUTPUT @V407490 00199000
  202. CR R10,R11 IS THE QUERY COMPLETE ? @V407490 00200000
  203. BE NAMETERM BRANCH IF FINISHED @V407490 00201000
  204. L R10,VMPNT LOAD NEXT VMBLOK ADDRESS @V407490 00202000
  205. B QRYNEWL GO SET UP FOR NEXT LINE @V407490 00203000
  206. NAMETERM LA R0,8 LOAD BUFFER SIZE @V407490 00204000
  207. L R1,SAVEWRK1 LOAD BUFFER ADDRESS @V407490 00205000
  208. CALL DMKFRET RETURN THE BUFFER TO FREE STORAGE@V407490 00206000
  209. B QRYEXIT @V407490 00207000
  210. EJECT 00208000
  211. QRYUSRN MVC 0(2,R3),=C', ' SEPARATE NAMES WITH A COMMA @V407490 00209000
  212. MVC 2(8,R3),VMUSER MOVE USERID TO MESSAGE @V407490 00210000
  213. TM VMOSTAT,VMDISC IS THIS USER DISCONNECTED ? @V407490 00211000
  214. BO QRYDISC BRANCH IF YES @V407490 00212000
  215. ICM R8,B'1111',VMTERM ANYTHING IN VMTERM ? @VA08121 00213000
  216. BZ QRYDISC NO....STILL LOGGING ON @VA08121 00214000
  217. CLI RDEVTYPC-RDEVBLOK(R8),CLASSPEC 3705 NCP ? @V407490 00215000
  218. BE QRYUSRS YES - DIFFERENT @V407490 00216000
  219. CLI RDEVTYPC-RDEVBLOK(R8),CLASTERM IS CLASS TERMINAL@V407490 00217000
  220. BNE *+12 NO, BYPASS TEST FOR BISYNC LINE @V407490 00218000
  221. CLI RDEVTYPE-RDEVBLOK(R8),TYPBSC IS THIS A LINE @V407490 00219000
  222. BE QRYUSRS YES, GET RESOURCE ID. @V407490 00220000
  223. TM RDEVADD-RDEVBLOK(R8),RDEVLDEV Is this an LDEV? HRC065DK 00220100
  224. BO QRYLDEV Yes HRC065DK 00220200
  225. CALL DMKSCNRD GET REAL DEV ADDRESS @V407490 00221000
  226. CALL DMKCVTBH CONVERT IT TO PRINTABLE @V407490 00222000
  227. ST R1,12(,R3) STORE DEVICE ADDRESS IN MESSAGE @V407490 00223000
  228. MVC 10(3,R3),=C' - ' @V407490 00224000
  229. BR R9 RETURN @V407490 00225000
  230. SPACE 00226000
  231. QRYLDEV EQU * HRC065DK 00226100
  232. LH R1,RDEVADD-RDEVBLOK(,R8) Get the LDEV address HRC065DK 00226200
  233. N R1,F4095 Keep only the dev num HRC065DK 00226300
  234. CALL DMKCVTBH Make it displayable HRC065DK 00226400
  235. ST R1,12(,R3) Put dev addr in message HRC065DK 00226500
  236. MVC 10(3,R3),=C' -L' Move in LDEV indicator HRC065DK 00226600
  237. BR R9 Return HRC065DK 00226700
  238. * 00226800
  239. QRYDISC MVC 13(3,R3),=C'DSC' INDICATE USER IS DISCONNECTED @V407490 00227000
  240. MVC 10(3,R3),=C' - ' @V407490 00228000
  241. BR R9 RETURN @V407490 00229000
  242. SPACE 00230000
  243. QRYUSRS LH R1,VMTRMID 370X NCP RESOURCE IDENTIFIER @V407490 00231000
  244. CALL DMKCVTBH CONVERT FOR PRINTING @V407490 00232000
  245. MVC 10(3,R3),=C' - ' MOVE THIS IN FIRST @V407490 00233000
  246. ST R1,12(,R3) FORMAT IT AS "USERIDXX -10A3", ET@V407490 00234000
  247. BR R9 RETURN @V407490 00235000
  248. DROP R10 @V407490 00236000
  249. USING VMBLOK,R11 @V407490 00237000
  250. EJECT 00238000
  251. *. 00239000
  252. * ROUTINE TO STACK OUTPUT LINES ON VMBLOK 00240000
  253. * THE LINES WILL BE PRINTED BY DMKCFM ON RETURN 00241000
  254. *. 00242000
  255. STACK LR R4,R0 GET SIZE OF DATA @V407490 00243000
  256. LR R5,R1 SET DATA ADDRESS @V407490 00244000
  257. LA R0,7(R4) ROUND UP TO DOUBLE WORD @V407490 00245000
  258. SRL R0,3 GET SIZE IN DOUBLE WORDS @V407490 00246000
  259. A R0,F1 ONE MORE FOR CHAINING @V407490 00247000
  260. CALL DMKFREE GET BUFFER @V407490 00248000
  261. STH R4,4(R1) SAVE LINE SIZE @V407490 00249000
  262. STH R0,6(R1) SAVE BUFFER SIZE @V407490 00250000
  263. BCTR R4,R0 DECREMENT FOR EXECUTE @V407490 00251000
  264. EX R4,MVCSTK MOVE DATA TO STACK @V407490 00252000
  265. SR R0,R0 CLEAR @V407490 00253000
  266. ST R0,0(R1) CLEAR POINTER @V407490 00254000
  267. LA R2,VMSTKO GET OUTPUT STACK POINTER @V407490 00255000
  268. STKLOOP L R4,0(R2) GET POINTER TO STACK BUFFER @V407490 00256000
  269. LTR R4,R4 TEST FOR END OF CHAIN @V407490 00257000
  270. BZ CHAIN FOUND END, CHAIN THIS BUFFER @V407490 00258000
  271. LR R2,R4 POINT TO THIS BUFFER @V407490 00259000
  272. B STKLOOP LOOP TO FIND END @V407490 00260000
  273. CHAIN ST R1,0(R2) CHAIN AT END @V407490 00261000
  274. BR R3 RETURN @V407490 00262000
  275. * 00263000
  276. MVCSTK MVC 8(*-*,R1),0(R5) EXECUTED FOR STACK BUFFER MOVE @V407490 00264000
  277. EJECT 00265000
  278. *. 00266000
  279. * QUERY TIME 00267000
  280. * 00268000
  281. * COMMAND FORMAT 00269000
  282. * 00270000
  283. * +----------+------------+ 00271000
  284. * | QUERY | TIME | 00272000
  285. * +----------+------------+ 00273000
  286. * 00274000
  287. * 1. GET A BUFFER 00275000
  288. * 2. GET CURRENT DATE TIME ETC. 00276000
  289. * 3. WRITE TIME MESSAGE 00277000
  290. * 4. CALL DMKACOTM TO PRINT VIRT ACCOUNTING DATA 00278000
  291. * 00279000
  292. * RESPONSE 00280000
  293. * 00281000
  294. * TIME IS HH:MM:SS TMZ WEEKDAY MM/DD/YY 00282000
  295. * CONNECT HH:MM:SS VIRTIME MMM:SS.HH TOTTIME MMM:SS.HH 00283000
  296. * 00284000
  297. *. 00285000
  298. SPACE 2 00286000
  299. QRYTIME EQU * @V407490 00287000
  300. SPACE 00288000
  301. LA R0,5 SET UP TO GET 5 DOUBLE WORDS @V407490 00289000
  302. CALL DMKFREE GO GET THE STORAGE FOR THE MSG @V407490 00290000
  303. LR R9,R1 SAVE THE POINTER TO THE MSG @V407490 00291000
  304. MVC 0(8,R9),=C'TIME IS ' BUILD THE TIME MSG @V407490 00292000
  305. LA R2,8(,R9) POINT TO THE TIME FOR DMKCVTDT @V407490 00293000
  306. MVC 16(7,R9),BLANKS * BLANK OUT THE ZONE @V407490 00294000
  307. MVC 23(8,R9),BLANKS * AND THE WEEK DAY @V407490 00295000
  308. L R1,=A(DMKSYSTI) POINT TO THE TIME ZONE ID @V407490 00296000
  309. MVC 17(3,R9),0(R1) AND MOVE IT INTO THE MSG @V407490 00297000
  310. L R1,=A(DMKSYSDW) POINT TO THE WEEK DAY IN SYSLOCS@V407490 00298000
  311. MVC 21(10,R9),2(R1) AND MOVE IT INTO THE MSG ALSO @V407490 00299000
  312. SR R3,R3 ZERO @V407490 00300000
  313. IC R3,1(,R1) GET THE LENGTH OF THE WEEK DAY @V407490 00301000
  314. LA R1,23(R3,R9) LET DMKCVTDT FILL IN THE DATE @V407490 00302000
  315. CALL DMKCVTDT CONVERT DATE AND TIME @V407490 00303000
  316. SPACE 00304000
  317. LA R0,8(,R1) * SET UP THE LENGTH OF THE MSG@V407490 00305000
  318. SR R0,R9 * @V407490 00306000
  319. LR R1,R9 POINT TO THE MSG BUFFER @V407490 00307000
  320. LA R2,DFRET+NORET SET UP THE PARMS FOR DMKCQNWT @V407490 00308000
  321. LA R3,5 RETURN 5 DOUBLE WORDS OF FREE @V407490 00309000
  322. CALL DMKQCNWT GO PRINT THE TIME MSG @V407490 00310000
  323. SPACE 00311000
  324. CALL DMKACOTM CALL TO PRINT THE CONNECT TIME @V407490 00312000
  325. B QRYEXIT @V407490 00313000
  326. EJECT 00314000
  327. MOVETO EQU * @V407490 00315000
  328. *. 00316000
  329. * 00317000
  330. * QUERY USERS 00318000
  331. * 00319000
  332. * COMMAND FORMAT 00320000
  333. * 00321000
  334. * +---------+----------------+ 00322000
  335. * | QUERY | USERS (USERID)| 00323000
  336. * +---------+----------------+ 00324000
  337. * 00325000
  338. * 1. CALL DMKSCNFD FOR USERID PARM IF ANY 00326000
  339. * 2. FORMAT USER AND DIALED RESPONSE 00327000
  340. * 3. WRITE RESPONSE 00328000
  341. * 00329000
  342. * RESPONSE 00330000
  343. * 00331000
  344. * USERS NNN, DIALED NNN 00332000
  345. * 00333000
  346. *. 00334000
  347. SPACE 2 00335000
  348. QRYUSER MVC SAVEWRK2(8),BLANKS CLEAR MSG AREA @V407490 00336000
  349. MVC SAVEWRK4(12),SAVEWRK2 . . @V407490 00337000
  350. CALL DMKSCNFD SEE IF USERID SPECIFIED @V407490 00338000
  351. BZ SAVEUSR USERID FOUND @V407490 00339000
  352. MVC SAVEWRK2+15(6),=C'DIALED' @V407490 00340000
  353. L R1,=A(DMKSYSND) NO OF USERS DIALED TO SYSTEM @V407490 00341000
  354. L R1,0(,R1) LOAD NUMBER OF USERS @V407490 00342000
  355. CALL DMKCVTBD CONVERT COUNT TO PRINTABLE @V407490 00343000
  356. STCM R1,7,SAVEWRK2+11 STORE IN MESSAGE. @V407490 00344000
  357. L R1,=A(DMKSYSNM) NO OF USERS CURRENTLY LOGGED ON @V407490 00345000
  358. QRYCNVT MVC SAVEWRK2+4(6),=C'USERS,' @V407490 00346000
  359. L R1,0(,R1) LOAD NUMBER OF USERS @V407490 00347000
  360. CALL DMKCVTBD CONVERT COUNT TO PRINTABLE @V407490 00348000
  361. STCM R1,7,SAVEWRK2 STORE IN MESSAGE @V407490 00349000
  362. LA R0,21 LOAD MESSAGE LENGTH @V407490 00350000
  363. LA R1,SAVEWRK2 LOAD MESSAGE ADDRESS @V407490 00351000
  364. B QRYWRIT SEND THE RESPONSE AND EXIT @V407490 00352000
  365. SPACE 00353000
  366. SAVEUSR STM R0,R1,SAVER0 SAVE LENGTH AND ADDRESS @V407490 00354000
  367. CL R0,F8 USERID OVER 8 CHARACTERS ???? @V407490 00355000
  368. BH CQY020 SEND ERROR MESSAGE IF IT IS @V407490 00356000
  369. CALL DMKSCNAU FIND ACTIVE USER @V407490 00357000
  370. BNZ CQY045 NOT LOGGED ON @V407490 00358000
  371. LR R10,R1 SET R10 TO VMBLOK @V407490 00359000
  372. LA R3,SAVEWRK2 SET BUFFER ADDRESS @V407490 00360000
  373. BAL R9,QRYUSRN GET USERID AND TERMINAL @V407490 00361000
  374. LA R1,SAVEWRK2+2 WRITE DATA ADDRESS @V407490 00362000
  375. LA R0,14 DATA SIZE @V407490 00363000
  376. B QRYWRIT WRITE IT @V407490 00364000
  377. SPACE 2 00365000
  378. EJECT 00366000
  379. *. 00367000
  380. * 00368000
  381. * QUERY PFNN 00369000
  382. * 00370000
  383. * COMMAND FORMAT 00371000
  384. * 00372000
  385. * +-----------+-------------+ 00373000
  386. * | QUERY | PF<NN> | 00374000
  387. * +-----------+-------------+ 00375000
  388. * 00376000
  389. * 1. IF FUNCTION NUMBER ENTERED, CONVERT IT TO BINARY. 00377000
  390. * 2. GET BUFFER FOR RESPONSE 00378000
  391. * 3. GET AND FORMAT PF DATA 00379000
  392. * 3.1. IF PF DATA INDICATES TAB, CONVERT BINARY DATA TO EBCDIC 00380000
  393. * 4. OUTPUT RESPONSE WITH STACK 00381000
  394. * 5. REPEAT FOR ALL 24 PF IF ALL REQUEST HRC029DK 00382490
  395. * 6. FRET BUFFER AND RETURN 00383000
  396. * 00384000
  397. * RESPONSE 00385000
  398. * 00386000
  399. * PFNN IMMED PFDATA ........... 00387000
  400. * DELAY 00388000
  401. * 00389000
  402. * PFNN NOT DEFINED 00390000
  403. * 00391000
  404. *. 00392000
  405. SPACE 00393000
  406. QRYPF MVI SAVEWRK1,X'00' CLEAR FLAG @V407490 00394000
  407. CL R0,F2 IS IT JUST PF ?? @V407490 00395000
  408. BE PFALL YES, DO ALL @V407490 00396000
  409. LA R1,2(R1) POINT AT NUMBER @V407490 00397000
  410. S R0,F2 SIZE FOR CONVERT @V407490 00398000
  411. CALL DMKCVTDB CONVERT TO BINARY @V407490 00399000
  412. BNZ CQY026 ERROR @V407490 00400000
  413. LR R8,R1 SAVE CONVERTED NUMBER @V407490 00401000
  414. PFREE LA R0,36 SIZE FOR BUFFER HRC029DK 00402490
  415. CALL DMKFREE GET BUFFER @V407490 00403000
  416. LR R7,R1 BUFFER ADDRESSING @V407490 00404000
  417. PFNXT MVI 0(R7),C' ' CLEAR BUFFER TO BLANKS @V407490 00405000
  418. MVC 1(143,R7),0(R7) ... @V407490 00406000
  419. LR R1,R8 GET FUNC NUMBER @V407490 00407000
  420. CALL DMKCVTBD CONVERT TO DEC @V407490 00408000
  421. STH R1,2(R7) SET FUNC NUMBER @V407490 00409000
  422. MVC 0(2,R7),=C'PF' DATA @V407490 00410000
  423. L R6,VMPFUNC GET USER FUNC TABLE @V407490 00411000
  424. LTR R6,R6 IS THERE ONE ?? @V407490 00412000
  425. BZ NOPF NO @V407490 00413000
  426. LR R2,R8 FUNC NUMBER TO GET @V407490 00414000
  427. BCTR R2,R0 LESS 1 FOR INDEX @V407490 00415000
  428. SLL R2,3 TIMES 8 FOR INDEX @V407490 00416000
  429. AR R6,R2 POINT TO TABLE ENTRY @V407490 00417000
  430. L R2,4(R6) GET FUNC DATA @V407490 00418000
  431. LTR R2,R2 IS THERE ONE ?? @V407490 00419000
  432. BZ NOPF NO @V407490 00420000
  433. LH R3,2(R6) GET FUNC DATA SIZE @V407490 00421000
  434. CH R3,=H'130' MAX WE CAN HANDLE @V407490 00422000
  435. BL *+8 OK @V407490 00423000
  436. LA R3,130 SET TO MAX @V407490 00424000
  437. LA R4,11(R7) DATA START @V407490 00425000
  438. LR R5,R3 DATA COUNT @V60A6B6 00426000
  439. CL R5,F4 COUNT LARGE ENOUGH FOR TAB? @V60A6B6 00427000
  440. BL PFMOVE NO, SKIP CHECK FOR IT @V60A6B6 00428000
  441. CLC 0(4,R2),=C'TAB ' IS IT TAB FUNCTION ? @V60A6B6 00429000
  442. BE PFTAB YES, MUST CONVERT DATA. @V60A6B6 00430000
  443. PFMOVE BCTR R3,R0 LESS 1 FOR EXECUTE @V60A6B6 00431000
  444. EX R3,MVCPFD MOVE DATA TO BUFFER @V60A6B6 00432000
  445. PFSC CLI 0(R4),X'15' IS IT A LCR ?? @V407490 00433000
  446. BNE PFSC1 NO, CONT @V407490 00434000
  447. IC R0,VMTLEND LOGICAL LINE END SYMBOL @V407490 00435000
  448. STC R0,0(R4) SET CHAR @V407490 00436000
  449. PFSC1 LA R4,1(R4) NEXT CHAR @V407490 00437000
  450. BCT R5,PFSC SCAN FOR ALL @V407490 00438000
  451. PFIMMED MVC 5(5,R7),=CL5'IMMED' ASSUME IMMED EXECUTION @V60A6B6 00439000
  452. TM 0(R6),X'80' IS IT IMMED ?? @V407490 00440000
  453. BO PFWRT YES @V407490 00441000
  454. MVC 5(5,R7),=CL5'DELAY' SET DELAY EXECUTION @V407490 00442000
  455. PFWRT LA R0,144 SET MAX COUNT @V407490 00443000
  456. PFWRTN LR R1,R7 DATA START @V407490 00444000
  457. BAL R3,STACK STACK RESPONSE @V407490 00445000
  458. PFTST TM SAVEWRK1,X'80' DO ALL ?? @V407490 00446000
  459. BZ PFEXIT NO, DONE @V407490 00447000
  460. CH R8,=H'24' ALL DONE NOW ?? HRC029DK 00448490
  461. BE PFEXIT YES @V407490 00449000
  462. LA R8,1(R8) NEXT FUNC @V407490 00450000
  463. B PFNXT DO IT @V407490 00451000
  464. SPACE 00452000
  465. NOPF MVC 5(11,R7),=CL11'UNDEFINED ' NO FUNC @V407490 00453000
  466. LA R0,20 SIZE @V407490 00454000
  467. B PFWRTN STACK IT @V407490 00455000
  468. SPACE 00456000
  469. PFEXIT LR R1,R7 BUFFER ADDRESS @V407490 00457000
  470. LA R0,36 SIZE HRC029DK 00458490
  471. CALL DMKFRET FRET @V407490 00459000
  472. B QRYEXIT @V407490 00460000
  473. SPACE 00461000
  474. PFALL MVI SAVEWRK1,X'80' FLAG TO DO ALL @V407490 00462000
  475. LA R8,1 START WITH FUNC 1 @V407490 00463000
  476. B PFREE GET BUFFER @V407490 00464000
  477. EJECT 00465000
  478. PFTAB MVC 0(4,R4),0(R2) MOVE TAB HEADER INTO OUTPUT @V60A6B6 00466000
  479. MVI 4(R4),XF1 INITIALIZE FIRST TAB POSITION @V60A6B6 00467000
  480. S R5,F4 DECREMENT COUNT BY HEADER SIZE @V60A6B6 00468000
  481. BNP PFIMMED IF NO TAB DATA, THEN ALL DONE @V60A6B6 00469000
  482. LA R2,4(,R2) POINT TO START OF TAB DATA @V60A6B6 00470000
  483. LA R4,6(,R4) POINT TO NEXT CHAR. POSITION @V60A6B6 00471000
  484. PFTABCVT SLR R1,R1 CLEAR TAB DATA REGISTER @V60A6B6 00472000
  485. IC R1,0(,R2) GET THE NEXT BYTE OF TAB DATA @V60A6B6 00473000
  486. LA R1,1(,R1) CHANGE ORIGIN FROM ZERO TO ONE @V60A6B6 00474000
  487. CALL DMKCVTBD GO CONVERT IT TO DECIMAL 00475000
  488. CLI 0(R2),D9 TAB GREATER THAN ONE DIGIT ? @V60A6B6 00476000
  489. BL PFTABONE NO, GO MOVE IN ONLY ONE CHAR. @V60A6B6 00477000
  490. CLI 0(R2),D99 TAB LARGER THAN TWO DIGITS ? @V60A6B6 00478000
  491. BL PFTABTWO NO, GO MOVE IN THE TWO CHARS. @V60A6B6 00479000
  492. STCM R1,B'0111',0(R4) MOVE IN THREE CHARACTERS @V60A6B6 00480000
  493. LA R4,4(,R4) ADDRESS NEXT CHAR. POSITION @V60A6B6 00481000
  494. B PFTABCT AND GO CHECK FOR MORE @V60A6B6 00482000
  495. SPACE 00483000
  496. PFTABTWO STCM R1,B'0011',0(R4) PUT IN THE TWO CHARACTERS @V60A6B6 00484000
  497. LA R4,3(,R4) ADDRESS NEW CHAR. POSITION @V60A6B6 00485000
  498. B PFTABCT AND CHECK FOR MORE @V60A6B6 00486000
  499. SPACE 00487000
  500. PFTABONE STC R1,0(,R4) PUT EBCDIC CHAR. IN OUTPUT LINE @V60A6B6 00488000
  501. LA R4,2(,R4) POINT TO NEXT PLACE IN LINE @V60A6B6 00489000
  502. PFTABCT LA R2,1(,R2) INCREMENT CURRENT TAB DATA ADDR @V60A6B6 00490000
  503. BCT R5,PFTABCVT DO UNTIL ALL TABS ARE CONVERTED @V60A6B6 00491000
  504. B PFIMMED CHECK IMMED/DELAY; STACK OUTPUT @V60A6B6 00492000
  505. SPACE 2 00493000
  506. D9 EQU 9 @V60A6B6 00494000
  507. D99 EQU 99 @V60A6B6 00495000
  508. XF1 EQU X'F1' @V60A6B6 00496000
  509. SPACE 00497000
  510. MVCPFD MVC 11(*-*,R7),0(R2) EXECUTED FOR DATA @V407490 00498000
  511. EJECT 00499000
  512. *. 00500000
  513. * QUERY SASSIST 00501000
  514. * 00502000
  515. * COMMAND FORMAT 00503000
  516. * +--------+-------------+ 00504000
  517. * | QUERY | SASSIST | 00505000
  518. * +--------+-------------+ 00506000
  519. * 00507000
  520. * 1. FORMAT RESPONSE. 00508000
  521. * 2. WRITE RESPONSE. 00509000
  522. * 00510000
  523. * 00511000
  524. * RESPONSE 00512000
  525. * 00513000
  526. * SASSIST ON|OFF (PROC XX, ON|OFF PROC YY) 00514000
  527. * 00515000
  528. * 00516000
  529. *. 00517000
  530. QRYSAS MVC SAVEWRK2(11),=C'SASSIST ON ' @V407490 00518000
  531. TM CPSTAT2,CPMICON IS VM ASSIST ON? @V407490 00519000
  532. BO ASSTON YES, BRANCH @V407490 00520000
  533. MVC SAVEWRK2+8(3),=C'OFF' NO, PUT 'OFF' IN MSG @V407490 00521000
  534. ASSTON EQU * @V4075A0 00522000
  535. TM APSTAT1,APUOPER DO WE HAVE ANOTHER PROCESSOR? @V4075A0 00523000
  536. BO SASAP YES, MORE MESSAGE CONTENT @V4075A0 00524000
  537. LA R0,11 MESSAGE LENGTH @V4075A0 00525000
  538. SASMSG LA R1,SAVEWRK2 MESSAGE LOC @V4075A0 00526000
  539. B QRYWRIT SEND THE RESPONSE AND EXIT @V407490 00527000
  540. SPACE 2 @V4075A0 00528000
  541. SASAP EQU * @V4075A0 00529000
  542. MVC SAVEWRK4+3(19),=C' PROC , ON PROC ' @V4075A0 00530000
  543. LH R1,IPUADDR PUT IN OUR PROC ADDR @V4075A0 00531000
  544. CALL DMKCVTBD @V4075A0 00532000
  545. STCM R1,B'0011',SAVEWRK6+1 @V4075A0 00533000
  546. LH R1,IPUADDRX PUT IN OTHER PROC ADDR @V4075A0 00534000
  547. CALL DMKCVTBD @V4075A0 00535000
  548. STCM R1,B'0011',SAVEWRK9+2 @V4075A0 00536000
  549. L R1,PREFIXB NOW LET'S INSPECT OTHER PROC @V4075A0 00537000
  550. TM CPSTAT2-PSA(R1),CPMICON DOES IT HAVE VM ASSIST @V4075A0 00538000
  551. BO SASLN @V4075A0 00539000
  552. MVC SAVEWRK7+1(3),=C'OFF' TELL THEM NO @V4075A0 00540000
  553. SASLN LA R0,32 OUTPUT EXPANDED MESSAGE @V4075A0 00541000
  554. B SASMSG @V4075A0 00542000
  555. EJECT 00543000
  556. *. 00544000
  557. * QUERY CPASSIST 00545000
  558. * 00546000
  559. * COMMAND FORMAT 00547000
  560. * +--------+-------------+ 00548000
  561. * | QUERY | CPASSIST | 00549000
  562. * +--------+-------------+ 00550000
  563. * 00551000
  564. * 1. FORMAT RESPONSE. 00552000
  565. * 2. WRITE RESPONSE. 00553000
  566. * 00554000
  567. * 00555000
  568. * RESPONSE 00556000
  569. * 00557000
  570. * CPASSIST ON|OFF (PROC XX ON|OFF PROC YY) 00558100
  571. * 00559000
  572. * 00560000
  573. *. 00561000
  574. QRYCPA MVC SAVEWRK2(12),=C'CPASSIST ON ' SET UP RESPONSE @V407490 00562000
  575. TM CPSTAT2,CPASTON IS IT REALLY "ON" ? @V407490 00563000
  576. BO CPAMSGOK DON'T DO IT. @V407490 00564000
  577. MVC SAVEWRK2+9(3),=C'OFF' REFORMAT RESPONSE @V407490 00565000
  578. CPAMSGOK EQU * @V5DAACD 00566100
  579. TM APSTAT1,APUOPER DO WE HAVE ANOTHER PROCESSOR? @V5DAACD 00566200
  580. BO CPAAP YES --- @V5DAACD 00566300
  581. LA R0,12 NO MSG LNG OF 12 @V5DAACD 00566400
  582. CPAMSG EQU * @V5DAACD 00566500
  583. LA R1,SAVEWRK2 AND ITS ADDRESS @V407490 00567000
  584. B QRYWRIT WRITE THE RESPONSE AND EXIT @V407490 00568000
  585. CPAAP EQU * CHECK BOTH PROCESSORS @V5DAACD 00568020
  586. MVC SAVEWRK5(19),=C' PROC ON PROC ' @V5DAACD 00568040
  587. LH R1,IPUADDR GET OUR PROC ADDRESS @V5DAACD 00568060
  588. CALL DMKCVTBD @V5DAACD 00568080
  589. STCM R1,B'0011',SAVEWRK6+2 @V5DAACD 00568100
  590. LH R1,IPUADDRX GET THE OTHER PROC ADDR. @V5DAACD 00568120
  591. CALL DMKCVTBD @V5DAACD 00568140
  592. STCM R1,B'0011',SAVEWRK9+2 @V5DAACD 00568160
  593. L R1,PREFIXB CHECK FOR ON/OFF OF OTHER PROC. @V5DAACD 00568180
  594. TM CPSTAT2-PSA(R1),CPASTON @V5DAACD 00568200
  595. BO CPALN YES ITS ON @V5DAACD 00568220
  596. MVC SAVEWRK7+1(3),=C'OFF' @V5DAACD 00568240
  597. CPALN EQU * @V5DAACD 00568260
  598. LA R0,32 SET MSG LNG TO 32 @V5DAACD 00568280
  599. B CPAMSG AND GO ISSUE MSG. @V5DAACD 00568300
  600. EJECT 00569000
  601. *. 00570000
  602. * QUERY CPUID 00571000
  603. * 00572000
  604. * COMMAND FORMAT 00573000
  605. * 00574000
  606. * +------------------------+ 00575000
  607. * | QUERY | CPUID | 00576000
  608. * +-----------+------------+ 00577000
  609. * 00578000
  610. * 1. FORMAT RESPONSE 00579000
  611. * 2. WRITE RESPONSE 00580000
  612. * 00581000
  613. * RESPONSE: 00582000
  614. * 00583000
  615. * CPUID = AABBBBBBCCCCDDDD 00584000
  616. * 00585000
  617. *. 00586000
  618. SPACE 00587000
  619. QRYCPUID EQU * @V407490 00588000
  620. MVC SAVEWRK2(L'CPUMSG),CPUMSG 'CPUID = FF' @V407490 00589000
  621. SLR R1,R1 CLEAR R1 @V407490 00590000
  622. ICM R1,B'0111',VMCPUID CPUID SERIAL FROM VMBLOK @V407490 00591000
  623. CALL DMKCVTBH CONVERT TO PRINTABLE HEXADECIMAL @V407490 00592000
  624. STCM R0,B'0011',SAVEWRK4+2 STORE 1ST PART OF SERIAL @V407490 00593000
  625. STCM R1,B'1111',SAVEWRK5 SEC. HALF CPU SERIAL @V407490 00594000
  626. SLR R1,R1 CLEAR R1 AGAIN @V407490 00595000
  627. ICM R1,B'0011',CPUID+4 MODEL NUMBER FROM PSA @V407490 00596000
  628. CALL DMKCVTBH CONVERT TO PRINTABLE HEXADECIMAL @V407490 00597000
  629. ST R1,SAVEWRK6 STORE MODEL IN RESPONSE @V407490 00598000
  630. MVC SAVEWRK7,=C'0000' MACHINE CHECK EXT. LOGOUT @V407490 00599000
  631. LA R1,SAVEWRK2 POINT TO MSG BUFFER @V407490 00600000
  632. LA R0,LCPUMSG LENGTH OF MESSAGE @V407490 00601000
  633. B QRYWRIT ISSUE RESPONSE AND EXIT @V407490 00602000
  634. EJECT 00603000
  635. CPUMSG DC C'CPUID = FF' @V407490 00604000
  636. LCPUMSG EQU 24 MESSAGE LENGTH @V407490 00605000
  637. SPACE 1 00606000
  638. CQY020 LA R2,20 ERROR CODE @V407490 00607000
  639. B NOPARM ERROR MESSAGE @V407490 00608000
  640. SPACE 00609000
  641. CQY026 LA R2,26 ERROR CODE @V407490 00610000
  642. B NOPARM ERROR MESSAGE @V407490 00611000
  643. SPACE 00612000
  644. CQY045 LA R2,45 ERROR CODE @V407490 00613000
  645. LM R0,R1,SAVER0 GET PARMS @V407490 00614000
  646. B CALLERM ERROR MESSAGE @V407490 00615000
  647. SPACE 00616000
  648. NOPARM SR R1,R1 NO ERROR PARMS @V407490 00617000
  649. CALLERM ICM R0,14,MODID+3 GET MODULE ID @V407490 00618000
  650. CALL DMKERMSG WRITE ERROR MESSAGE @V407490 00619000
  651. SPACE 00620000
  652. * DMKERMSG WILL EXIT AND NOT RETURN HERE .... 00621000
  653. * 00622000
  654. *. HRC107DK 00622010
  655. * QUERY USERID HRC107DK 00622020
  656. * HRC107DK 00622030
  657. * Command format HRC107DK 00622040
  658. * HRC107DK 00622050
  659. * +------------------------+ HRC107DK 00622060
  660. * X QUERY X USERID X HRC107DK 00622070
  661. * +-----------+------------+ HRC107DK 00622080
  662. * HRC107DK 00622090
  663. * 1. Format response HRC107DK 00622100
  664. * 2. Write response HRC107DK 00622110
  665. * HRC107DK 00622120
  666. * Response: HRC107DK 00622130
  667. * HRC107DK 00622140
  668. * USERID [AT SYSID] HRC108DK 00622155
  669. * HRC107DK 00622160
  670. *. HRC107DK 00622170
  671. SPACE 00622180
  672. QRYUSRID EQU * HRC107DK 00622190
  673. MVC SAVEWRK2(8),VMUSER Copy userid from VMBLOK HRC108DK 00622201
  674. LA R1,SAVEWRK2 Get address of response HRC108DK 00622211
  675. LA R0,8 Get length of just userid HRC108DK 00622221
  676. L R7,=A(DMKSYSID) Get address of SYSID HRC108DK 00622231
  677. CLC 0(8,R7),=CL8' ' Check for blank SYSID HRC108DK 00622241
  678. BE QRYWRIT Return just userid & exit HRC108DK 00622251
  679. LA R3,1(R1) Start at userid + 1 HRC108DK 00622261
  680. LA R4,1 Specify increment as 1 HRC108DK 00622271
  681. LA R5,7(R1) Finish at userid + 7 HRC108DK 00622281
  682. USRLOOP EQU * HRC108DK 00622291
  683. CLI 0(R3),C' ' Check for short userid HRC108DK 00622301
  684. BE USRIDEND Found short userid? HRC108DK 00622311
  685. BXLE R3,R4,USRLOOP Got to end of userid? HRC108DK 00622321
  686. USRIDEND EQU * HRC108DK 00622331
  687. MVC 0(4,R3),=C' AT ' Copy constant separator in HRC108DK 00622341
  688. MVC 4(8,R3),0(R7) Copy SYSID into response HRC108DK 00622351
  689. SR R3,R1 Get length of userid HRC108DK 00622361
  690. LA R0,12(R3) Add SYSID & const length HRC108DK 00622371
  691. B QRYWRIT Send the response and exit HRC108DK 00622381
  692. SPACE 1 HRC108DK 00622391
  693. LTORG @V407490 00623000
  694. SPACE 00624000
  695. EJECT 00625000
  696. PSA , @V407490 00626000
  697. COPY DEVTYPES @V407490 00627000
  698. COPY EQU @V407490 00628000
  699. COPY RBLOKS @V407490 00629000
  700. COPY SAVE @V407490 00630000
  701. COPY VMBLOK @V407490 00631000
  702. END DMKCQY 00632000