User Tools

Site Tools


cdc:nos2.source:nam5871:nvftdad

NVFTDAD

Table Of Contents

  • [00006] PROC NVFTDAD1)
  • [00007] NVFTDAD - DETERMINE ADDITIONAL DIALOGUE POSSIBILITY
  • [00011] DETERMINE ADDITIONAL DIALOGUE POSSIBILITY.
  • [00065] PROC ABORT
  • [00066] PROC MESSAGE
  • [00067] PROC NVFTETC
  • [00068] PROC NVFUMQE
  • [00069] PROC SSCATR

Source Code

NVFTDAD.txt
  1. *DECK NVFTDAD
  2. USETEXT TEXTNVF
  3. USETEXT TXTANVF
  4. USETEXT TXTAPSS
  5.  
  6. PROC NVFTDAD((PT),(EC));
  7. # TITLE NVFTDAD - DETERMINE ADDITIONAL DIALOGUE POSSIBILITY #
  8.  
  9. BEGIN # NVFTDAD #
  10. #
  11. ** NVFTDAD - DETERMINE ADDITIONAL DIALOGUE POSSIBILITY.
  12. *
  13. * E. THAVIKULWAT 81/11/11
  14. * A. LIM 82/08/04
  15. *
  16. * THIS PROCEDURE'S MAIN FUNCTION IS TO ISSUE APPROPRIATE MESSAGE
  17. * TO THE TERMINAL AND DETERMINE WHETHER TERMINAL SHOULD BE
  18. * PROMPTED ANY FURTHER FOR A NEW APPLICATION. IT IS CALLED INTO
  19. * EXECUTION BY THE FOLLOWING PROCEDURES:
  20. * *NVFTDSP* *NVFTPSV* *NVFTRCN*
  21. *
  22. * PROC NVFTDAD((PT),(EC))
  23. *
  24. * ENTRY:
  25. * PT = POINTER TO PTAC ENTRY
  26. * EC = ERROR CODE
  27. * 0 = APPLICATION BUSY
  28. * 1 = APPLICATION HAS NETTED OFF WITH CONNECTIONS
  29. * OUTSTANDING
  30. * 2 = APPLICATION HAS FAILED WITH CONNECTIONS
  31. * OUTSTANDING
  32. * 3 = NIP REFUSED SWITCH
  33. * 4 = APPLICATION TERMINATED CONNECTION
  34. * 5 = APPLICATION REFUSED CONNECTION
  35. * 6 = APPLICATION NOT AVAILABLE
  36. * 7 = MULTIPLE CONCURRENT LOGINS ARE PROHIBITED
  37. *
  38. * EXIT:
  39. * ERROR MESSAGE SENT TO TERMINAL.
  40. *
  41. * NOTES:
  42. * NO APPLICATION PROMPT IS REISSUED IF MANDATORY OR IMPLIED
  43. * MANDATORY SPECIFIED FOR THE TERMINAL OR USER RESPECTIVELY.
  44. *
  45. * IF EC = 7 (MULTIPLE CONCURRENT LOGINS PROHIBITED) THEN THE
  46. * USER IS SENT AN INFORMATIVE MESSAGE AND THE CONNECTION
  47. * IS TERMINATED.
  48. *
  49. * METHOD:
  50. * SEND APPROPRIATE MESSAGE DEPENDING ON EC. IF CONSOLE DEVICE AND
  51. * ALL MANDATORY LOGIN PARAMTERS WERE SPECIFIED, START A TIMER IN
  52. * ORDER TO REATTEMPT TO SWITCH TO THE APPLICATION IN 30 SECONDS.
  53. * IF NOT A CONSOLE DEVICE, AND IF A MANDATORY APPLICATION WAS
  54. * SPECIFIED, CALL *NVFTETC* TO END THE CONNECTION. OTHERWISE,
  55. * CLEAR APPROPRIATE FIELDS OF THE *PTAC* ENTRY AND SET TERMINAL
  56. * STATE TO AWAIT PROMPT.
  57. #
  58.  
  59. #
  60. **** PROC NVFTDAD -XREF LIST.
  61. #
  62.  
  63. XREF
  64. BEGIN
  65. PROC ABORT; # MACREL - ABORT TASK #
  66. PROC MESSAGE; # MESSAGE - ISSUE MESSAGE #
  67. PROC NVFTETC; # END TERMINAL CONNECTION #
  68. PROC NVFUMQE; # TRANSFER TEXT TO QUEUE #
  69. PROC SSCATR; # ACCEPT TIMER REQUEST #
  70. END
  71.  
  72. #
  73. ****
  74. #
  75.  
  76. *CALL TMSGNVF
  77.  
  78. *CALL TERMCLS
  79.  
  80. ITEM ADDR I; # ADDRESSING INFORMATION FOR ABH #
  81. ITEM EC I; # ERROR CODE #
  82. ITEM LNGTH I; # LENGTH OF MESSAGE #
  83. ITEM PT I; # SUBSCRIPT FOR ARRAY PTAC #
  84.  
  85. #
  86. * THE FOLLOWING BASED ARRAY IS FOR GENERAL PURPOSE USAGE
  87. #
  88. BASED ARRAY BPGEN[00:00] S(1);
  89. BEGIN
  90. ITEM BPG$WORD U(00,00,60); # FULL WORD REFERENCE #
  91. END
  92. #
  93. * TRBBUF - TIMER REQUEST BUFFER.
  94. *
  95. * BUFFER CONTAINING TIMER INFORMATION. BUFFER IS SET UP TO CONTAIN
  96. * THE FC/INACT SM WHICH IS RETURNED TO THE *TAINPQ* WHEN THE TIMER
  97. * EXPIRES.
  98. #
  99. ARRAY TRBBUF [00:00] S(TMBSIZ$);
  100. BEGIN
  101. ITEM TRB$SMID S:CTQSTAT(00,00,12) = [S"SINA"]; #INTERNAL ID#
  102. ITEM TRB$WC U(00,48,12) = [TMBSIZ$]; # ENTRY SIZE #
  103. ITEM TRB$ABT U(01,00,06) = [APPCMD]; # APPL BLOCK TYPE #
  104. ITEM TRB$CNUM U(01,18,18); # CANCELLATION NUM #
  105. ITEM TRB$PFCSFC U(02,00,16) = [FCINA]; # FC/INACT PFCSFC #
  106. ITEM TRB$ACN U(02,24,12); # APPL CONN NUMBER #
  107. ITEM TRB$DELAY U(03,24,18) = [RTRYTIME$];# DELAY TIME IN SEC #
  108. ITEM TRB$QNUM U(03,42,18); # Q NUM FOR FC/INACT#
  109. END
  110.  
  111. $BEGIN
  112. #
  113. * ILGRC - ILLEGAL REASON CODE FROM CR/CRN.
  114. #
  115.  
  116. ARRAY ILGRC[00:00] S(4);
  117. BEGIN
  118. ITEM ILG$MSG C(00,00,34) =
  119. [" NVFTDAD - INVALID RC FROM CR/RCN."];
  120. ITEM ILG$ZERO U(03,24,36) = [0];
  121. END
  122. $END
  123.  
  124. SWITCH ERRSWT
  125. LLABSY, # APPLICATION BUSY #
  126. LLANP, # APPLICATION NOT PRESENT #
  127. LLAPF, # APPLICATION FAILED #
  128. LLARC, # APPLICATION REFUSED CONNECTION #
  129. LLATC, # APPLICATION TERMINATED CONNECTION #
  130. LLARC, # APPLICATION REFUSED CONNECTION #
  131. LLANP, # APPLICATION NOT PRESENT #
  132. LLCAP; # MULTIPLE CONCURRENT LOGINS PROHIBITED #
  133.  
  134. GOTO ERRSWT[EC];
  135.  
  136. LLATC: # APPLICATION TERMINATED CONNECTION #
  137. $BEGIN
  138. MESSAGE(ILGRC[0], 0);
  139. ABORT;
  140. $END
  141.  
  142. GOTO LLEND;
  143.  
  144. LLARC: # APPLICATION REFUSED CONN #
  145. IF (PTA$APPIND[PT] EQ MNDATRY$)
  146. OR (PTA$VDSF[PT])
  147. THEN # MANDATORY/IMPLIED MANDATORY APPLICATION #
  148. BEGIN
  149. P<BPGEN> = LOC(UANPBUF[0]); # USER ACCESS NOT POSSIBLE MSG #
  150. LNGTH = LMSG60$; # LENGTH OF MESSAGE #
  151. END
  152. ELSE # NO MANDATORY/IMPLIED MANDATORY APPL #
  153. BEGIN
  154. P<BPGEN> = LOC(IAMBUF[0]); # ILLEGAL APPLICATION MESSAGE #
  155. LNGTH = LMSG40$; # LENGTH OF MESSAGE #
  156. END
  157.  
  158. GOTO ENDERR;
  159.  
  160. LLANP: # APPLICATION NOT NETTED ON #
  161. P<BPGEN> = LOC(ANPBUF[0]); # APPLICATION NOT PRESENT MSG #
  162. LNGTH = LMSG30$; # LENGTH OF MESSAGE #
  163.  
  164. GOTO ENDERR;
  165.  
  166. LLAPF: # APPLICATION FAILED #
  167. P<BPGEN> = LOC(APFBUF[0]); # APPLICATION FAILED MESSAGE #
  168. LNGTH = LMSG30$; # LENGTH OF MESSAGE #
  169.  
  170. GOTO ENDERR;
  171.  
  172. LLABSY: # DUP USER OR NO AVAIL CONN NUM #
  173. P<BPGEN> = LOC(ABSYBUF[0]); # APPLICATION BUSY MESSAGE #
  174. LNGTH = LMSG40$; # LENGTH OF MESSAGE #
  175.  
  176. GOTO ENDERR;
  177.  
  178. LLCAP:
  179. P<BPGEN> = LOC(CANABUF[0]); # CONCURRENT LOGINS PROHIBITED #
  180. LNGTH = LMSG50$;
  181. ADDR = PTA$ACN[PT];
  182. NVFUMQE(P<CTQ>,BPGEN[0],APPTTX$,ADDR,LNGTH);
  183. PTA$CACA[PT] = TRUE; # DON'T SEARCH *RML* TABLE #
  184. NVFTETC(PT);
  185.  
  186. GOTO LLEND;
  187.  
  188. ENDERR: # COMMON END PROCESSING #
  189. #
  190. * SEND MESSAGE THAT WAS SET UP PREVIOUSLY TO THE TERMINAL.
  191. #
  192. ADDR = PTA$ACN[PT];
  193. NVFUMQE(P<CTQ>,BPGEN[0],APPTTX$,ADDR,LNGTH); # MESSAGE TO QUEUE #
  194. #
  195. * IF THIS IS A CONSOLE DEVICE TYPE WITH ALL MANDATORY LOGIN
  196. * PARAMETERS, START A 30 SECOND TIMER SO THAT NVF CAN TRY TO
  197. * RECONNECT THE CONSOLE TO THE DESIRED APPLICATION.
  198. #
  199. IF (PTA$DT[PT] EQ DT$CONS OR PTA$DT[PT] EQ DT$CLP) AND
  200. (PTA$FAMIND[PT] EQ MNDATRY$) AND
  201. (PTA$USRIND[PT] EQ MNDATRY$) AND
  202. (PTA$APPIND[PT] EQ MNDATRY$)
  203. THEN
  204. BEGIN
  205. TRB$ACN[0] = PTA$ACN[PT];
  206. TRB$QNUM[0] = LOC(P<TAINPQ>);
  207. SSCATR(TRBBUF[0]);
  208. PTA$CNUM[PT] = TRB$CNUM[0];
  209. PTA$STATE[PT] = PTACST"AWTAPPL";
  210. GOTO LLEND;
  211. END
  212. #
  213. * IF MANDATORY/IMPLIED MANDATORY APPLICATION IS REQUIRED, NO MORE
  214. * PROMPTS ARE ISSUED.
  215. #
  216. IF (PTA$APPIND[PT] EQ MNDATRY$)
  217. OR (PTA$VDSF)
  218. THEN # MANDATORY/IMPLIED MANDATORY APPL REQ #
  219. BEGIN
  220. #
  221. * CHECK TERMINAL CLASS TO SEE IF NVF SHOULD SEND A CTR/CHAR.
  222. #
  223. GOTO TERMCLS [PTA$TC[PT]];
  224.  
  225. SENDCTRCHAR:
  226.  
  227. #
  228. * SEND CTR/CHAR TO FORCE TERMINAL TO BE IN NON-TRANSPARENT INPUT
  229. * MODE.
  230. #
  231. PFCSFC[1] = CTRCHAR;
  232. CTRSTR[1] = 0; # CLEAR REST OF WORD 0 #
  233. B<0,16>CTRSTR[1] = NOXPAR$; # ADD FN/FV PAIR FOR NON-XPARENT#
  234. NVFUMQE(P<CTQ>,APSM[1],APPPR$,ADDR,LCTRLO$); # TRANSFER TO Q #
  235.  
  236. NOCTRCHAR:
  237. # SEND "LOGGED OUT" MESSAGE #
  238. NVFUMQE(P<CTQ>,LOMBUF[0],APPTTX$,ADDR,LMSG20$);
  239. NVFTETC(PT,0); # END TERMINAL CONNECTION #
  240. END
  241. ELSE # NO MANDATORY/IMPLIED MANDATORY APPL REQ #
  242. BEGIN
  243. #
  244. * CLEAR APPROPRIATE FIELDS OF *PTAC* ENTRY AND SET TERMINAL
  245. * STATE TO AWAIT APPLICATION PROMPT.
  246. #
  247. PTA$AWORD[PT] = 0; # CLEAR SWITCH APPLICATION WORD #
  248. PTA$VAF[PT] = FALSE; # CLEAR VOLUNTEERED APPL FLAG #
  249. PTA$VAWORD[PT] = 0; # CLEAR VOLUNTEERED APPL WORD #
  250. PTA$STATE[PT] = PTACST"AWTPRMT"; # SET TERM TO AWAIT PROMPT #
  251. END
  252.  
  253. LLEND:
  254. END # END NVFTDAD #
  255.  
  256. TERM
1)
PT),(EC
cdc/nos2.source/nam5871/nvftdad.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator