User Tools

Site Tools


cdc:nos2.source:nam5871:ns_dar

NS$DAR

Table Of Contents

  • [00010] PROC NS$DAR(ERRCODE)
  • [00012] NS$DAR - PROCESS ABNORMAL RESPONSE FROM NPU.
  • [00016] PROCESS ABNORMAL RESPONSE FROM NPU.
  • [00050] PROC NS$DBG
  • [00056] PROC NS$FBH
  • [00057] FUNC NS$FEC U
  • [00058] PROC NS$MSG
  • [00059] FUNC NS$CHD C(4)
  • [00060] PROC NETPUT

Source Code

NS$DAR.txt
  1. *DECK NS$DAR
  2. USETEXT DEF$NS
  3. USETEXT ERR$NS
  4. USETEXT NAT$NS
  5. USETEXT NPT$NS
  6. USETEXT PFC$NS
  7. USETEXT PIC$NS
  8. USETEXT SMB$NS
  9. USETEXT SMD$NS
  10. PROC NS$DAR(ERRCODE); # PROCESS ABNORMAL RESPONSE FROM NPU #
  11.  
  12. # TITLE NS$DAR - PROCESS ABNORMAL RESPONSE FROM NPU. #
  13.  
  14. BEGIN # NS$DAR #
  15. #
  16. ** NS$DAR - PROCESS ABNORMAL RESPONSE FROM NPU.
  17. *
  18. * J.C. LEE 1981
  19. *
  20. * THIS ROUTINE PROCESS ABNORMAL RESPONSE FROM NPU.
  21. *
  22. * PROC NS$DAR(ERRCODE)
  23. *
  24. * ENTRY:
  25. * NONE.
  26. *
  27. * EXIT:
  28. * ERRCODE - SET IF ERROR IS FOUND.
  29. *
  30. * METHOD:
  31. * IF RETRY-COUNT = 0, MESSAGE TO DAYFILE AND ABORT.
  32. * IF RETRY-COUNT NOT REACH LIMIT, DETERMINE TYPE OF
  33. * ABNORMAL RESPONSE.
  34. * IF ABNORMAL DUMP RESPONSE, SET DUMP REQUEST TEXT
  35. * LENGTH, AND RESTART REQUEST.
  36. * IF ABNORMAL LOAD RESPONSE, SET ERRCODE, AND ABORT
  37. * NPU LOAD.
  38. * IF ABNORMAL START RESPONSE, SET START REQUEST TEXT
  39. * LENGTH, AND RESTART REQUEST.
  40. * IF RETRY-COUNT REACH LIMIT. SET ERRCODE AND ABORT
  41. * CURRENT ACTIVITY.
  42. *
  43. #
  44.  
  45. ITEM ERRCODE U; # ERROR CODE #
  46.  
  47. $BEGIN
  48. XREF
  49. BEGIN
  50. PROC NS$DBG; # TRACE PROCEDURE CALL #
  51. END
  52. $END
  53.  
  54. XREF
  55. BEGIN
  56. PROC NS$FBH; # FORMAT APPLICATION BLOCK HEADER #
  57. FUNC NS$FEC U; # FORMAT ERROR CODE #
  58. PROC NS$MSG; # DISPATCH MESSAGE #
  59. FUNC NS$CHD C(4); # CONVERT HEX TO DISPLAY CODE #
  60. PROC NETPUT; # SEND MESSAGE TO NETWORK #
  61. END
  62.  
  63. DEF MAX$RETRYS # 3 #; # MAXIMUM RETRY COUNT ALLOWED #
  64.  
  65. ITEM COMCODE U; # COMMAND CODE #
  66. ITEM CCMNEMONIC C(3) = "DLS"; # VALID NPU/DT/A COMMAND CODE #
  67. ITEM TEMP U; # TEMPORARY #
  68.  
  69. DEF DM$MAR # DM$LOCAL+DM$NAMLOG+DM$EVENT #; # ROUTE OPTIONS #
  70. DEF L$MAR # 4 #;
  71. ARRAY MSG$MAR [0:0] S(L$MAR);
  72. BEGIN # EVENT MESSAGE FOR ABNORMAL RESPONSE #
  73. ITEM MAR$TEXT C(0,0,38) = # EVENT MESSAGE TEXT #
  74. ["NPUNAME, RECEIVED NPU/DT/A(C) RC = XX."];
  75. ITEM MAR$NPNAM C(00,00,07); # NPU NAME #
  76. ITEM MAR$PFCSFC C(01,48,06); # PFC/SFC OF SM #
  77. ITEM MAR$CC U(02,42,06); # COMMAND CODE #
  78. ITEM MAR$RC U(03,30,12); # REASON CODE IN HEXADECIMALS #
  79. ITEM MAR$END U(03,48,12) = [0]; # LINE TERMINATOR #
  80. END
  81.  
  82. SWITCH ANPUDTCASE:DIRCODE # NPU/DT/A CASES #
  83. AR$DUMP:DUMP,
  84. AR$LOAD:LOAD,
  85. AR$START:START;
  86.  
  87. CONTROL EJECT;
  88.  
  89. $BEGIN
  90. NS$DBG("DAR"); # TRACE CALL #
  91. $END
  92.  
  93. ERRCODE = 0;
  94. COMCODE = NPUCC[0]; # COMMAND CODE #
  95.  
  96. IF NAT$RETRYS[0] EQ 0
  97. THEN # NO RETRY HAS YET BEEN ATTEMPTED #
  98. BEGIN # DAYFILE ABNORMAL RESPONSE #
  99. MAR$NPNAM[0] = NPNAM; # SET NPU NAME #
  100. TEMP = C<COMCODE,1>CCMNEMONIC; # COMMAND CODE MNEMONIC #
  101. MAR$CC[0] = TEMP;
  102. TEMP = NS$CHD(NPURC[0]); # GET REASON CODE IN DISPLAY HEX #
  103. MAR$RC[0] = TEMP;
  104. NS$MSG(MSG$MAR,L$MAR,DM$MAR); # DISPATCH MESSAGE #
  105. END
  106.  
  107. NAT$RETRYS[0] = NAT$RETRYS[0] + 1; # INCREMENT RETRY COUNT #
  108. IF NAT$RETRYS[0] LQ MAX$RETRYS
  109. THEN # MAXIMUM RETRY COUNT NOT REACHED #
  110. BEGIN # PROCESS ABNORMAL RESPONSE #
  111. GOTO ANPUDTCASE[COMCODE]; # CASE ON NPU/DT/A #
  112.  
  113. AR$DUMP: # ABNORMAL DUMP RESPONSE #
  114. TEMP = LNPUDTDR; # DUMP REQUEST TEXT LENGTH #
  115. RESENDR: # RESEND REQUEST TO NPU #
  116. NS$FBH(TEMP,FALSE); # FORMAT APPLICATION BLOCK HEADER #
  117. EB[0] = FALSE; # RESET ERROR RESPONSE BIT #
  118. NPURC[0] = 0; # RESET REASON CODE TO ZERO #
  119. NETPUT(ABH$WORD,SMB$BUFFER); # RESEND REQUEST #
  120. GOTO DAREXIT;
  121.  
  122. AR$LOAD: # ABNORMAL LOAD RESPONSE #
  123. ERRCODE = NS$FEC(EC"ERR$ABRESP",0); # ABORT NPU LOAD #
  124. GOTO DAREXIT;
  125.  
  126. AR$START: # ABNORMAL START RESPONSE #
  127. TEMP = LNPUDTSR; # START REQUEST TEXT LENGTH #
  128. GOTO RESENDR; # RESEND START REQUEST TO NPU #
  129.  
  130. END
  131.  
  132. ELSE # RETRY COUNT EXCEEDED, ABORT CURRENT ACTIVITY #
  133. BEGIN
  134. NAT$RETRYS[0] = 0; # RESET RETRY COUNT #
  135. ERRCODE = NS$FEC(EC"ERR$RETRYS",0);
  136. END
  137.  
  138. DAREXIT:
  139.  
  140. RETURN;
  141. END # NS$DAR #
  142. TERM
cdc/nos2.source/nam5871/ns_dar.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator