User Tools

Site Tools


cdc:nos2.source:nam5871:nvfofvd

NVFOFVD

Table Of Contents

  • [00007] PROC NVFOFVD
  • [00008] FORMAT VCB DATA
  • [00011] FORMAT VCB DATA
  • [00032] FUNC ETIME C(10)
  • [00033] PROC SSBSBF
  • [00034] PROC SSTAQE
  • [00035] PROC SSTRQE
  • [00036] FUNC XCDD U
  • [00037] FUNC XSFW C(10)

Source Code

NVFOFVD.txt
  1. *DECK NVFOFVD
  2. USETEXT TEXTNVF
  3. USETEXT TEXTSS
  4. USETEXT TXCMDNV
  5. USETEXT TXSMNVF
  6. USETEXT TXTAPSS
  7. PROC NVFOFVD;
  8. # TITLE - FORMAT VCB DATA #
  9. BEGIN
  10. #
  11. ** NVFOFVD - FORMAT VCB DATA
  12. *
  13. * D.K. ENDO 82/05/06
  14. * C.J. BRION 83/05/10, 83/11/08.
  15. *
  16. * THIS PROCEDURE FORMAT THE USER/TERM STATUS MESSAGES BASED ON A
  17. * VCBSSQ ENTRY AND THE CURRENT COMMAND.
  18. *
  19. * PROC NVFOFVD
  20. *
  21. * ENTRY 1. VCBSSQ WITH AT LEAST ONE ENTRY.
  22. *
  23. * EXIT 1. USER/TERM STATUS MESSAGE TO THE HOP
  24. * 2. NULL TEXT TO C-LAYER TO CLEAR THE PIPE LINE.
  25. *
  26. #
  27. #
  28. **** PROC NVFOFVD - XREF LIST BEGINS.
  29. #
  30. XREF
  31. BEGIN
  32. FUNC ETIME C(10); # UNPACK PACKED TIME #
  33. PROC SSBSBF; # STORE BIT FIELD #
  34. PROC SSTAQE; # ACCEPT QUIEUE ENTRY #
  35. PROC SSTRQE; # REMOVE QUEUE ENTRY #
  36. FUNC XCDD U; # CONVERT INTEGER TO DECIMAL DISPLAY CODE #
  37. FUNC XSFW C(10); # SPACE FILL A LEFT JUST Z-FILLED NAME #
  38. END
  39. #
  40. ****
  41. #
  42. DEF NTUTXTL # 50 #; # CHAR COUNT OF NO TERM/USER TEXT #
  43. DEF NUTTXTL # 30 #; # CHAR CNT OF TERM/USER NOT CONNECTED TEXT#
  44. DEF STSTXTL # 60 #; # CHAR COUNT OF STATUS MESSAGE TEXT #
  45. DEF TUNTXTL # 30 #; # CHAR CNT OF NO TERM UNDER USER TEXT #
  46.  
  47.  
  48. ITEM CNST1; # CONSTANT ONE #
  49. ITEM CNST2; # CONSTANT TWO #
  50. ITEM CNST3; # CONSTANT THREE #
  51. ITEM CTEMP C(10); # CHARACTER TEMPORARY #
  52. ITEM I; # LOOP INDUCTION VARIALBLE #
  53. ITEM ASENTRY I; # NUMBER AST ENTRIES #
  54. ITEM AS I; # LOCAL AST ENTRY ORDINAL #
  55.  
  56. #
  57.   THIS ARRAY DEFINES THE DEVICE TYPE TABLE. THE DISPLAY CODE NAME
  58.   IS FOUND BY INDEXING INTO THE TABLE WITH THE NUMERIC DT VALUE.
  59. #
  60. DEF DTMAX # 07 #;
  61. ARRAY DT$TABLE [00:DTMAX] S(1);
  62. BEGIN
  63. ITEM DT$VAL C(00,00,10) = ["CON",
  64. "CR",
  65. "LP",
  66. "CP",
  67. "PL",
  68. "SAA",
  69. "MAA",
  70. "DT7"
  71. ];
  72. END
  73.  
  74. #
  75.   THIS BASED ARRAY POINTS TO THE MESSAGE TO BE SENT TO THE HOP.
  76. #
  77. BASED ARRAY MTXT [00:00] S(1);
  78. BEGIN
  79. ITEM MTT$WORD I(00,00,60);
  80. END
  81.  
  82. #
  83.   THIS ARRAY DEFINES THE -NO TERM/USER- MESSAGE TEXT SENT WHEN NO
  84.   TERMINAL OR USER NAME IS FOUND OR CONNECTED TO APPLICATION.
  85. #
  86. ARRAY NTUTXT [00:00] S(5);
  87. BEGIN
  88. ITEM NTU$TXT1 C(00,00,20) = [" NO TERM/USER CONNEC"];
  89. ITEM NTU$TXT2 C(02,00,24) = ["TED TO THIS APPLICATION."];
  90. ITEM NTU$ZBYT U(04,24,36) = [0];
  91. END
  92.  
  93.  
  94. #
  95.   THIS ARRAY DEFINES THE -NO TERM UNDER USER- MESSAGE TEXT SENT WHEN
  96.   USER IS NOT FOUND.
  97. #
  98. ARRAY NUTTXT [00:00] S(3);
  99. BEGIN
  100. ITEM NUT$MSG C(00,00,25) = [" NO TERM UNDER THIS USER."];
  101. ITEM NUT$ZBYT U(02,30,30) = [0];
  102. END
  103.  
  104.  
  105. #
  106.   THIS ARRAY DEFINES THE -TERM/USER NOT CONNECTED- MESSAGE TEXT SENT
  107.   WHEN THE TERM/USER IS NOT FOUND.
  108. #
  109. ARRAY TUNTXT [00:00] S(3);
  110. BEGIN
  111. ITEM TUN$MSG C(00,00,28) = [" THIS TERM IS NOT CONNECTED."];
  112. ITEM TUN$ZBYT U(02,48,12) = [0];
  113. END
  114.  
  115.  
  116. #
  117.   THIS ARRAY DEFINES THE STATUS MESSAGE TEXT FOR THE TERM OR USER.
  118. #
  119. ARRAY STSTXT [00:00] S(6);
  120. BEGIN
  121. ITEM STS$TYP C(00,00,04);
  122. ITEM STS$COLON C(00,24,02) = [": "];
  123. ITEM STS$NAM1 C(00,36,42);
  124. ITEM STS$C1 C(01,18,01) = [","];
  125. ITEM STS$NAM2 C(01,24,42);
  126. ITEM STS$C2 C(02,06,01) = [","];
  127. ITEM STS$LTIME C(02,12,09);
  128. ITEM STS$C3 C(03,06,01) = [","];
  129. ITEM STS$ANAM C(03,12,07);
  130. ITEM STS$S1 C(03,54,01) = ["/"];
  131. ITEM STS$ACN U(04,00,18);
  132. ITEM STS$C4 C(04,18,01) = [","];
  133. ITEM STS$CTIME C(04,24,09);
  134. ITEM STS$C5 C(05,18,01) = [","];
  135. ITEM STS$DT C(05,24,03);
  136. ITEM STS$ZBYT U(05,42,18) = [0];
  137. END
  138. CONTROL EJECT;
  139. # #
  140. # NVFOFVD CODE BEGINS HERE #
  141. # #
  142.  
  143. #
  144. * DETERMINE NUMBER AST ENTRIES.
  145. #
  146. ASENTRY = ASTLNGTH/ASTSIZ$;
  147.  
  148. #
  149. * FOR EACH ENTRY IN THE VCBSSQ, CHECK IF THE END FLAG IS SET.
  150. #
  151. P<TVCBSSQ> = LOC(NVFSM);
  152. FOR I=0 WHILE VSSLNGTH GR 0
  153. DO
  154. BEGIN
  155. SSTRQE(P<VCBSSQ>,WCBUF[0],ABHBUF[0],NVFSM);
  156.  
  157. #
  158. * IF THE END FLAG IS NOT SET, FORMAT THE STATUS TEXT. IF IT IS A
  159. * TERMINAL STATUS COMMAND FORMAT THE TEXT AND SEND IT TO THE HOP,
  160. * OTHERWISE FORMAT THE USER TEXT AND SEND IT TO THE HOP.
  161. #
  162. IF NOT TSS$VENDF[0]
  163. THEN
  164. BEGIN
  165. DATA$ = TRUE;
  166. IF CRNT$CMD EQ SSA$ OR
  167. CRNT$CMD EQ SSU$ OR
  168. CRNT$CMD EQ STT$
  169. THEN
  170. BEGIN
  171. STS$TYP[0] = "TERM";
  172. CNST1 = 0;
  173. CNST2 = 36;
  174. CNST3 = 42;
  175. SSBSBF(STSTXT,CNST1,CNST2,CNST3,B<0,42>TSS$TN[0]);
  176.  
  177. CTEMP = XSFW(TSS$UWORD[0]);
  178. CNST1 = 1;
  179. CNST2 = 24;
  180. SSBSBF(STSTXT,CNST1,CNST2,CNST3,B<0,42>CTEMP);
  181. END
  182. ELSE
  183. BEGIN
  184. STS$TYP[0] = "USER";
  185. CTEMP = XSFW(TSS$UWORD[0]);
  186. CNST1 = 0;
  187. CNST2 = 36;
  188. CNST3 = 42;
  189. SSBSBF(STSTXT,CNST1,CNST2,CNST3,B<0,42>CTEMP);
  190. CNST1 = 1;
  191. CNST2 = 24;
  192. SSBSBF(STSTXT,CNST1,CNST2,CNST3,B<0,42>TSS$TN[0]);
  193. END
  194.  
  195. CTEMP = ETIME(TSS$LTIME[0]);
  196. CNST1 = 2;
  197. CNST2 = 12;
  198. CNST3 = 54;
  199. SSBSBF(STSTXT,CNST1,CNST2,CNST3,CTEMP);
  200.  
  201. IF TSS$SWAPNM[0] NQ "NVF"
  202. THEN
  203. BEGIN
  204. FOR AS = 0 STEP 1 WHILE
  205. (AS LS ASENTRY AND
  206. TSS$SWAPNM[0] NQ AST$PANAM[AS])
  207. DO
  208. BEGIN
  209. END
  210. STS$ANAM[0] = TSS$SWAPNM[0];
  211. END
  212. ELSE
  213. BEGIN
  214. STS$ANAM[0] = "NVF";
  215. END
  216.  
  217. STS$ACN[0] = XCDD(1000 + TSS$AACN);
  218.  
  219. IF TSS$CATIME[0] NQ 0
  220. THEN
  221. BEGIN
  222. CTEMP = ETIME(TSS$CATIME[0]);
  223. END
  224. ELSE
  225. BEGIN
  226. CTEMP = ETIME(TSS$LTIME[0]);
  227. END
  228. CNST1 = 4;
  229. CNST2 = 24;
  230. SSBSBF(STSTXT,CNST1,CNST2,CNST3,CTEMP);
  231. STS$DT[0] = DT$VAL[TSS$DT[0]];
  232. WCB$WORD[1] = 0;
  233. WCB$WC[1] = 2 + STSTXTL/10;
  234. ABHWORD[1] = 0;
  235. ABHABT[1] = HOPTX$;
  236. SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],STSTXT);
  237. END
  238.  
  239. #
  240. * THE END FLAG AND THE LAST APPLICATION FLAG IS SET THEREFORE
  241. * CHECK THE ERROR CODE FIELD. IF EC IS ONE,
  242. * (NO VCB-S FOUND) AND NO PTAC DATA FOUND EITHER, THEN SEND MESSAGE
  243. * INDICATING NO TERM/USER CONNECTED. IF EC ES TWO,(ABORT COMMAND)
  244. * CLEAR THE ABORT COMMAND FLAG. SEND A NULL TEXT TO THE C-LAYER TO
  245. * CLEAN THE PIPE LINE. CLEAR THE COMMAND IN PROGRESS FLAG.
  246. #
  247. ELSE
  248. BEGIN
  249.  
  250. IF TSS$EC[0] EQ SSEC"NOMATCH" AND
  251. NOT DATA$ AND
  252. TSS$APENDF[0]
  253. THEN
  254. BEGIN
  255.  
  256. WCB$WORD[1] = 0;
  257.  
  258. IF CRNT$CMD EQ SSA$ OR
  259. CRNT$CMD EQ SUA$
  260. THEN
  261. BEGIN
  262. WCB$WC[1] = 2 + NTUTXTL/10;
  263. P<MTXT> = LOC(NTUTXT);
  264. END
  265. ELSE IF CRNT$CMD EQ SSU$ OR
  266. CRNT$CMD EQ STU$
  267. THEN
  268. BEGIN
  269. WCB$WC[1] = 2 + NUTTXTL/10;
  270. P<MTXT> = LOC(NUTTXT);
  271. END
  272. ELSE
  273. BEGIN # ELSE IF CRNT COMMAND IS STT #
  274. WCB$WC[1] = 2 + TUNTXTL/10;
  275. P<MTXT> = LOC(TUNTXT);
  276. END
  277.  
  278. ABHWORD[1] = 0;
  279. ABHABT[1] = HOPTX$;
  280.  
  281. SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],MTXT);
  282. END
  283.  
  284.  
  285. ELSE IF TSS$EC[0] EQ SSEC"ABRT"
  286. THEN
  287. BEGIN
  288. ABORTCMDF = FALSE;
  289. END
  290. #
  291. * ONLY IF THE END FLAG AND THE LAST APPL FLAG SET, SEND
  292. * HOP TEXT TO CAUSE THE READY.. MESSAGE.
  293. #
  294. IF TSS$VENDF[0] AND TSS$APENDF[0]
  295. THEN
  296. BEGIN
  297. WCB$WORD[1] = 0;
  298. WCB$IAF[1] = TRUE;
  299. WCB$WC[1] = 2;
  300. ABHWORD[1] = 0;
  301. ABHABT[1] = HOPTX$;
  302. SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],NVFSM);
  303. CMDINPGF = FALSE;
  304. END
  305. END
  306. END
  307. RETURN; # **** RETURN **** #
  308. END # NVFOFVD #
  309. TERM
cdc/nos2.source/nam5871/nvfofvd.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator