User Tools

Site Tools


cdc:nos2.source:nam5871:nvfopss

NVFOPSS

Table Of Contents

  • [00007] PROC NVFOPSS
  • [00008] PREPARE STATUS SEARCH.
  • [00011] PREPARE STATUS SEARCH.
  • [00035] PROC MESSAGE
  • [00036] PROC ABORT
  • [00042] PROC NVFUZFW
  • [00043] PROC SSTAQE
  • [00087] DEBTXT - DEBUG TEXT ARRAY.

Source Code

NVFOPSS.txt
  1. *DECK NVFOPSS
  2. USETEXT TEXTNVF
  3. USETEXT TEXTSS
  4. USETEXT TXCMDNV
  5. USETEXT TXSMNVF
  6. USETEXT TXTAPSS
  7. PROC NVFOPSS;
  8. # TITLE - PREPARE STATUS SEARCH. #
  9. BEGIN
  10. #
  11. ** NVFOPSS - PREPARE STATUS SEARCH.
  12. *
  13. * D.K. ENDO 82/05/06
  14. * C.J. BRION 83/04/27. 83/05/10. 83/11/08.
  15. *
  16. * THIS PROCEDURE ACTIONS A STATUS COMMAND THAT REQUIRES A SEARCH OF
  17. * THE PTAC TABLE AND/OR THE VCB FILE.
  18. *
  19. * PROC NVFOPSS
  20. *
  21. * ENTRY 1. STATUS COMMAND
  22. *
  23. * EXIT 1. PTAC DATA TO THE VCBSSQ.
  24. * 2. VCB SEARCH REQUEST TO VSQ.
  25. *
  26. #
  27.  
  28. #
  29. **** PROC NVFOPSS - XREF LIST BEGINS.
  30. #
  31.  
  32. $BEGIN
  33. XREF
  34. BEGIN
  35. PROC MESSAGE;
  36. PROC ABORT;
  37. END
  38. $END
  39.  
  40. XREF
  41. BEGIN
  42. PROC NVFUZFW; # ZERO FILL WORD #
  43. PROC SSTAQE; # ACCEPT QUEUE ENTRY #
  44. END
  45. #
  46. ****
  47. #
  48.  
  49.  
  50. DEF APPWRD # HDR$TXWCNT[1]+3 #; # ORDINAL FOR APPL NAME #
  51. DEF TRMWRD # HDR$TXWCNT[1]+2 #; # ORDINAL FOR TERMINAL NAME #
  52. DEF USRWRD1 #HDR$TXWCNT[1]+2 #; # ORDINAL FOR USER NAME(STU) #
  53. DEF USRWRD2 #HDR$TXWCNT[1]+3 #; # ORDINAL FOR USER NAME(SSU) #
  54. DEF CIPTXTL # 50 #; # CHAR COUNT OF -COMMAND IN PROGRESS- TEXT#
  55.  
  56.  
  57.  
  58. ITEM NUMAP; # NUMBER APPLICATION INTERATIONS #
  59. ITEM I; # LOOP INDUCTION VARIABLE #
  60. ITEM SAORD; # SECONDARY AST LOOP VARIABLE #
  61.  
  62. #
  63.   THIS ARRAY DEFINES THE -COMMAND IN PROGRESS- TEXT SENT WHEN A
  64.   STATUS IS REQUESTED AND THE SERIAL SEARCHER IS BUSY.
  65. #
  66. ARRAY CIPTXT [00:00] S(5);
  67. BEGIN
  68. ITEM CT$MSG1 C(00,00,30) =[" PREVIOUS COMMAND INCOMPLETE, "];
  69. ITEM CT$MSG2 C(03,00,10) = ["TRY AGAIN."];
  70. ITEM CT$ZBYT U(04,00,60) = [0];
  71. END
  72.  
  73.  
  74. #
  75.   THIS ARRAY IS USED TO STORE VALUE TO SEARCH FOR IN THE PTAC AND
  76.   THE VCB FILE.
  77. #
  78. ARRAY CTEMP$WORD [00:00] S(1);
  79. BEGIN
  80. ITEM CTEMP C(00,00,07);
  81. ITEM CTEMP$ZERO U(00,42,18) = [0];
  82. ITEM CTEMP10 U(00,00,60);
  83. END
  84.  
  85. $BEGIN
  86. #
  87. ** DEBTXT - DEBUG TEXT ARRAY.
  88. #
  89. ARRAY DEBTXT[00:00] S(4);
  90. BEGIN
  91. ITEM DEB$RTN C(00,00,10)=["NVFOPSS: "];
  92. ITEM DEB$TXT C(01,00,20);
  93. ITEM DEBZB U(03,00,60)=[0];
  94. END
  95.  
  96. $END
  97.  
  98.  
  99.  
  100. CONTROL EJECT;
  101. # #
  102. # NVFOPSS CODE BEGINS HERE #
  103. # #
  104. #
  105. * IF THERE IS CURRENTLY A COMMAND IN PROGRESS, THEN TAKE NO ACTION,
  106. * OTHERWISE CHECK IF THE SERIAL SEARCHER IS BUSY.
  107. #
  108.  
  109. IF NOT CMDINPGF
  110. THEN
  111. BEGIN
  112. IF NOT SSBUSYF
  113. THEN
  114. BEGIN
  115.  
  116.  
  117. #
  118. * IF SERIAL SEARCHER IS NOT BUSY, THEN SET THE COMMAND IN PROGRESS
  119. * FLAG, AND SELECT THE CASE THAT APPLIES:
  120. #
  121. CMDINPGF = TRUE;
  122. DATA$ = FALSE;
  123.  
  124.  
  125. WCB$WORD[1] = 0;
  126. ABHWORD[1] = 0;
  127.  
  128.  
  129. P<TVCBSSQ> = LOC(NVFSM[1]);
  130. P<TVSQ> = LOC(NVFSM[1]);
  131.  
  132.  
  133. SPMSG0[1] = 0;
  134.  
  135.  
  136. #
  137. * IF THE COMMAND IS STATUS ALL TERMINALS CONNECTED TO AN APPLICATION
  138. * OR ALL USERS CONNECTED TO AN APPLICATION THEN SEARCH THE AST TO
  139. * FIND THE AST ENTRY FOR THIS APPLICATION. SEND A VCB SEARCH
  140. * REQUEST LOOKING FOR ALL ENTRIES THAT MATCH THE APPLICATION NUMBER
  141. * OF THIS APPLICATION.
  142. #
  143. IF CRNT$CMD EQ SSA$ OR
  144. CRNT$CMD EQ SUA$
  145. THEN
  146. BEGIN
  147.  
  148.  
  149. IF PAR$ELNAME[APPWRD] EQ "NVF"
  150. THEN
  151. BEGIN
  152. WCB$WC[1] = 5;
  153.  
  154. TSS$EC[0] = SSEC"NOERROR";
  155. TSS$VENDF[0] = FALSE;
  156. TSS$APENDF[0] = FALSE;
  157. FOR I=0 STEP 1 WHILE I LS PTALNGTH/PTACSIZ$
  158. DO
  159. BEGIN
  160. IF PTA$TNAM[I] NQ 0
  161. THEN
  162. BEGIN
  163. SPMSG0[1] = 0;
  164. TSS$TN[0] = PTA$TN[I];
  165. TSS$DT[0] = PTA$DT[I];
  166. TSS$UWORD[0] = PTA$UWORD[I];
  167.  
  168. SPMSG2[1] = 0;
  169. TSS$LTIME[0] = PTA$CNTIME[I];
  170. TSS$CATIME[0] = PTA$SWTIME[I];
  171. TSS$AACN[0] = PTA$ACN[I];
  172. TSS$SWAPNM[0] = "NVF";
  173. SSTAQE(P<VCBSSQ>,WCBUF[1],ABHBUF[1],NVFSM[1]);
  174. END
  175. END
  176.  
  177. SPMSG2[1] = 0;
  178. IF PTALNGTH/PTACSIZ$ EQ 0
  179. THEN
  180. BEGIN
  181. TSS$EC[0] = SSEC"NOMATCH";
  182. END
  183. TSS$VENDF[0] = TRUE;
  184. TSS$APENDF[0] = TRUE;
  185. SSTAQE(P<VCBSSQ>,WCBUF[1],ABHBUF[1],NVFSM[1]);
  186. END
  187.  
  188. ELSE
  189. BEGIN
  190.  
  191.  
  192. FOR I=0 STEP 1 WHILE AST$ANAM[I] NQ PAR$ELNAME[APPWRD]
  193. DO
  194. BEGIN
  195. END
  196.  
  197. #
  198. * CHECK IF PRIMARY APPLICATION WITH ACTIVE SECONDARY AST ENTRIES.
  199. * IF SO, GENERATE VCB SERIAL REQUEST FOR EACH APPLICATION AND MARK
  200. * THE LAST REQUEST WITH LAST APPLICATION FLAG.
  201. * IF NO ACTIVE SECONDARY ENTRIES, GENERATE REQUEST FOR PRIMARY
  202. * APPLICATION WHICH WILL RESULT IN NO ENTRIES.
  203. #
  204. WCB$WC[1] = 5;
  205. TVS$WORDP[0] = WPOSA$;
  206. TVS$SGLEF[0] = FALSE;
  207. TVS$MASK[0] = MASKA$;
  208.  
  209. IF AST$SANAM[I] EQ AST$PANAM[I] AND
  210. AST$MXCOP[I] NQ 1 AND
  211. AST$CUCOP[I] NQ 0
  212. THEN
  213. BEGIN
  214.  
  215. NUMAP = AST$CUCOP[I];
  216. FOR SAORD = 0 STEP 1 WHILE
  217. (SAORD LS (ASTLNGTH/ASTSIZ$))
  218. DO
  219. BEGIN
  220. IF ((AST$PANAM[I] EQ AST$SANAM[SAORD]) AND
  221. (AST$PANAM[SAORD] NQ AST$SANAM[SAORD]) AND
  222. (AST$AN[SAORD] NQ 0))
  223. THEN
  224. BEGIN
  225.  
  226. NUMAP = NUMAP - 1;
  227. TVS$VALUE[0] = AST$AN[SAORD];
  228. IF NUMAP NQ 0
  229. THEN
  230. TVS$APENDF[0] = FALSE;
  231. ELSE
  232. TVS$APENDF[0] = TRUE;
  233. SSTAQE(P<VSQ>,WCBUF[1],ABHBUF[1],NVFSM[1]);
  234. END
  235. END
  236. END
  237. ELSE # NO SECONDARY ENTRIES #
  238. BEGIN
  239. TVS$VALUE[0] = AST$AN[I];
  240. TVS$APENDF[0] = TRUE;
  241. SSTAQE(P<VSQ>,WCBUF[1],ABHBUF[1],NVFSM[1]);
  242. END
  243. END
  244. END
  245.  
  246.  
  247. #
  248. * IF THE CURRENT COMMAND IS STATUS A TERMINAL, SEARCH THE PTAC TABLE
  249. * FOR THE TERMINAL NAME, AND IF FOUND FOR A VCBSSQ ENTRY FROM THE
  250. * PTAC ENTRY AND SEND IT TO THE VCBSSQ. IF NOT FOUND THEN MAKE
  251. * A VSQ ENTRY TO SEARCH FOR THE TERMINAL NAME WITH THE SINGLE ENTRY
  252. * FLAG SET.
  253. #
  254. ELSE IF CRNT$CMD EQ STT$
  255. THEN
  256. BEGIN
  257.  
  258.  
  259. WCB$WC[1] = 5;
  260. CTEMP[0] = PAR$ELNAME[TRMWRD];
  261.  
  262.  
  263. FOR I=0 STEP 1 WHILE PTA$TN[I] NQ CTEMP[0] AND
  264. I LS PTALNGTH/PTACSIZ$
  265. DO
  266. BEGIN
  267. END
  268.  
  269.  
  270. IF I LS PTALNGTH/PTACSIZ$
  271. THEN
  272. BEGIN
  273. SPMSG0[1] = 0;
  274. TSS$TN[0] = PTA$TN[I];
  275. TSS$DT[0] = PTA$DT[I];
  276. TSS$UWORD[0] = PTA$UWORD[I];
  277. SPMSG2[1] = 0;
  278. TSS$LTIME[0] = PTA$CNTIME[I];
  279. TSS$CATIME[0] = PTA$SWTIME[I];
  280. TSS$AACN[0] = PTA$ACN[I];
  281. SSTAQE(P<VCBSSQ>,WCBUF[1],ABHBUF[1],NVFSM[1]);
  282. TSS$VENDF[0] = TRUE;
  283. TSS$APENDF[0] = TRUE;
  284. SSTAQE(P<VCBSSQ>,WCBUF[1],ABHBUF[1],NVFSM[1]);
  285. END
  286.  
  287.  
  288. ELSE
  289.  
  290.  
  291. BEGIN
  292. WCB$WC[1] = 5;
  293. TVS$WORDP[0] = WPOST$;
  294. TVS$SGLEF[0] = TRUE;
  295. TVS$VALUE[0] = CTEMP10[0];
  296. TVS$MASK[0] = MASKT$;
  297. TVS$APENDF[0] = TRUE;
  298. SSTAQE(P<VSQ>,WCBUF[1],ABHBUF[1],NVFSM[1]);
  299. END
  300. END
  301.  
  302. #
  303. * IF THE CURRENT COMMAND IS STATUS OF USER OR ALL TERMINALS UNDER
  304. * A USER THEN, FOR EACH PTAC ENTRY THAT MATCHES THIS USER NUMBER
  305. * FORMAT A VCBSSQ ENTRY AND SEND IT TO THE VCBSSQ. MAKE A VCB
  306. * SEARCH REQUEST FOR THIS USER NUMBER AND THE SINGLE ENTRY FLAG
  307. * CLEARED.
  308. #
  309. ELSE
  310. BEGIN
  311. IF CRNT$CMD EQ STU$
  312. THEN
  313. BEGIN
  314. CTEMP[0] = PAR$ELNAME[USRWRD1];
  315. END
  316. ELSE
  317. BEGIN
  318. CTEMP[0] = PAR$ELNAME[USRWRD2];
  319. END
  320. NVFUZFW(CTEMP$WORD);
  321.  
  322. TSS$APENDF[0] = FALSE;
  323. FOR I=0 STEP 1 WHILE I LS PTALNGTH/PTACSIZ$
  324. DO
  325. BEGIN
  326. IF CTEMP[0] EQ PTA$UNUM[I]
  327. THEN
  328. BEGIN
  329. WCB$WC[1] = 5;
  330. SPMSG0[1] = 0;
  331.  
  332. TSS$TN[0] = PTA$TN[I];
  333. TSS$DT[0] = PTA$DT[I];
  334. TSS$UWORD[0] = PTA$UWORD[I];
  335.  
  336. SPMSG2[1] = 0;
  337. TSS$LTIME[0] = PTA$CNTIME[I];
  338. TSS$CATIME[0] = PTA$SWTIME[I];
  339. TSS$AACN[0] = PTA$ACN[I];
  340.  
  341. SSTAQE(P<VCBSSQ>,WCBUF[1],ABHBUF[1],NVFSM[1]);
  342. END
  343. END
  344.  
  345. WCB$WC[1] = 5;
  346. SPMSG0[1] = 0;
  347. TVS$WORDP[0] = WPOSU$;
  348. TVS$SGLEF[0] = FALSE;
  349. TVS$VALUE[0] = CTEMP10[0];
  350. TVS$MASK[0] = MASKU$;
  351. TVS$APENDF[0] = TRUE;
  352. SSTAQE(P<VSQ>,WCBUF[1],ABHBUF[1],NVFSM[1]);
  353. END
  354. END
  355.  
  356.  
  357. #
  358. * IF THE SERIAL SEARCHER IS BUSY, SEND MESSAGE TO HOP INDICATING A
  359. * COMMAND IS STILL IN PROGRESS.
  360. #
  361. ELSE
  362. BEGIN
  363. WCB$WC[1] = CIPTXTL/10 + 2;
  364. ABHABT[1] = HOPTX$;
  365. SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],CIPTXT);
  366. END
  367. END
  368.  
  369.  
  370. RETURN; # **** RETURN **** #
  371. END # NVFOPSS #
  372. TERM
cdc/nos2.source/nam5871/nvfopss.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator