User Tools

Site Tools


cdc:nos2.source:nam5871:hpawl

Table of Contents

HPAWL

Table Of Contents

  • [00007] PROC HPAWL
  • [00054] PROC HRELWWL
  • [00055] PROC OSCCALL
  • [00056] PROC OSCHAPP
  • [00057] PROC OTIME
  • [00058] PROC XTRACE

Source Code

HPAWL.txt
  1. *DECK HPAWL
  2. USETEXT NIPDEF
  3. USETEXT ACB
  4. USETEXT APPSTAT
  5. USETEXT AT
  6. USETEXT STATTAB
  7. PROC HPAWL;
  8.  
  9. STARTIMS;
  10. #
  11. *1DC HPAWL
  12. *
  13. * 1. PROC NAME AUTHOR DATE
  14. * HPAWL E. GEE 78/01/25
  15. *
  16. * 2. FUNCTIONAL DESCRIPTION.
  17. * WRITE AWL BACK TO APPLICATION
  18. *
  19. * 3. METHOD USED.
  20. * CREATE FUNCTION LIST TO WRITE AWL (IF ONE) AND CLEAR SHORT
  21. * TERM CONNECTION
  22. * ISSUE SYSTEM CONTROL POINT FUNCTION
  23. * PROCESS SCP FUNCTION RETURN CODE
  24. *
  25. * 4. ENTRY PARAMETERS.
  26. * ACBADDR ACB ADDRESS
  27. *
  28. * 5. EXIT PARAMETERS.
  29. * ABTAPPF ABORT FLG SET IF NIP GOT SCP RC = RCUCPAOOR
  30. * FAILADR FAIL FLG SET IF NIP GOT SCP RC = RCUCPGONE
  31. *
  32. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  33. * ACB APPSTAT AT
  34. * NIPDEF
  35. * STATTAB STATISTICS TABLE
  36. *
  37. * 7. ROUTINES AND OVERLAYS CALLED.
  38. * HRELWWL RELEASE THE WHOLE WORKLIST
  39. * OSCCALL ISSUE SYSTEM CONTROL POINT FUNCTION
  40. * OSCHAPP SCHEDULE APPLICATION
  41. * OTIME GET SYSTEM RTIME
  42. * XTRACE RECORD PROCEDURE CALLS
  43. *
  44. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION.
  45. * THIS PROCEDURE IS CALLED BY HWLP.
  46. *
  47.  #
  48. STOPIMS;
  49. #
  50.   EXTERNAL VARIABLES
  51. #
  52. XREF
  53. BEGIN
  54. PROC HRELWWL; # RELEASE THE WHOLE NWL #
  55. PROC OSCCALL; # ISSUE SCP CALL #
  56. PROC OSCHAPP;
  57. PROC OTIME; # GET SYSTEM RTIME #
  58. PROC XTRACE; # TRACE CALLS #
  59. END
  60. #
  61.   INTERNAL VARIABLES
  62. #
  63.  
  64. CONTROL IFEQ STAT,1;
  65. ARRAY STIME P(1); # RTIME BUFFER FOR STARTING TIME#
  66. BEGIN
  67. ITEM SMILS U(0,24,36); # STARTING TIME IN MILLESECONDS #
  68. END
  69. ARRAY ETIME P(1); # RTIME BUFFER FOR ENDING TIME #
  70. BEGIN
  71. ITEM EMILS U(0,24,36); # ENDING TIME IN MILLESECONDS #
  72. END
  73.  
  74. ITEM STTEMP; # TEMPORARY STATISTICS VARIABLE #
  75. CONTROL FI;
  76.  
  77.  
  78. ARRAY FL$BUF [0:2]; # ARRAY OF SCP FUNCTION REQUESTS#
  79. BEGIN
  80. ITEM FL$RC U(00,00,06) = [3(0)]; # RETURN CODE FROM SCP CALL #
  81. ITEM FL$FP U(00,06,12) = [2,6,0]; # FUNCTION PARAMETER #
  82. ITEM FL$UCPA U(00,18,18) = [3(0)]; # UCP ADDRESS #
  83. ITEM FL$SCPA U(00,36,18) = [3(0)]; # SCP ADDRESS #
  84. ITEM FL$FC U(00,54,06) = [SFLIST,SFWRITE,SFENDT]; # SCP FUNC CD#
  85. ITEM FL$CB U(00,59,01); # SCP FUNCTION COMPLETION BIT #
  86. ITEM FL$WD0 U(00,00,60); # WORD 0 OF SCP FUNCTION BUFFER #
  87. END
  88.  
  89. ARRAY FLE$BUF S(4); # ARRAY FOR ISSUING SCP REQUEST #
  90. BEGIN
  91. ITEM FLE$HRC U(00,00,06); # SCP RETURN CODE #
  92. ITEM FLE$HUCPA U(00,18,18); # UCP ADDRESS #
  93. ITEM FLE$HSCPA U(00,36,18); # SCP ADDRESS #
  94. ITEM FLE$HWD U(00,00,60); # SCP FUNCTION CODE WORD #
  95. ITEM FLE$JSNWD U(01,00,60); # UCP JSN / EJT ORDINAL WORD #
  96. ITEM FLE$1UCPA U(02,18,18); # UCP ADR FOR SF.WRITE SCP FUNC #
  97. ITEM FLE$1SCPA U(02,36,18); # SCP ADR FOR SF.WRITE SCP FUNC #
  98. ITEM FLE$1WD U(02,00,60); # SCP FUNCTION CODE WORD #
  99. ITEM FLE$2UCPA U(03,18,18); # UCP ADR FOR SF.ENDT SCP FUNC #
  100. ITEM FLE$2SCPA U(03,36,18); # SCP ADR FOR SF.ENDT SCP FUNC #
  101. ITEM FLE$2WD U(03,00,60); # SCP FUNCTION CODE WORD #
  102. END
  103.  
  104. ITEM AN; # APPLICATION NUMBER #
  105.  
  106. #**********************************************************************#
  107. BEGIN
  108.  
  109. CONTROL IFEQ DEBUG,1;
  110. XTRACE("HPAWL") ;
  111. CONTROL FI;
  112.  
  113. CONTROL IFEQ STAT,1;
  114. OTIME(STIME); # GET SYSTEM TIME AT BEGINNING OF PROC #
  115. CONTROL FI;
  116.  
  117.  
  118. P<ACB> = ACBADDR; # ACB ADDRESS #
  119. #
  120.   CREATE FUNCTION LIST TO WRITE AWL (IF SOMETHING TO WRITE BACK)
  121.   AND END SHORT TERM CONNECTION BETWEEN APP AND NIP
  122. #
  123. AN = ACBAN[0]; # APPLICATION NUMBER #
  124. FLE$JSNWD[0] = ACBJNWD[0]; # ACB JOB WORD #
  125. IF (ACBAWL0[0] NQ 0) OR # NO GET/GETL OR NETON OR NETXFR RESP #
  126. (ACBAWL2[0] NQ 0) OR # NO GETMM RESPONSE #
  127. (ACBAWL4[0] NQ 0) # NO GETSM RESPONSE #
  128. THEN # WRITE AWL RESPONSE TO APP #
  129. BEGIN
  130. #
  131.   UPDATE DATA AVAILABLE FLAGS IN AWL RESPONSE
  132. #
  133. FLE$HWD[0] = FL$WD0[0]; # SF.LIST FUNCTION CODE WORD #
  134. FLE$HSCPA[0] = LOC(FLE$1WD); # ADDR OF SF.LIST ENTRIES #
  135. FLE$1WD[0] = FL$WD0[1]; # SF.WRITE FUNCTION CODE WORD #
  136. FLE$1UCPA[0] = ACBAWLADDR[0]; # UCP ADDR TO WRITE AWL #
  137. FLE$1SCPA[0] = LOC(ACBAWL0[0]);
  138. FLE$2WD[0] = FL$WD0[2]; # SF.ENDT FUNCTION CODE WORD #
  139. FLE$2UCPA[0] = ACBUCPADR[0]; # UCP COMPLETION BIT ADDR #
  140. END
  141. ELSE # ONLY NEED TO CLEAR SHORT TERM #
  142. BEGIN
  143. FLE$HWD[0] = FL$WD0[2]; # SF.ENDT SCP FUNCTION WORD #
  144. FLE$HUCPA[0]= ACBUCPADR[0]; # UCP COMPLETION BIT ADDR #
  145. END
  146. #
  147.   ISSUE SCP REQUEST
  148. #
  149. OSCCALL(FLE$BUF);
  150. #
  151.   PROCESS SCP FUNCTION RETURN CODE
  152. #
  153. IF FLE$HRC[0] NQ RCSWAPPEDOUT
  154. THEN # ALRIGHT TO RELEASE AWL BUFFER #
  155. BEGIN
  156. IF FLE$HRC[0] EQ 0
  157. THEN # SCP FUNCTION COMPLETED OK #
  158. BEGIN
  159. ACBAWLADDR[0] = 0;
  160. ACBAWL0[0] = 0; # CLEAR AWL WORD IN ACB #
  161. ACBAWL2[0] = 0; # CLEAR AWL WORD IN ACB BLOCK #
  162. ACBAWL4[0] = 0 ;
  163. HRELWWL; # RELEASE THE WHOLE NWL #
  164. END
  165. ELSE # SCP FUNCTION NOT COMPLETED OK #
  166. BEGIN
  167. IF FLE$HRC[0] EQ RCUCPGONE
  168. OR FLE$HRC[0] EQ RCSTCBAD
  169. THEN # UCP IS NO LONGER IN SYSTEM SO #
  170. FAILADR = ACBADDR; # SET APPLICATION-FAILED FLAG #
  171. ELSE # UCP GAVE BAD AWL ADDR SO ABORT IT #
  172. ABTAPPF = XFLERR; # SET ABORT-APPLICATION FLAG #
  173. END
  174. END
  175. ELSE # APP IS SWAPPED OUT #
  176. BEGIN # AFTER SWAPIN,HPAWL WILL BE CALLED AGAIN #
  177. ATASBS[AN] = TRUE; # SET APP-SWAPPED-OUT FLAG IN ACB #
  178. OSCHAPP(ACBADDR); # SCHEDULE APPLICATION #
  179. END
  180.  
  181. CONTROL IFEQ STAT,1;
  182. OTIME(ETIME); # GET SYSTEM TIME AT END OF PROCEDURE #
  183. ST$NAW = ST$NAW + 1; # INCREMENT NUMBER OF TIMES HPAWL CALLED #
  184. STTEMP = EMILS[0] - SMILS[0]; # TIME SPENT IN THIS ROUTINE #
  185. ST$TAW = ST$TAW + STTEMP; # TOTAL TIME SPENT IN THIS ROUTINE #
  186. IF ST$LAW LS STTEMP
  187. THEN # FOUND LARGER TIME INTERVAL IN ROUTINE #
  188. BEGIN
  189. ST$LAW = STTEMP; # NEW LARGEST TIME INTERVAL #
  190. END
  191. CONTROL FI;
  192.  
  193. RETURN;
  194. END
  195. TERM
cdc/nos2.source/nam5871/hpawl.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator