cdc:nos2.source:nam5871:nvfucrs
Table of Contents
NVFUCRS
Table Of Contents
- [00008] PROC NVFUCRS (PORD,RORD,RSTAT,CTYP)
- [00009] NVFUCRS - CHECK REQUEST STARTABLE STATUS
- [00012] CHECK REQUEST STARTABLE STATUS.
- [00040] PROC SSTETS
- [00041] PROC NVFUZFW
- [00042] PROC MESSAGE
- [00043] PROC NVFUMQE
- [00044] PROC SSCATR
- [00066] DSPBUF - DSP ROUTE FUNCTION PARAMETER BLOCK.
- [00113] TMBBUF - TIMER REQUEST BUFFER.
Source Code
- NVFUCRS.txt
- *DECK NVFUCRS
- USETEXT TEXTNVF
- USETEXT TEXTSS
- USETEXT TXTANVF
- USETEXT TXTAPSS
- USETEXT TXTSUSS
- USETEXT TXSANVF
- PROC NVFUCRS (PORD,RORD,RSTAT,CTYP);
- # TITLE - NVFUCRS - CHECK REQUEST STARTABLE STATUS #
- BEGIN # NVFUCRS #
- #
- ** NVFUCRS - CHECK REQUEST STARTABLE STATUS.
- *
- * C. BRION 83/04/13, 83/06/27, 83/08/30, 83/09/08.
- * 83/11/09.
- *
- * THIS PROCEDURE IS RESPONSIBLE FOR CHECKING IF AN APPLICATION
- * IS REQUEST STARTABLE OR IF AN APPLICATION HAS ALREADY BEEN
- * STARTED UP AND WE ARE AWAITING THE NETON FOR THE CONNECTION.
- * THIS PROCEDURE ALSO LOCATES THE SECONDARY APPL ENTRY FOR AN
- * APPLICATION THAT CAN HAVE MORE THAN ONE COPY RUNNING, BUT IS
- * NOT REQUEST STARTABLE.
- *
- * PROC NVFUCRS(PORD,RORD,RSTAT,CTYP)
- *
- * ENTRY
- * PORD = ORDINAL OF PRIMARY AST ENTRY.
- * CTYP = CONNECTION TYPE OF CALLER (AA OR TA).
- * EXIT
- * RORD = RETURN ORDINAL OF SECONDARY (OR PRIMARY) AST ENTRY.
- * RSTAT = RETURN STATUS.
- #
- #
- **** PROC NVFUCRS XREF LIST
- #
- XREF
- BEGIN
- PROC SSTETS; # SS - ENLARGE TABLE SPACE #
- PROC NVFUZFW; # ZERO FILL WORD #
- PROC MESSAGE; # ISSUE DAYFILE MESSAGE #
- PROC NVFUMQE; # MAKE QUEUE ENTRY #
- PROC SSCATR; # START TIMER #
- END
- #
- ****
- #
- #
- * DEFS, ITEMS, ARRAYS
- #
- ITEM RSTAT I; # RETURN STATUS #
- ITEM PORD I; # PRIMARY AST ENTRY ORDINAL #
- ITEM MATCH B; # LOOP EXIT INDICATOR #
- ITEM RORD I; # RETURN AST ORDINAL #
- ITEM CTYP I; # CONNECTION TYPE OF CALLER #
- ITEM NENTRY I; # NUMBER AST ENTRIES #
- ITEM LEN I; # LENGTH OF ENTRY #
- ITEM LORD I; # LOOP AST ORDINAL #
- ITEM POSAST I; # AST WORD POSITION #
- ITEM TOTALCN I; # TOTAL NO OF CONN. APP HAS #
- #
- ** DSPBUF - DSP ROUTE FUNCTION PARAMETER BLOCK.
- *
- * PARAMETER BLOCK FOR TRIGGERING THE ROUTE FUNCTION DSP CALL IN
- * NVFTICR.
- #
- ARRAY DSPBUF [00:00] S(DSPVSIZ$);
- BEGIN
- ITEM DSP$WORD U(00,00,60);
- ITEM DSP$FC U(00,00,06) = [DSPROUTE$]; # INTERNAL FXTION #
- ITEM DSP$RES0 U(00,06,54) = [0];
- ITEM DSP$FNAME C(01,00,07); # FILE NAME #
- ITEM DSP$ERR U(01,42,05) = [0];
- ITEM DSP$NERR B(01,47,01) = [TRUE]; # NO ABORT IF ERROR #
- ITEM DSP$FSOT B(01,48,01) = [TRUE]; # FORCE ORIGIN FLAG #
- ITEM DSP$RES1 U(01,49,04) = [0];
- ITEM DSP$FSOC U(01,53,06) = [0]; # SYOT ORIG CODE = 0 #
- ITEM DSP$CBIT B(01,59,01) = [0];
- ITEM DSP$RES2 U(02,00,12) = [0];
- ITEM DSP$FORMS U(02,12,12) = [O"0200"]; # FORCE IF JOB ERROR #
- ITEM DSP$DISP C(02,24,02) = ["IN"]; # DISP CODE = INPUT #
- ITEM DSP$RES4 U(02,36,03) = [0];
- ITEM DSP$SCF B(02,39,01) = [0]; # FORCE SERV CLASS #
- ITEM DSP$RES5 U(02,40,02) = [0];
- ITEM DSP$FLAGS U(02,42,18) = [O"400020"]; # FLAG SETTING #
- ITEM DSP$WORD3 U(03,00,60) = [0];
- ITEM DSP$WORD4 U(04,00,60) = [0];
- ITEM DSP$SPACE U(05,00,12) = [0];
- ITEM DSP$SERCL C(05,12,02) = ["NS"]; # NS SERVICE CLASS #
- ITEM DSP$RES3 U(05,24,36) = [0];
- ITEM DSP$WORD5 U(06,00,60) = [0];
- ITEM DSP$WORD6 U(07,00,60) = [0];
- ITEM DSP$WORD7 U(08,00,60) = [0];
- END
- #
- * XTEMP - TEMP APPLICATION NAME CELL.
- #
- ARRAY XTEMP [00:00] S(1);
- BEGIN
- ITEM XTEMP$NAME C(00,00,07);
- ITEM XTEMP2 U(00,42,18) = [0];
- ITEM XTEMP10 U(00,00,60);
- END
- #
- ** TMBBUF - TIMER REQUEST BUFFER.
- *
- * BUFFER CONTAINING THE TIMER INFO. SET UP TO CONTAIN
- * THE FC/INACT SM WHICH IS RETURNED TO THE ASQ WHEN THE
- * TIMER EXPIRES
- #
- DEF ASTIME$ #1#;
- ARRAY TMBBUF[00:00] S(TMBSIZ$);
- BEGIN
- ITEM TMB$SMID S:ASQSTAT(00,00,12) = [S"TIMEOUT"];
- ITEM TMB$WC U(00,48,12) = [TMBSIZ$];
- ITEM TMB$ABT U(01,00,06) = [APPCMD];
- ITEM TMB$CNUM U(01,18,18);
- ITEM TMB$PFCSFC U(02,00,16) = [FCINA];
- ITEM TMB$ACN U(02,24,12) = [0];
- ITEM TMB$DELAY U(03,24,18);
- ITEM TMB$QNUM U(03,42,18);
- END
- CONTROL EJECT;
- #
- * CHECK IF REQUESTED APPLICATION IS DISABLED, DOWN. IF SO, RETURN
- * WITH CONNECTION NOT POSSIBLE STATUS.
- #
- RSTAT = CONNOK$;
- IF AST$DIF[PORD] OR AST$DNF[PORD]
- THEN
- BEGIN
- RSTAT = NOCONN$;
- RORD = PORD;
- GOTO ENDEXIT;
- END
- #
- * CHECK IF COPY OF APPLICATION ALREADY PENDING NETON. IF SO, CHECK
- * THE ORIGIN TYPE OF CALLER THEN INCREMENT THE NUMBER PENDING CON-
- * NECTIONS FOR THE AST ENTRY.
- #
- IF AST$SNPF[PORD]
- THEN
- BEGIN
- RSTAT = NETP$;
- RORD = PORD;
- GOTO ENDEXIT;
- END
- #
- * CHECK IF COPY OF APPLICATION ALREADY NETTED ON AND ABLE TO SUP-
- * PORT ANOTHER CONNECTION. IF SO, THEN SIMPLY EXIT SINCE RETURN
- * STATUS ALREADY SET TO CONNECTION OK.
- #
- MATCH = FALSE;
- NENTRY = (ASTLNGTH/ASTSIZ$);
- FOR LORD = 0 STEP 1 WHILE
- (LORD LS NENTRY AND NOT MATCH)
- DO
- BEGIN
- IF (AST$PANAM[PORD] EQ AST$SANAM[LORD]) AND #SEC APPL FOUND#
- (AST$JSN[LORD] NQ " ") AND
- (NOT AST$DIF[LORD]) AND # NOT DISABLE #
- (NOT AST$DNF[LORD]) # NOT DOWN #
- THEN
- BEGIN
- #
- * CHECK AST ENTRY TO SEE IF THIS SEC APPL CAN ACCEPT ANY MORE
- * CONNECTIONS. IT CAN ACCEPT MORE CONNECTIONS IF THE FOLLOWING
- * CODITIONS ARE MET:
- * 1. THE CURRENT NUMBER OF CONNECTION IS LESS THAN THE TOTAL CONN
- * ALLOWED.
- * 2. EITHER THE APPLICATION DOES NOT RESTRICT THE NUMBER OF
- * CONNECTIONS, OR THE CURRENT NO OF CONNECTIONS HAS NOT
- * REACHED THE LIMIT ALLOWED.
- #
- TOTALCN = AST$TACN[LORD] + AST$AACN[LORD] + AST$RACN[LORD];
- MATCH = (TOTALCN LS AST$MCN[LORD]) AND
- ( (NOT AST$RICN[LORD]) OR
- (AST$ICCN[LORD] LS AST$MXICN[LORD]));
- IF MATCH
- THEN
- BEGIN
- RORD = LORD;
- GOTO ENDEXIT;
- END
- END
- END
- #
- * AT THIS POINT, THERE EXISTS NO SECONDARY APPLICATION COPY THAT
- * CAN SUPPORT THE CONNECTION. THEREFORE, CHECK IF THE PRIMARY
- * APPLICATION IS REQUEST STARTABLE AND IF NOT AT MAXIMUM NUMBER OF
- * COPIES. IF BOTH OF THESE CHECKS ARE TRUE, A NEW COPY OF THE
- * APPLICATION MUST BE CAUSED TO NETON. IF THE NUMBER OF MAXIMUM
- * COPIES IS GREATER THAN ONE, A NEW AST ENTRY IS ALLOCATED AND
- * INITIALIZED. THE RETURN STATUS IS SET TO NETON PENDING.
- * THE DSP PARAMETER BLOCK IS THEN SET AND THE DSP ROUTE REQUEST
- * IS SET UP AND THE DSP REQUEST ENTRY MADE TO THE CPM/DSP/PFM RE-
- * QUEST QUEUE.
- #
- IF NOT AST$RS[PORD]
- THEN # NOT A REQUEST STARTABLE APPLICATION #
- BEGIN
- RSTAT = NOCONN$;
- RORD = PORD;
- END
- ELSE IF AST$MXCOP[PORD] GR AST$CUCOP[PORD]
- THEN
- BEGIN
- IF AST$MXCOP[PORD] GR 1
- THEN
- BEGIN
- POSAST = (PORD + 1) * ASTSIZ$;
- SSTETS(P<AST>,POSAST,ASTSIZ$);
- RORD = PORD + 1;
- NENTRY = (ASTLNGTH/ASTSIZ$);
- AST$WORD0[RORD] = 0;
- AST$WORD1[RORD] = AST$WORD1[PORD];
- AST$WORD2[RORD] = AST$WORD2[PORD];
- AST$TACN[RORD] = 0;
- AST$AACN[RORD] = 0;
- AST$RACN[RORD] = 0;
- AST$RS[RORD] = FALSE;
- AST$CUCOP[RORD] = 0;
- AST$MXCOP[RORD] = 1;
- AST$SNPF[RORD] = FALSE;
- AST$SANAM[RORD] = AST$PANAM[PORD];
- END
- ELSE
- RORD = PORD;
- AST$SNPF[PORD] = TRUE;
- RSTAT = NETP$;
- XTEMP$NAME[0] = AST$PANAM[PORD];
- NVFUZFW(XTEMP);
- DSP$FNAME[0] = XTEMP$NAME[0];
- P<CRQBUF> = LOC(DSPBUF);
- LEN = DSPVSIZ$ * 10;
- NVFUMQE(P<CPMRQ>,CRQBUF[0],APPTTX$,0,LEN);
- # SET AUTOSTART TIMER #
- TMB$QNUM[0] = LOC(P<ASQ>);
- TMB$DELAY[0] = NETPTIME$ + ASTIME$;
- SSCATR(TMBBUF[0]);
- AST$TCAN[RORD] = TMB$CNUM[0];
- END
- ELSE # AT MAX COPY LIMIT #
- BEGIN
- RSTAT = MCLIMIT$;
- RORD = PORD;
- END
- ENDEXIT:
- END # NVFUCRS #
- TERM
cdc/nos2.source/nam5871/nvfucrs.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator