User Tools

Site Tools


cdc:nos2.source:nam5871:nvftacc

NVFTACC

Table Of Contents

  • [00008] PROC NVFTACC
  • [00009] NVFTACC - ACCEPT SWITCH CONNECTION REQUEST (CR/ACC SM)
  • [00013] ACCEPT SWITCH CONNECTION REQUEST (CR/ACC SM).
  • [00054] PROC ABORT
  • [00055] PROC MESSAGE
  • [00056] PROC NVFTDSP
  • [00057] PROC NVFTIAM
  • [00058] PROC NVFUMQE
  • [00059] PROC SSTRTS

Source Code

NVFTACC.txt
  1. *DECK NVFTACC
  2. USETEXT TEXTNVF
  3. USETEXT TEXTSS
  4. USETEXT TXSMNVF
  5. USETEXT TXTANVF
  6. USETEXT TXTAPSS
  7.  
  8. PROC NVFTACC;
  9. # TITLE NVFTACC - ACCEPT SWITCH CONNECTION REQUEST (CR/ACC SM) #
  10.  
  11. BEGIN # NVFTACC #
  12. #
  13. ** NVFTACC - ACCEPT SWITCH CONNECTION REQUEST (CR/ACC SM).
  14. *
  15. * E. THAVIKULWAT 81/11/04
  16. * C. BRION 83/05/10
  17. *
  18. * THIS PROCEDURE'S MAIN FUNCTION IS TO COMPLETE TERMINAL TO
  19. * APPLICATION SWITCHING IN RESPONSE TO A CR/ACC REQUEST BY SAVING
  20. * APPROPRIATE PTAC INFORMATION IN THE VCB FILE. IT IS CALLED INTO
  21. * EXECUTION BY PROCEDURE *NVFTDQE*.
  22. *
  23. * PROC NVFTACC
  24. *
  25. * ENTRY:
  26. * CR/ACC SM IN *MSGBUF*
  27. *
  28. * EXIT:
  29. * ENTRY MADE IN VCB FILE, ABAP ACCOUNT DAYFILE MESSAGE ISSUED,
  30. * AND PTAC ENTRY DELETED.
  31. *
  32. * NOTES:
  33. * A PTAC ENTRY WILL NOT BE FOUND IF A CR/CB/R OCCURRED AFTER
  34. * A CR/SWH HAS BEEN ISSUED BUT BEFORE A CR/ACC WAS RECEIVED.
  35. *
  36. * METHOD:
  37. * SEARCH PTAC TABLE FOR ENTRY THAT MATCHES THIS TERMINAL'S VCB.
  38. * IF NO MATCH, IGNORE SM. OTHERWISE, SAVE SWITCH TIME IN THE
  39. * PTAC. FOR SYNCHRONOUS CONSOLE AND PASSIVE DEVICES, GET ITS
  40. * CORRESPONDING PDCT ENTRY. IF SYNCHRONOUS CONSOLE, SAVE
  41. * VALIDATION DATA IN THE PDCT AND SWITCH IT'S PASSIVE DEVICES,
  42. * IF ANY, TO THE APPLICATION. IF PASSIVE DEVICE, JUST DELETE THE
  43. * 1-WORD PASSIVE DEVICE ENTRY IN THE PDCT. COMPLETE BUILDING VCB
  44. * DATA AND MAKE ENTRY IN *VRQ* QUEUE. ISSUE *ABAP* ACCOUNT DAYFIL
  45. * MESSAGE AND DELETE THE PTAC ENTRY.
  46. #
  47.  
  48. #
  49. **** PROC NVFTACC - XREF LIST.
  50. #
  51.  
  52. XREF
  53. BEGIN
  54. PROC ABORT; # ABORT JOB #
  55. PROC MESSAGE; # SEND MESSAGE TO SYSTEM AND USER DAYFILE #
  56. PROC NVFTDSP; # DETERMINE SWITCH POSSIBILITY #
  57. PROC NVFTIAM; # ISSUE ACCOUNT DAYFILE MESSAGE #
  58. PROC NVFUMQE; # TRANSFER TEXT TO QUEUE #
  59. PROC SSTRTS; # REMOVE TABLE SPACE #
  60. END
  61.  
  62. #
  63. ****
  64. #
  65. ITEM ADDR I; # VARIABLE FOR VCB ORDINAL #
  66. ITEM DTYP I; # VARIABLE FOR DEVICE TYPE #
  67. ITEM FIND B; # EXIT LOOP VARIABLE #
  68. ITEM I I; # LOOP VARIABLE #
  69. ITEM J I; # LOOP VARIABLE #
  70. ITEM LNGTH I; # LENGTH OF MESSAGE #
  71. ITEM MATCH B; # EXIT LOOP VARIABLE #
  72. ITEM NENTRY I; # NUMBER OF ENTRIES IN TABLE #
  73. ITEM NUMPAS I; # NUMBER OF PASSIVE DEVICES #
  74. ITEM PD I; # SUBSCRIPT FOR ARRAY PDCT #
  75. ITEM PIDX I; # SUBSCRIPT FOR 1ST PASSIVE DEVCE IN PDCT #
  76. ITEM PT I; # SUBSCRIPT FOR ARRAY PTAC #
  77. ITEM TNAME C(7); # VARIABLE FOR TERMINAL NAME #
  78.  
  79. #
  80. * FOLLOWING ARRAY CONTAINS MESSAGE ISSUED TO THE DAYFILE UPON NOT
  81. * FINDING AN EXPECTED PTAC/PDCT ENTRY.
  82. #
  83. ARRAY DAYMSG[00:00] S(5);
  84. BEGIN
  85. ITEM DAY$MSG1 C(00,00,22) = ["NVFTACC - CANNOT FIND "];
  86. ITEM DAY$TYPE C(02,12,04); # PTAC OR PDCT #
  87. ITEM DAY$MSG2 C(02,36,18) = [" ENTRY FOR TERMNAM"];
  88. ITEM DAY$TNAME C(03,42,07); # TERMINAL NAME #
  89. END
  90.  
  91. SWITCH DTYPSWT:DTSTAT
  92. LLINT : SCON, # LABEL FOR CONSOLE DEVICE TYPE #
  93. LLPASV : SCR, # LABEL FOR CARD READER DEVICE #
  94. LLPASV : SLP, # LABEL FOR LINE PRINTER DEVICE #
  95. LLPASV : SCP, # LABEL FOR CARD PUNCH DEVICE #
  96. LLPASV : SPL, # LABEL FOR PLOTTER DEVICE #
  97. LLINT : SCLP, # LABEL FOR CDCNET LINE PRINTER (PSU) #
  98. LLINT : SUSER; # LABEL FOR USER DEVICE TYPE #
  99.  
  100. #
  101. * SEARCH PTAC TABLE FOR ENTRY THAT MATCHES THIS TERMINAL'S VCB.
  102. * IF NO MATCH, IGNORE SM.
  103. #
  104. MATCH = FALSE;
  105. NENTRY = PTALNGTH / PTACSIZ$; # CALCULATE NUMBER OF ENTRIES #
  106. FOR PT = 0 STEP 1 WHILE (NOT MATCH AND PT LS NENTRY)
  107. DO
  108. BEGIN
  109. IF PTA$VCB[PT] EQ CRVCB[0]
  110. THEN
  111. BEGIN # PTAC ENTRY FOUND #
  112. #
  113. * SAVE SWITCH TIME AND POINT BASE ARRAY TO THE SECOND WORD OF
  114. * *MSGBUF*. THIS LOCATION FOR *VCBBUF* INSURES THAT THE
  115. * INCOMING CR/ACC/SM IS NOT OVERLAYED (I.E., CLOBBERED) AND
  116. * THAT THE SECOND HALF OF *MSGBUF* IS AVAILABLE TO PROC
  117. * *NVFTDSP* FOR GENERATING CR/SWH/SM'S FOR THE PASSIVE DEVICES
  118. * (IF ANY). THIS WILL BE TRUE AS LONG AS THE SIZE OF A VCB
  119. * NEVER HAS TO EXCEED ELEVEN WORDS (CURRENTLY, IT IS EIGHT).
  120. #
  121. PTA$SWTIME[PT] = CTM$PDT[0];
  122. P<VCBBUF> = LOC(MSGBUF[LCRACC]);
  123. #
  124. * IF SYNCHRONOUS DEVICE TYPE, FIND ITS CORRESPONDING ENTRY IN
  125. * THE PDCT TABLE. USE OWNING CONSOLE NAME FOR THE SEARCH IF
  126. * A PASSIVE DEVICE.
  127. #
  128. DTYP = PTA$DT[PT];
  129. IF PTA$TC[PT] GQ TC9$
  130. THEN # SYNCHRONOUS DEVICE TYPE #
  131. BEGIN
  132. TNAME = PTA$TN[PT];
  133. IF (DTYP NQ DT$CONS) AND (DTYP NQ DT$USER)
  134. THEN # PASSIVE DEVICE #
  135. BEGIN
  136. TNAME = PTA$OCN[PT]; # OWNING CONSOLE NAME #
  137. END
  138.  
  139. FIND = FALSE;
  140. FOR I = 0 STEP PDT$WC[I] WHILE (NOT FIND AND I LS PDTLNGTH)
  141. DO
  142. BEGIN
  143. IF PDT$CN[I] EQ TNAME
  144. THEN # FOUND PDCT ENTRY #
  145. BEGIN
  146. PD = I; # SAVE PDCT ENTRY INDEX #
  147. NUMPAS = PDT$WC[I] - PDCTSIZ$; # NUM OF PASSIVE DEVCE #
  148. PIDX = PD + PDCTSIZ$; # INDEX TO 1ST PASSIVE DEVICE #
  149. FIND = TRUE; # EXIT LOOP #
  150. END
  151. END
  152.  
  153. IF NOT FIND
  154. THEN # CANNOT FIND PDCT ENTRY #
  155. BEGIN
  156. DAY$TYPE[0] = "PDCT";
  157. DAY$TNAME[0] = PTA$TN[PT];
  158. MESSAGE(DAYMSG,0); # MSG TO SYSTEM AND USR DAYFILE #
  159. NUMPAS = 0;
  160. END
  161. END
  162.  
  163. GOTO DTYPSWT[DTYP];
  164.  
  165. LLINT: # INTERACTIVE DEVICE TYPE #
  166. #
  167. * CONSOLE OR USER DEVICE TYPE. SAVE VALIDATION DATA IN *VRQ*.
  168. * IF SYNCHRONOUS DEVICE, ALSO SAVE VALIDATION DATA IN IT'S
  169. * CORRESPONDING PDCT ENTRY AND CALL *NVFTDSP* TO SWITCH IT'S
  170. * PASSIVE DEVICES.
  171. #
  172. VCB$CACA[0] = PTA$CACA[PT];
  173. VCB$ALIFAM[0] = PTA$ALIFAM[PT];
  174. VCB$FAMIND[0] = PTA$FAMIND[PT];
  175. VCB$ALIUSR[0] = PTA$ALIUSR[PT];
  176. VCB$USRIND[0] = PTA$USRIND[PT];
  177. VCB$ALIAPP[0] = PTA$ALIAPP[PT];
  178. VCB$APPIND[0] = PTA$APPIND[PT];
  179. VCB$VDSF[0] = PTA$VDSF[PT];
  180. VCB$PRIAN[0] = PTA$PRIAN[PT];
  181. VCB$RCNA[0] = PTA$RCNA[PT];
  182. VCB$LCF[0] = PTA$LCF[PT];
  183.  
  184. IF PTA$TC[PT] GQ TC9$ AND
  185. FIND
  186. THEN # SYNCHRONOUS INTERACTIVE DEVCE #
  187. BEGIN
  188. PDT$CAPP[PD+1] = PTA$SWTAPP[PT];
  189. PDT$CSTAT[PD+1] = PDCTST"CONSWT";
  190. PDT$FWORD[PD+2] = PTA$FWORD[PT];
  191. PDT$UWORD[PD+3] = PTA$UWORD[PT];
  192. PDT$AHMT[PD+4] = PTA$AHMT[PT];
  193. PDT$AHDS[PD+5] = PTA$AHDS[PT];
  194. PDT$AAWC[PD+6] = PTA$AAWC[PT];
  195. PDT$ATWD[PD+7] = PTA$ATWD[PT];
  196. PDT$AAVW[PD+8] = PTA$AAVW[PT];
  197.  
  198. FOR I = 0 STEP 1 UNTIL (NUMPAS - 1)
  199. DO
  200. BEGIN # GET PASSIVE DEVICE'S PTAC #
  201. FIND = FALSE;
  202. FOR J = 0 STEP 1 WHILE (NOT FIND AND J LS NENTRY)
  203. DO
  204. BEGIN
  205. IF (PTA$TN[J] EQ PDT$PN[PIDX+I]) AND
  206. (PTA$OCN[J] EQ PDT$CN[PD])
  207. THEN # FOUND CORRESPONDING PTAC NTRY #
  208. BEGIN
  209. NVFTDSP(J,PD); # DETERMINE SWITCH POSSIBILITY #
  210. FIND = TRUE; # EXIT LOOP #
  211. END
  212. END
  213.  
  214. $BEGIN
  215. IF NOT FIND
  216. THEN # NO CORRESPONDING PTAC ENTRY #
  217. BEGIN
  218. DAY$TYPE[0] = "PTAC";
  219. DAY$TNAME[0] = PDT$PN[PIDX+I];
  220. MESSAGE(DAYMSG,0); # MSG TO SYSTEM AND USR DAYFILE #
  221. END
  222. $END
  223.  
  224. END
  225.  
  226. END
  227.  
  228. GOTO ENDDTYP;
  229.  
  230. LLPASV: # PASSIVE DEVICE TYPE #
  231. #
  232. * PASSIVE DEVICE TYPE. DELETE ENTRY FROM PDCT.
  233. #
  234. FIND = FALSE;
  235. FOR I = 0 STEP 1 WHILE (NOT FIND AND I LS NUMPAS)
  236. DO
  237. BEGIN
  238. IF PDT$PN[PIDX+I] EQ PTA$TN[PT]
  239. THEN # FOUND CORRSPNDING PASSIVE DEV #
  240. BEGIN
  241. SSTRTS(P<PDCT>,PIDX+I,1); # DELETE PASSIVE DEVICE ENTRY #
  242. PDT$WC[PD] = PDT$WC[PD] - 1; # UPDATE PDCT WORD COUNT #
  243. FIND = TRUE; # EXIT LOOP #
  244. END
  245. END
  246.  
  247. GOTO ENDDTYP;
  248.  
  249. ENDDTYP: # COMMON END PROCESSING #
  250. #
  251. * COMPLETE BUILDING *VRQ* DATA, ISSUE *ABAP* ACCOUNT DAYFILE
  252. * MESSAGE AND CALL *SSTRTS* TO DELETE THIS DEVICE'S PTAC ENTRY.
  253. #
  254. VCB$TN[0] = PTA$TN[PT];
  255. VCB$HW[0] = PTA$HW[PT];
  256. VCB$VTP[0] = PTA$VTP[PT];
  257. VCB$ICF[0] = PTA$ICF[PT];
  258. VCB$ALIF[0] = PTA$ALIF[PT];
  259. VCB$VCB[0] = PTA$VCB[PT];
  260. VCB$CNTIME[0] = PTA$CNTIME[PT];
  261. VCB$SWTIME[0] = PTA$SWTIME[PT];
  262. VCB$FWORD[0] = PTA$FWORD[PT];
  263. VCB$UWORD[0] = PTA$UWORD[PT];
  264. VCB$DT[0] = PTA$DT[PT];
  265. VCB$TC[0] = PTA$TC[PT];
  266. VCB$AACN[0] = CRAACN[0];
  267. VCB$SWAPAN[0] = PTA$SWTAN[PT];
  268. VCB$NET[0] = PTA$NET[PT];
  269. VCB$UBZ[0] = PTA$UBZ[PT];
  270. VCB$XBZ[0] = PTA$XBZ[PT];
  271. VCB$DBZ[0] = PTA$DBZ[PT];
  272. VCB$SDT[0] = PTA$SDT[PT];
  273. VCB$DO[0] = PTA$DO[PT];
  274. VCB$SL[0] = PTA$SL[PT];
  275.  
  276. ADDR = PTA$VCB[PT];
  277. LNGTH = VCBSIZ$ * 10; # NUMBER OF CHARACTERS #
  278. NVFUMQE(P<VRQ>,VCBBUF[0],0,ADDR,LNGTH); # WRITE REQUST TO Q #
  279. NVFTIAM(PT,ABAP$); # ISSUE *ABAP* ACCOUNT MESSAGE #
  280. PT = PT * PTACSIZ$;
  281. SSTRTS(P<PTAC>,PT,PTACSIZ$); # DELETE PTAC ENTRY #
  282.  
  283. MATCH = TRUE;
  284. END
  285. END
  286.  
  287. END # END NVFTACC #
  288.  
  289. TERM
cdc/nos2.source/nam5871/nvftacc.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator