User Tools

Site Tools


cdc:nos2.source:nam5871:qtlink

Table Of Contents

  • [00006] PROC QTLINK
  • [00087] PROC NP$ERR
  • [00088] PROC NETPUT
  • [00089] PROC NETPUTF

Source Code

QTLINK.txt
  1. *DECK QTLINK
  2. USETEXT AIPDEF
  3. USETEXT QTRMBUF
  4. USETEXT QTRMCOM
  5. USETEXT QTRMNIT
  6. PROC QTLINK;
  7.  
  8. *IF,DEF,IMS
  9. #
  10. *1DC QTLINK
  11. *
  12. * 1. PROC NAME AUTHOR DATE
  13. * QTLINK S. WATANABE 80/01/21
  14. *
  15. * 2. FUNCTIONAL DESCRIPTION.
  16. * PROVIDES APPLICATION-TO-APPLICATION CONNECTION PROCESSING
  17. * TO QTRM.
  18. *
  19. * 3. METHOD USED.
  20. * IF APPLICATION NOT NETTED ON,
  21. * CALL NP$ERR TO ISSUE DAYFILE MESSAGE AND ABORT APP.
  22. * IF SUPPORT A-TO-A FLAG IS NOT SET,
  23. * CALL NP$ERR TO ISSUE DAYFILE MESSAGE AND ABORT APP.
  24. * IF APPLICATION-TO-APPLICATION REQUEST NOT OUTSTANDING,
  25. * BUILD CON/ACRQ SUP MSG.
  26. * IF ADDRESS OF OUTCALL DATA NOT SPECIFIED,
  27. * CALL NETPUT TO SEND CON/ACRQ SUP MSG.
  28. * ELSE (APPLICATION HAS OUTCALL DATA TO INCLUDE IN CON/ACRQ),
  29. * IF SIZE OF OUTCALL DATA NOT SPECIFIED,
  30. * REJECT QTLINK CALL WITH APPROPRIATE RETURN CODE.
  31. * ELSE (SIZE OF DATA WAS SPECIFIED),
  32. * IF SPECIFIED SIZE IS TOO LARGE,
  33. * REJECT QTLINK CALL WITH APPROPRIATE RETURN CODE.
  34. * ELSE (GOOD SIZE SPECIFIED FOR DATA TO PASS TO NEXT APP),
  35. * CREATE FRAGMENT ARRAY FOR SUP MSG.
  36. * CALL NETPUTF TO SEND CON/ACRQ SUP MSG.
  37. *
  38. * 4. ENTRY CONDITIONS.
  39. * SUPPORT-A-TO-A FIELD MUST BE SET BEFORE CALLING QTOPEN.
  40. * NETON MUST HAVE BEEN ACCOMPLISHED BY CALLING QTOPEN
  41. * PREVIOUS TO CALLING QTLINK.
  42. * REQUESTED APPLICATION NAME MUST BE PLACED IN NIT$REQ$APP
  43. * AND REQUESTED HOSTID (OR 0 IF SAME HOST) IN NIT$HOSTAA
  44. * IN NIT GLOBAL AREA BEFORE CALLING QTLINK.
  45. *
  46. * 5. NORMAL EXIT CONDITIONS.
  47. * NIT$RC NORMAL COMPLETION RETURN CODE
  48. *
  49. * 6. ABNORMAL EXIT CONDITIONS.
  50. * NIT$RC QTLINK REJECT RETURN CODE
  51. * NIT$S$RC REASON FOR QTLINK REJECT
  52. *
  53. * 7. COMDECKS CALLED OR SYMPL TEXTS USED.
  54. * AIPDEF NP$CRT QTRMBUF QTRMCOM QTRMNIT
  55. *
  56. * 8. ROUTINES CALLED.
  57. * NP$ERR ISSUE ERROR MESSAGE AND ABORT APP
  58. * NETPUT SEND NETWORK MESSAGE TO NIP
  59. * NETPUTF SEND FRAGMENTED NETWORK MESSAGE TO NIP.
  60. *
  61. * 9. DAYFILE MESSAGES
  62. * NETWORK APPLICATION ABORTED, RC = 73.
  63. * QTLINK: REQUEST INVALID BEFORE QTOPEN.
  64. *
  65. * NETWORK APPLICATION ABORTED, RC = 95.
  66. * QTLINK: NO SUPPORT-A-TO-A.
  67. *
  68. *
  69.  #
  70. *ENDIF
  71. #
  72.   CONTROL DEFINITIONS
  73. #
  74. CONTROL PRESET;
  75. CONTROL PACK;
  76. CONTROL DISJOINT;
  77. CONTROL INERT;
  78. CONTROL FASTLOOP;
  79.  
  80. *CALL NP$CRT
  81.  
  82. #
  83.   ROUTINES CALLED
  84. #
  85. XREF
  86. BEGIN
  87. PROC NP$ERR; # ISSUE ERROR MESSAGE AND ABORT NIP #
  88. PROC NETPUT; # SEND NETWORK MESSAGE TO NIP #
  89. PROC NETPUTF; # SEND FRAGMENTED NETWORK MESSAGE TO NIP #
  90. END
  91. #
  92.   LOCAL VARIABLES
  93. #
  94. CONTROL EJECT;
  95. #
  96.   BEGIN QTLINK PROCESSING
  97. #
  98. BEGIN
  99. IF NOT NETON$STATUS
  100. THEN # APP HAS NOT CALLED QTOPEN #
  101. NP$ERR("73");
  102. IF NOT (SUPTRAA[0] OR SUPTERA[0])
  103. THEN # APP DOES NOT SUPPORT A-TO-A CONNECTIONS #
  104. NP$ERR("95");
  105. P<NIT> = NIT$ADDR;
  106. NIT$RC[0] = 0;
  107. NIT$CON[0] = 0;
  108. IF NOT REQAA
  109. THEN # NO A-TO-A CON REQ OUTSTANDING #
  110. BEGIN
  111. ABHWORD[0] = 0;
  112. SPMSG0[0] = 0;
  113. SPMSG1[0] = 0;
  114. ABHABT[0] = APPCMD;
  115. ABHABN[0] = 1; #ABN TO BE RETURNED IN CON/REQ/R#
  116. ABHACT[0] = CT60TRANS;
  117. ABHTLC[0] = LCONAC;
  118. PFCSFC[0] = CONACR; # PFC/SFC OF CON/ACRQ SUP MSG #
  119. CONANM[0] = NIT$REQ$APP[0]; # NAME OF APP TO BE CONNECTED TO#
  120. CONHID[0] = NIT$HOSTAA[0]; # HOST ID OF HOST OF REQUEST APP#
  121. CONALID[0] = NIT$LID[0]; # LID OF HOST OF REQUESTED APP #
  122. IF (NIT$PARMADR[0] EQ 0)
  123. THEN # NO OUTCALL PARAMETERS #
  124. BEGIN
  125. REQAA = TRUE; # SET A-A REQ OUTSTANDING FLAG #
  126. NETPUT(HEADER,SUP$MES); # SEND CON/ACRQ TO NIP #
  127. END
  128. ELSE # OUTCALL DATA TO SEND #
  129. BEGIN
  130. IF NIT$CTLC[0] EQ 0
  131. THEN # NO SIZE GIVEN FOR OUTCALL BUF #
  132. BEGIN
  133. NIT$S$RC[0] = S"NOSIZE"; # STORE REASON FOR BAD CALL #
  134. NIT$RC[0] = S"QTLINKREJ"; # STORE QTLINK REJECT RETURN COD#
  135. END
  136. ELSE # SIZE GIVEN FOR OUTCALL BUFFER #
  137. BEGIN
  138. IF NIT$CTLC[0] GR 52
  139. THEN # TOO MUCH DATA BEING PASSED #
  140. BEGIN
  141. NIT$S$RC[0] = S"BADSIZE"; # STORE REASON FOR BAD CALL #
  142. NIT$RC[0] = S"QTLINKREJ"; # STORE QTLINK REJECT RC #
  143. END
  144. ELSE # SIZE IS WITHIN RANGE #
  145. BEGIN
  146. REQAA = TRUE; # SET A-A REQ OUTSTANDING FLAG #
  147. ABHTLC[0] = LCONAC + NIT$CTLC[0]; # SIZE OF CON/ACRQ S M#
  148. FRAGSZ0[0] = LCONAC; # SIZE OF 1ST FRAGMENT #
  149. FRAGAD0[0] = LOC(SUP$MES); # ADDR OF 1ST FRAGMENT #
  150. FRAGSZ0[1] = NIT$CTLC[0]; # SIZE OF 2ND FRAGMENT #
  151. FRAGAD0[1] = NIT$PARMADR[0]; # ADDR OF 2ND FRAGMENT #
  152. NOFRAG = 2; # NUMBER OF FRAGMENTS IN S M #
  153. NETPUTF(HEADER,NOFRAG,FRAG); # SEND CON/QCRQ SUP MSG #
  154. END
  155. END
  156. END
  157. END
  158. ELSE
  159. BEGIN
  160. NIT$RC[0] = S"QTLINKREJ"; # STORE QTLINK REJECT RETURN COD#
  161. NIT$S$RC[0] = S"AACONOUT"; # STORE REASON CODE FOR BAD CALL#
  162. END
  163. RETURN;
  164. END # QTLINK #
  165. TERM
cdc/nos2.source/nam5871/qtlink.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator