User Tools

Site Tools


cdc:nos2.source:nam5871:ns_ndf

NS$NDF

Table Of Contents

  • [00007] PROC NS$NDF(NDFPFN,ERRCODE)
  • [00009] NS$NDF - DEFINE NPU DUMP FILE.
  • [00013] DEFINE NPU DUMP FILE.
  • [00043] PROC NS$DBG
  • [00049] FUNC DEFINE
  • [00050] FUNC NS$FEC U
  • [00051] FUNC NS$CHD C(4)

Source Code

NS$NDF.txt
  1. *DECK NS$NDF
  2. USETEXT COM$NS
  3. USETEXT DEF$NS
  4. USETEXT NDF$NS
  5. USETEXT ERR$NS
  6.  
  7. PROC NS$NDF(NDFPFN,ERRCODE); # DEFINE NPU DUMP FILE #
  8.  
  9. # TITLE NS$NDF - DEFINE NPU DUMP FILE. #
  10.  
  11. BEGIN # NS$NDF #
  12. #
  13. ** NS$NDF - DEFINE NPU DUMP FILE.
  14. *
  15. * J.C. LEE 1981
  16. *
  17. * THIS ROUTINE DEFINES AN NPU DUMP FILE.
  18. *
  19. * PROC NS$NDF(NDFPFN,ERRCODE)
  20. *
  21. * ENTRY:
  22. * NDFPFN - NPU DUMP FILE PERMANENT FILE NAME.
  23. *
  24. * EXIT:
  25. * ERRCODE - ERROR CODE.
  26. *
  27. * METHOD:
  28. * TRY THE FOLLOWING 256 TIMES OR TIL A FILE IS DEFINED:
  29. * FORMAT PFN OF NDF
  30. * DEFINE NDF AS A PRIVATE DIRECT ACCESS
  31. * PERMANENT FILE.
  32. * IF DUMP INDEX FULL, FLAG ERROR.
  33. * UPDATE DUMP NUMBER.
  34. *
  35. #
  36.  
  37. ITEM NDFPFN C(7); # PFN OF NPU DUMP FILE #
  38. ITEM ERRCODE U; # ERROR CODE #
  39.  
  40. $BEGIN
  41. XREF
  42. BEGIN
  43. PROC NS$DBG; # TRACE PROCEDURE CALL #
  44. END
  45. $END
  46.  
  47. XREF
  48. BEGIN
  49. FUNC DEFINE; # DEFINE A DIRECT ACCESS PERMANENT FILE #
  50. FUNC NS$FEC U; # FORMAT ERROR CODE #
  51. FUNC NS$CHD C(4); # CONVERT TO 4 DISPLAY HEX CHAR #
  52. END
  53.  
  54. ITEM INDEX I; # LOOP VARIABLE #
  55. ITEM STAT U; # RETURN STATUS FROM DEFINE #
  56. ITEM TEMP C(4); # TEMPORARY #
  57.  
  58. CONTROL EJECT;
  59.  
  60. $BEGIN
  61. NS$DBG("NDF"); # TRACE CALL #
  62. $END
  63.  
  64. ERRCODE = 0;
  65. STAT = 1;
  66.  
  67. FOR INDEX = DN STEP 1 WHILE STAT NQ 0
  68. AND INDEX LQ (MAX$NDFDN+DN) # TRY MAXIMUM 256 TIMES #
  69. DO
  70. BEGIN
  71. #
  72.   FORMAT PERMANENT FILE NAME OF NDF
  73. #
  74. C<0,2>NDFPFN = "NP"; # NDF FILE IDENTIFIER #
  75. TEMP = NS$CHD(INDEX); # CONVERT TO DISPLAY HEXADECIMALS #
  76. C<2,2>NDFPFN = C<2,2>TEMP; # DUMP INDEX IN DISPLAY HEX #
  77. C<4,3>NDFPFN = NIN; # DISPLAY CODE DECIMAL NIN #
  78. #
  79.   DEFINE NDF AS A PRIVATE DIRECT ACCESS PERMANENT FILE
  80. #
  81. STAT = DEFINE(NDFPFN,NDFPFN,NDF$PW,NDF$CT,NDF$MODE,NDF$AC);
  82. END
  83.  
  84. IF STAT NQ 0
  85. THEN # DUMP INDEX FULL #
  86. BEGIN
  87. ERRCODE = NS$FEC(EC"ERR$DN",0);
  88. END
  89.  
  90. DN = B<52,8>INDEX; # UPDATE DUMP NUMBER #
  91.  
  92. RETURN;
  93. END
  94. TERM
cdc/nos2.source/nam5871/ns_ndf.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator