cdc:nos2.source:nam5871:nvfopss
Table of Contents
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
- *DECK NVFOPSS
- USETEXT TEXTNVF
- USETEXT TEXTSS
- USETEXT TXCMDNV
- USETEXT TXSMNVF
- USETEXT TXTAPSS
- PROC NVFOPSS;
- # TITLE - PREPARE STATUS SEARCH. #
- BEGIN
- #
- ** NVFOPSS - PREPARE STATUS SEARCH.
- *
- * D.K. ENDO 82/05/06
- * C.J. BRION 83/04/27. 83/05/10. 83/11/08.
- *
- * THIS PROCEDURE ACTIONS A STATUS COMMAND THAT REQUIRES A SEARCH OF
- * THE PTAC TABLE AND/OR THE VCB FILE.
- *
- * PROC NVFOPSS
- *
- * ENTRY 1. STATUS COMMAND
- *
- * EXIT 1. PTAC DATA TO THE VCBSSQ.
- * 2. VCB SEARCH REQUEST TO VSQ.
- *
- #
- #
- **** PROC NVFOPSS - XREF LIST BEGINS.
- #
- $BEGIN
- XREF
- BEGIN
- PROC MESSAGE;
- PROC ABORT;
- END
- $END
- XREF
- BEGIN
- PROC NVFUZFW; # ZERO FILL WORD #
- PROC SSTAQE; # ACCEPT QUEUE ENTRY #
- END
- #
- ****
- #
- DEF APPWRD # HDR$TXWCNT[1]+3 #; # ORDINAL FOR APPL NAME #
- DEF TRMWRD # HDR$TXWCNT[1]+2 #; # ORDINAL FOR TERMINAL NAME #
- DEF USRWRD1 #HDR$TXWCNT[1]+2 #; # ORDINAL FOR USER NAME(STU) #
- DEF USRWRD2 #HDR$TXWCNT[1]+3 #; # ORDINAL FOR USER NAME(SSU) #
- DEF CIPTXTL # 50 #; # CHAR COUNT OF -COMMAND IN PROGRESS- TEXT#
- ITEM NUMAP; # NUMBER APPLICATION INTERATIONS #
- ITEM I; # LOOP INDUCTION VARIABLE #
- ITEM SAORD; # SECONDARY AST LOOP VARIABLE #
- #
- THIS ARRAY DEFINES THE -COMMAND IN PROGRESS- TEXT SENT WHEN A
- STATUS IS REQUESTED AND THE SERIAL SEARCHER IS BUSY.
- #
- ARRAY CIPTXT [00:00] S(5);
- BEGIN
- ITEM CT$MSG1 C(00,00,30) =[" PREVIOUS COMMAND INCOMPLETE, "];
- ITEM CT$MSG2 C(03,00,10) = ["TRY AGAIN."];
- ITEM CT$ZBYT U(04,00,60) = [0];
- END
- #
- THIS ARRAY IS USED TO STORE VALUE TO SEARCH FOR IN THE PTAC AND
- THE VCB FILE.
- #
- ARRAY CTEMP$WORD [00:00] S(1);
- BEGIN
- ITEM CTEMP C(00,00,07);
- ITEM CTEMP$ZERO U(00,42,18) = [0];
- ITEM CTEMP10 U(00,00,60);
- END
- $BEGIN
- #
- ** DEBTXT - DEBUG TEXT ARRAY.
- #
- ARRAY DEBTXT[00:00] S(4);
- BEGIN
- ITEM DEB$RTN C(00,00,10)=["NVFOPSS: "];
- ITEM DEB$TXT C(01,00,20);
- ITEM DEBZB U(03,00,60)=[0];
- END
- $END
- CONTROL EJECT;
- # #
- # NVFOPSS CODE BEGINS HERE #
- # #
- #
- * IF THERE IS CURRENTLY A COMMAND IN PROGRESS, THEN TAKE NO ACTION,
- * OTHERWISE CHECK IF THE SERIAL SEARCHER IS BUSY.
- #
- IF NOT CMDINPGF
- THEN
- BEGIN
- IF NOT SSBUSYF
- THEN
- BEGIN
- #
- * IF SERIAL SEARCHER IS NOT BUSY, THEN SET THE COMMAND IN PROGRESS
- * FLAG, AND SELECT THE CASE THAT APPLIES:
- #
- CMDINPGF = TRUE;
- DATA$ = FALSE;
- WCB$WORD[1] = 0;
- ABHWORD[1] = 0;
- P<TVCBSSQ> = LOC(NVFSM[1]);
- P<TVSQ> = LOC(NVFSM[1]);
- SPMSG0[1] = 0;
- #
- * IF THE COMMAND IS STATUS ALL TERMINALS CONNECTED TO AN APPLICATION
- * OR ALL USERS CONNECTED TO AN APPLICATION THEN SEARCH THE AST TO
- * FIND THE AST ENTRY FOR THIS APPLICATION. SEND A VCB SEARCH
- * REQUEST LOOKING FOR ALL ENTRIES THAT MATCH THE APPLICATION NUMBER
- * OF THIS APPLICATION.
- #
- IF CRNT$CMD EQ SSA$ OR
- CRNT$CMD EQ SUA$
- THEN
- BEGIN
- IF PAR$ELNAME[APPWRD] EQ "NVF"
- THEN
- BEGIN
- WCB$WC[1] = 5;
- TSS$EC[0] = SSEC"NOERROR";
- TSS$VENDF[0] = FALSE;
- TSS$APENDF[0] = FALSE;
- FOR I=0 STEP 1 WHILE I LS PTALNGTH/PTACSIZ$
- DO
- BEGIN
- IF PTA$TNAM[I] NQ 0
- THEN
- BEGIN
- SPMSG0[1] = 0;
- TSS$TN[0] = PTA$TN[I];
- TSS$DT[0] = PTA$DT[I];
- TSS$UWORD[0] = PTA$UWORD[I];
- SPMSG2[1] = 0;
- TSS$LTIME[0] = PTA$CNTIME[I];
- TSS$CATIME[0] = PTA$SWTIME[I];
- TSS$AACN[0] = PTA$ACN[I];
- TSS$SWAPNM[0] = "NVF";
- SSTAQE(P<VCBSSQ>,WCBUF[1],ABHBUF[1],NVFSM[1]);
- END
- END
- SPMSG2[1] = 0;
- IF PTALNGTH/PTACSIZ$ EQ 0
- THEN
- BEGIN
- TSS$EC[0] = SSEC"NOMATCH";
- END
- TSS$VENDF[0] = TRUE;
- TSS$APENDF[0] = TRUE;
- SSTAQE(P<VCBSSQ>,WCBUF[1],ABHBUF[1],NVFSM[1]);
- END
- ELSE
- BEGIN
- FOR I=0 STEP 1 WHILE AST$ANAM[I] NQ PAR$ELNAME[APPWRD]
- DO
- BEGIN
- END
- #
- * CHECK IF PRIMARY APPLICATION WITH ACTIVE SECONDARY AST ENTRIES.
- * IF SO, GENERATE VCB SERIAL REQUEST FOR EACH APPLICATION AND MARK
- * THE LAST REQUEST WITH LAST APPLICATION FLAG.
- * IF NO ACTIVE SECONDARY ENTRIES, GENERATE REQUEST FOR PRIMARY
- * APPLICATION WHICH WILL RESULT IN NO ENTRIES.
- #
- WCB$WC[1] = 5;
- TVS$WORDP[0] = WPOSA$;
- TVS$SGLEF[0] = FALSE;
- TVS$MASK[0] = MASKA$;
- IF AST$SANAM[I] EQ AST$PANAM[I] AND
- AST$MXCOP[I] NQ 1 AND
- AST$CUCOP[I] NQ 0
- THEN
- BEGIN
- NUMAP = AST$CUCOP[I];
- FOR SAORD = 0 STEP 1 WHILE
- (SAORD LS (ASTLNGTH/ASTSIZ$))
- DO
- BEGIN
- IF ((AST$PANAM[I] EQ AST$SANAM[SAORD]) AND
- (AST$PANAM[SAORD] NQ AST$SANAM[SAORD]) AND
- (AST$AN[SAORD] NQ 0))
- THEN
- BEGIN
- NUMAP = NUMAP - 1;
- TVS$VALUE[0] = AST$AN[SAORD];
- IF NUMAP NQ 0
- THEN
- TVS$APENDF[0] = FALSE;
- ELSE
- TVS$APENDF[0] = TRUE;
- SSTAQE(P<VSQ>,WCBUF[1],ABHBUF[1],NVFSM[1]);
- END
- END
- END
- ELSE # NO SECONDARY ENTRIES #
- BEGIN
- TVS$VALUE[0] = AST$AN[I];
- TVS$APENDF[0] = TRUE;
- SSTAQE(P<VSQ>,WCBUF[1],ABHBUF[1],NVFSM[1]);
- END
- END
- END
- #
- * IF THE CURRENT COMMAND IS STATUS A TERMINAL, SEARCH THE PTAC TABLE
- * FOR THE TERMINAL NAME, AND IF FOUND FOR A VCBSSQ ENTRY FROM THE
- * PTAC ENTRY AND SEND IT TO THE VCBSSQ. IF NOT FOUND THEN MAKE
- * A VSQ ENTRY TO SEARCH FOR THE TERMINAL NAME WITH THE SINGLE ENTRY
- * FLAG SET.
- #
- ELSE IF CRNT$CMD EQ STT$
- THEN
- BEGIN
- WCB$WC[1] = 5;
- CTEMP[0] = PAR$ELNAME[TRMWRD];
- FOR I=0 STEP 1 WHILE PTA$TN[I] NQ CTEMP[0] AND
- I LS PTALNGTH/PTACSIZ$
- DO
- BEGIN
- END
- IF I LS PTALNGTH/PTACSIZ$
- THEN
- BEGIN
- SPMSG0[1] = 0;
- TSS$TN[0] = PTA$TN[I];
- TSS$DT[0] = PTA$DT[I];
- TSS$UWORD[0] = PTA$UWORD[I];
- SPMSG2[1] = 0;
- TSS$LTIME[0] = PTA$CNTIME[I];
- TSS$CATIME[0] = PTA$SWTIME[I];
- TSS$AACN[0] = PTA$ACN[I];
- SSTAQE(P<VCBSSQ>,WCBUF[1],ABHBUF[1],NVFSM[1]);
- TSS$VENDF[0] = TRUE;
- TSS$APENDF[0] = TRUE;
- SSTAQE(P<VCBSSQ>,WCBUF[1],ABHBUF[1],NVFSM[1]);
- END
- ELSE
- BEGIN
- WCB$WC[1] = 5;
- TVS$WORDP[0] = WPOST$;
- TVS$SGLEF[0] = TRUE;
- TVS$VALUE[0] = CTEMP10[0];
- TVS$MASK[0] = MASKT$;
- TVS$APENDF[0] = TRUE;
- SSTAQE(P<VSQ>,WCBUF[1],ABHBUF[1],NVFSM[1]);
- END
- END
- #
- * IF THE CURRENT COMMAND IS STATUS OF USER OR ALL TERMINALS UNDER
- * A USER THEN, FOR EACH PTAC ENTRY THAT MATCHES THIS USER NUMBER
- * FORMAT A VCBSSQ ENTRY AND SEND IT TO THE VCBSSQ. MAKE A VCB
- * SEARCH REQUEST FOR THIS USER NUMBER AND THE SINGLE ENTRY FLAG
- * CLEARED.
- #
- ELSE
- BEGIN
- IF CRNT$CMD EQ STU$
- THEN
- BEGIN
- CTEMP[0] = PAR$ELNAME[USRWRD1];
- END
- ELSE
- BEGIN
- CTEMP[0] = PAR$ELNAME[USRWRD2];
- END
- NVFUZFW(CTEMP$WORD);
- TSS$APENDF[0] = FALSE;
- FOR I=0 STEP 1 WHILE I LS PTALNGTH/PTACSIZ$
- DO
- BEGIN
- IF CTEMP[0] EQ PTA$UNUM[I]
- THEN
- BEGIN
- WCB$WC[1] = 5;
- SPMSG0[1] = 0;
- TSS$TN[0] = PTA$TN[I];
- TSS$DT[0] = PTA$DT[I];
- TSS$UWORD[0] = PTA$UWORD[I];
- SPMSG2[1] = 0;
- TSS$LTIME[0] = PTA$CNTIME[I];
- TSS$CATIME[0] = PTA$SWTIME[I];
- TSS$AACN[0] = PTA$ACN[I];
- SSTAQE(P<VCBSSQ>,WCBUF[1],ABHBUF[1],NVFSM[1]);
- END
- END
- WCB$WC[1] = 5;
- SPMSG0[1] = 0;
- TVS$WORDP[0] = WPOSU$;
- TVS$SGLEF[0] = FALSE;
- TVS$VALUE[0] = CTEMP10[0];
- TVS$MASK[0] = MASKU$;
- TVS$APENDF[0] = TRUE;
- SSTAQE(P<VSQ>,WCBUF[1],ABHBUF[1],NVFSM[1]);
- END
- END
- #
- * IF THE SERIAL SEARCHER IS BUSY, SEND MESSAGE TO HOP INDICATING A
- * COMMAND IS STILL IN PROGRESS.
- #
- ELSE
- BEGIN
- WCB$WC[1] = CIPTXTL/10 + 2;
- ABHABT[1] = HOPTX$;
- SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],CIPTXT);
- END
- END
- RETURN; # **** RETURN **** #
- END # NVFOPSS #
- TERM
cdc/nos2.source/nam5871/nvfopss.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator