User Tools

Site Tools


cdc:nos2.source:nam5871:nstore

NSTORE

Table Of Contents

  • [00002] PROC NSTORE(BARRAY,SYMBOL,VALUE)

Source Code

NSTORE.txt
  1. *DECK NSTORE
  2. PROC NSTORE(BARRAY,SYMBOL,VALUE);
  3. BEGIN
  4. *IF,DEF,IMS
  5. #
  6. *1DC NSTORE
  7. * 1.PROC NAME AUTHOR DATE
  8. * NFETCH PETER TAM 5/24/77
  9. *
  10. * 2.FUNCTIONAL DESCRIPTION
  11. * NSTORE IS A SYMPL ROUTINE CALLABLE BY AN FNT CALLING
  12. * SEQUENCE, TO STORE FIELDS IN SUPERVISORY MESSAGES.
  13. * CALL NSTORE(ARRAY,F1,F2)
  14. * WHERE
  15. * ARRAY IS THE FWA OF THE SUPERVISORY MESSAGE
  16. * F1 IS THE LEFT JUSTIFIED ZERO FILLED DISPLAY CODED
  17. * NAME OF THE FIELD TO BE STORED
  18. * F2 IS THE LEFT JUSTIFIED ZERO FILLED DISPLAY CODED
  19. * NAME OF THE VALUE OF THE FIELD TO BE STORED
  20. * F2 MAY ALSO BE A CONSTANT VALUE TO BE STORED
  21. *
  22. * 3.METHOD USED
  23. * NSTORE WILL STORE F2 IN FIELD F1 IN THE ARRAY
  24. *
  25. * IT USES A TABLE LOOK-UP TECHNIQUE TO FIND THE
  26. * A. VALUE OF F2
  27. * B. THE DESCRIPTION OF WHERE IN THE ARRAY F1 IS
  28. *
  29. * THESE TABLES ARE ASSEMBLED INTO THE COMPASS ROUTINE
  30. * NP$SYM, WHICH USES THEIR DEFINITION IN NETMAC.
  31. *
  32. *
  33. * 4.ENTRY CONDITIONS
  34. * ARRAY CONTAINS THE SUPERVISORY MESSAGE
  35. * F1 IS THE DISPLAY CODE NAME OF THE REQUIRED FIELD
  36. *
  37. * 5.EXIT CONDITIONS
  38. * THE VALUE F2 WILL BE STORED IN FIELD F1 OF ARRAY
  39. *
  40. * 6.COMDECKS CALLED
  41. * NP$CRT
  42. *
  43. * 7.ROUTINES CALLED
  44. * NFETCH
  45. * NP$ERR
  46. *
  47. * 8.DAYFILE MESSAGES
  48. * NETWORK APPLICATION ABORTED, RC = 69.
  49. * NSTORE: ILLEGAL FIELD MNEMONIC.
  50. *
  51. *
  52.  #
  53. *ENDIF
  54. *CALL NP$CRT
  55. XREF FUNC NFETCH I;
  56. XREF PROC NP$ERR;
  57. XREF ITEM NP$SYME U;
  58. XREF ITEM NP$SYMI U;
  59. XREF ARRAY NP$SYM[0:300] S(2);
  60. BEGIN
  61. ITEM SYMNAME C(0,0,7);
  62. ITEM SYMST U(0,54,6);
  63. ITEM SYMWORD U(1,6,12);
  64. ITEM SYMBIT U(1,18,12);
  65. ITEM SYMLGTH U(1,30,12);
  66. ITEM SYMVAL U(1,0,60);
  67. END
  68. ARRAY BARRAY[0:O"77777"] S(1);
  69. ITEM CONTENTS U;
  70. ITEM VALUE I;
  71. ITEM SYMBOL U;
  72. ITEM I U;
  73. ITEM J U;
  74. ITEM II U;
  75. II = (LOC(NP$SYMI)-LOC(NP$SYM))/2;
  76. FOR I = II STEP 1 UNTIL NP$SYME DO BEGIN
  77. IF SYMNAME[I] EQ C<0,7>SYMBOL THEN BEGIN
  78. J = SYMST[I];
  79. IF J EQ 4 THEN BEGIN
  80. NP$ERR("69"); # ILLEGAL FIELD MNEMONIC. #
  81. END
  82. IF J EQ 3 OR J EQ 2 THEN BEGIN
  83. IF VALUE NQ 0
  84. AND B<42,18>VALUE EQ 0
  85. AND SYMLGTH[I] LQ 18
  86. THEN BEGIN
  87. VALUE = NFETCH(0,VALUE);
  88. END
  89. B<SYMBIT[I],SYMLGTH[I]>CONTENTS[SYMWORD[I]] = VALUE;
  90. RETURN;
  91. END
  92. IF J EQ 1 THEN BEGIN
  93. IF VALUE NQ 0
  94. AND B<42,18>VALUE EQ 0
  95. AND SYMLGTH[I] LQ 18
  96. THEN BEGIN
  97. VALUE = NFETCH(0,VALUE);
  98. END
  99. B<SYMBIT[I],6*SYMLGTH[I]>CONTENTS[SYMWORD[I]] = VALUE;
  100. RETURN;
  101. END
  102. END
  103. END
  104. NP$ERR("69"); # ILLEGAL FIELD MNEMONIC. #
  105. END
  106. TERM
cdc/nos2.source/nam5871/nstore.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator