User Tools

Site Tools


cdc:nos2.source:nam5871:ksendhm

KSENDHM

Table Of Contents

  • [00011] PRGM KSENDHM
  • [00021] PROC MGETS
  • [00022] PROC NFOB
  • [00023] PROC XTRACE

Source Code

KSENDHM.txt
  1. *DECK KSENDHM
  2. USETEXT NIPDEF
  3. USETEXT AHEADER
  4. USETEXT FREETAB
  5. USETEXT LLCB
  6. USETEXT PARAMS
  7. USETEXT PT
  8. USETEXT SUPMSG
  9. USETEXT TNT
  10.  
  11. PRGM KSENDHM; # PROCESS NAM K DISPLAY SEND COMMAND #
  12.  
  13. STARTIMS;
  14. STOPIMS;
  15.  
  16. #
  17.   EXTERNAL REFERENCES
  18. #
  19. XREF
  20. BEGIN
  21. PROC MGETS; # GET BUFFER #
  22. PROC NFOB; # LINK MESSAGE TO NETWORK #
  23. PROC XTRACE; # TRACE ROUTINE CALL #
  24. LABEL RJMAIN;
  25. END
  26. #
  27.   LOCAL DEFINITIONS
  28. #
  29. DEF MAX$NN # 255 #; # HIGHEST NETWORK NODE NUMBER ALLOWED #
  30. #
  31.   LOCAL VARIABLES
  32. #
  33. ITEM DHN; # DESTINATION HOST NODE NUMBER #
  34. ITEM DNODE C(10); # DESTINATION NODE IN OCTAL DISPLAY #
  35. ITEM KRC; # ERROR RETURN CODE #
  36. ITEM I; # INDUCTION VARIABLE #
  37. ITEM TEMP; # TEMPORARY #
  38.  
  39. BASED ARRAY HMSG$TEXT [0:0] S(4);
  40. BEGIN # HOP MESSAGE TEXT #
  41. ITEM HMSG$WORD1 U(00,00,60); # TEXT WORD 1 #
  42. ITEM HMSG$WORD2 U(01,00,60); # TEXT WORD 2 #
  43. ITEM HMSG$WORD3 U(02,00,60); # TEXT WORD 3 #
  44. ITEM HMSG$WORD4 U(03,00,60); # TEXT WORD 4 #
  45. END
  46.  
  47. CONTROL EJECT;
  48.  
  49. BEGIN # KSENDHM #
  50.  
  51. CONTROL IFEQ DEBUG,1;
  52. XTRACE("KSDHM"); # TRACE CALL #
  53. CONTROL FI;
  54.  
  55. DNODE = PARAMS6; # DESTINATION HOST NODE NUMBER #
  56. KRC = 0; # INITIALIZE RETURN CODE #
  57. DHN = 0; # INITIALIZE DESTINATION NODE #
  58.  
  59. FOR I=0 STEP 1 WHILE I LS WC
  60. AND KRC EQ 0
  61. AND C<I>DNODE NQ " "
  62. DO # CONVERT DESTINATION HOST NODE NUMBER INTO BINARY #
  63. BEGIN
  64. TEMP = C<I>DNODE; # ONE DIGIT #
  65. IF TEMP GQ "0"
  66. AND TEMP LQ "9"
  67. THEN # ALLOW ONLY DECIMAL VALUE #
  68. DHN = DHN*10 + (TEMP-O"33");
  69. ELSE # ERROR, MUST BE IN DECIMAL #
  70. KRC = 8;
  71. END
  72.  
  73. IF KRC EQ 0
  74. THEN
  75. BEGIN # LOCATE H-H LOGICAL LINK WITH TN = DHN #
  76. P<LLCB> = 0; # INITIALIZE LLCB ADDRESS #
  77. IF DHN LS TNTBS[0]
  78. THEN # DESTINATION NODE WITHIN TNT RANGE #
  79. BEGIN # SEARCH FOR A H-H LOGICAL LINK #
  80. P<LLCB> = TNTLLAD[DHN]; # FWA OF LLCB #
  81. FOR TEMP=TEMP WHILE P<LLCB> NQ 0 # LLCB EXISTS #
  82. AND (NOT LLCBHH[0] # NOT H-H LINK #
  83. OR LLCBWOF[0]) # LINK FAILED #
  84. DO # GET NEXT LOGICAL LINK IN CHAIN #
  85. P<LLCB> = LLCBFP[0]; # RESET LLCB ADDRESS #
  86. END
  87. IF P<LLCB> NQ 0
  88. THEN # LOCATE H-H LOGICAL LINK TO DESTINATION NODE #
  89. BEGIN
  90. IF LLCBHRL[0] LQ HRLV0
  91. THEN # DESTINATION HOST ALLOWS NO TRAFFIC AT MAX FL #
  92. KRC = 9;
  93. END
  94. ELSE # NO H-H LOGICAL LINK FOUND #
  95. KRC = 10;
  96. END
  97.  
  98. IF KRC EQ 0
  99. THEN
  100. BEGIN # SEND HOP/SEND TO DESTINATION HOST #
  101. MGETS(LHOPSD+BLKHSIZE+ABHSIZE,TEMP,TRUE);
  102. P<AHEADER> = TEMP+BLKHSIZE; # FWA OF ABH #
  103. ABHABT[0] = APPCMD;
  104. ABHACT[0] = CT8ASCII;
  105. ABHTLC[0] = LHOPSDR;
  106. P<SUPMSG> = P<AHEADER>+ABHSIZE;
  107. P<SMNIP> = P<SUPMSG>; # FORMAT HOPN/SEND #
  108. P<HMSG$TEXT> = PARAMS2; # HOP MESSAGE TEXT FWA #
  109. PFCSFC[0] = HOPSEND;
  110. HOPMSG1[0] = HMSG$WORD1[0]; # SEND UP TO 40 CHARS #
  111. HOPMSG2[0] = HMSG$WORD2[0];
  112. HOPMSG3[0] = HMSG$WORD3[0];
  113. HOPMSG4[0] = HMSG$WORD4[0];
  114. NFOB(TEMP,P<LLCB>); # SEND HOPN/SEND TO NETWORK #
  115. END
  116.  
  117. PARAMS7 = KRC; # SET RETURN CODE #
  118. GOTO RJMAIN;
  119. END # KSENDHM #
  120. TERM
cdc/nos2.source/nam5871/ksendhm.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator