User Tools

Site Tools


cdc:nos2.source:nam5871:ns_hno

NS$HNO

Table Of Contents

  • [00004] PROC NS$HNO(REASON)
  • [00006] NS$NHO - CANCEL ALTERNATE LOAD FILE COMMAND.
  • [00010] CANCEL ALTERNATE LOAD FILE COMMAND.
  • [00036] PROC NS$DBG
  • [00042] FUNC NS$XZFN C(10)
  • [00043] PROC RETERN
  • [00044] PROC RETTSB

Source Code

NS$HNO.txt
  1. *DECK NS$HNO
  2. USETEXT NPT$NS
  3. USETEXT HOC$NS
  4. PROC NS$HNO(REASON); # CANCEL ALTERNATE LOAD FILE COMMAND #
  5.  
  6. # TITLE NS$NHO - CANCEL ALTERNATE LOAD FILE COMMAND. #
  7.  
  8. BEGIN # NS$NHO #
  9. #
  10. ** NS$HNO - CANCEL ALTERNATE LOAD FILE COMMAND.
  11. *
  12. * J.C. LEE 1981
  13. *
  14. * THIS ROUTINE PROCESS THE CANCEL ALTERNATE LOAD FILE COMMAND.
  15. *
  16. * PROC NS$HNO(REASON)
  17. *
  18. * ENTRY:
  19. * NONE.
  20. *
  21. * EXIT:
  22. * REASON = COMMAND ERROR REASON CODE.
  23. *
  24. * METHOD:
  25. * SCAN THROUGH THE NPU TABLE, FIND THE NPU.
  26. * IF NPU IDLE, RETURN THE FILE, RELEASE DIRECTORY TSB.
  27. * IF NPU ACTIVE, EXIT WITH REASON SET.
  28. *
  29. #
  30.  
  31. ITEM REASON U; # COMMAND ERROR REASON CODE #
  32.  
  33. $BEGIN
  34. XREF
  35. BEGIN
  36. PROC NS$DBG; # TRACE CALL #
  37. END
  38. $END
  39.  
  40. XREF
  41. BEGIN
  42. FUNC NS$XZFN C(10); # ZERO-FILLED FILE NAME #
  43. PROC RETERN; # RETURN FILE #
  44. PROC RETTSB; # RELEASE TSB #
  45. END
  46.  
  47. ITEM I U; # LOOP VARIABLE #
  48. ITEM NPTCOUNT U; # NPT ENTRY COUNT #
  49.  
  50. ARRAY ALF$FET [0:0] S(5);
  51. BEGIN # ALTERNATE LOAD FILE FET #
  52. ITEM FET$LFN C(00,00,07); # LOGICAL FILE NAME #
  53. ITEM FET$FM B(00,58,01) = [TRUE]; # BINARY FILE MODE #
  54. ITEM FET$COMP B(00,59,01) = [TRUE]; # COMPLETION BIT #
  55. ITEM FET$RAN B(01,12,01) = [TRUE]; # RANDOM FILE #
  56. ITEM FET$FIRST U(01,42,18) = [0];
  57. ITEM FET$IN U(02,42,18) = [0];
  58. ITEM FET$OUT U(03,42,18) = [0];
  59. ITEM FET$LIMIT U(04,42,18) = [0];
  60. END
  61.  
  62. CONTROL EJECT;
  63.  
  64. $BEGIN
  65. NS$DBG("HNO"); # TRACE CALL #
  66. $END
  67.  
  68. REASON = 0;
  69. NPTCOUNT = NPT$EC[0]; # NPU TABLE ENTRY COUNT #
  70.  
  71. FOR I = 1 STEP 1 UNTIL NPTCOUNT
  72. DO # SCAN NPU TABLE FOR ENTRY USING ALT LOAD FILE #
  73. BEGIN
  74. IF NPT$ALFWD[I] NQ 0
  75. THEN # ALTERNATE NLF IN USE BY THIS NPU #
  76. BEGIN
  77.  
  78. IF NPT$NATTSB[I] EQ 0
  79. THEN # NPU IS IDLE #
  80. BEGIN
  81. FET$LFN[0] = NS$XZFN(NPT$ALFPFN[I]); # SET LFN #
  82. RETERN(ALF$FET); # RETURN FILE #
  83. RETTSB(NPT$DIRTSB[I]); # RELEASE DIRECTORY TSB #
  84. NPT$ALFWD[I] = 0;
  85. END
  86.  
  87. ELSE # NPU IS ACTIVE, LOAD FILE MAY BE IN USE #
  88. REASON = HOPCMDERR"NPUACTIVE"; # CANNOT ACTION COMMAND #
  89. END
  90.  
  91. END # END FOR LOOP I #
  92.  
  93. RETURN;
  94. END # NS$HNO #
  95. TERM
cdc/nos2.source/nam5871/ns_hno.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator