cdc:nos2.source:nam5871:nvfsnon
Table of Contents
NVFSNON
Table Of Contents
- [00009] PROC NVFSNON
- [00010] NVFSNON - APPLICATION NETON REQUEST (NET/ON SM)
- [00014] APPLICATION NETON REQUEST (NET/ON SM).
- [00054] PROC SSTAQE
- [00055] PROC NVFUMQE
- [00056] PROC SSTETS
- [00057] PROC SSTRTS
- [00058] PROC NVFUGSN
- [00059] PROC SSCCTR
- [00283] PROC NORMNET(PAI,ERRSTAT)
- [00284] NORMNET - PROCESS NORMAL NETON REQUEST
- [00288] NORMNET - PROCESS NORMAL NETON REQUEST.
- [00353] PROC SPECNET(PAI,SAI,RC)
- [00354] SPECNET - PROCESS SPECIAL NETON REQUEST
- [00358] SPECNET - PROCESS SPECIAL NETON REQUEST.
- [00492] PROC GENAST(PAST,SAST)
- [00493] GENAST - GENERATE AST ENTRY.
- [00497] GENAST - GENERATE AST ENTRY.
Source Code
- NVFSNON.txt
- *DECK NVFSNON
- USETEXT TEXTNVF
- USETEXT TXSMNVF
- USETEXT TXTAPSS
- USETEXT TXTSUSS
- USETEXT TEXTSS
- USETEXT TXTANVF
- PROC NVFSNON;
- # TITLE NVFSNON - APPLICATION NETON REQUEST (NET/ON SM) #
- BEGIN # NVFSNON #
- #
- ** NVFSNON - APPLICATION NETON REQUEST (NET/ON SM).
- *
- * E. THAVIKULWAT 81/12/31
- * C. BRION 83/04/15, 83/06/23, 83/11/09.
- *
- * THIS PROCEDURE VERIFIES THE NET/ON REQUEST. IT IS CALLED INTO
- * EXECUTION BY PROCEDURE *NVFSDQE*.
- *
- * PROC NVFSNON
- *
- * ENTRY:
- * NET/ON SM IN *MSGBUF*
- *
- * EXIT:
- * NET/ON/N OR NET/ON/A RESPONSE SENT TO *OTQ* QUEUE.
- * NET/ON/N OR NET/ON/A ENTRY MAY BE SENT TO THE TAINPQ OR THE
- * AAINPQ.
- *
- * INTERNAL PROCEDURES:
- *
- * NORMNET - PROCESS NORMAL NETON REQUESTS.
- * SPECNET - PROCESS SPECIAL NETON REQUESTS.
- * GENAST - GENERATE AST ENTRY.
- *
- * METHOD:
- *
- * IF A NORMAL NETON IS RECEIVED, A CALL IS MADE TO THE
- * INTERNAL PROCEDURE NORMNET TO PROCESS THE NETON REQUEST.
- *
- * IF A SPECIAL NETON IS RECEIVED (A NETON FOR A REQUEST START-
- * ABLE APPLICATION, A SOLICITED NETON FOR A REQUEST STARTABLE
- * APPLICATION OR A REQUEST FOR A MAX COPY GREATER THAN 1 TYPE
- * OF APPLICATION) A CALL IS MADE TO SPECNET FOR PROCESSING.
- #
- #
- **** PROC NVFSNON - XREF LIST.
- #
- XREF
- BEGIN
- PROC SSTAQE; # SS - ACCEPT QUEUE ENTRY #
- PROC NVFUMQE; # TRANSFER SM OR TEXT TO QUEUE #
- PROC SSTETS; # SS - ENLARGE TABLE SPACE #
- PROC SSTRTS; # SS - RELEASE TABLE SPACE #
- PROC NVFUGSN; # GENERATE SECONDARY APPLICATION NAME #
- PROC SSCCTR; # SS - CANCEL TIMER #
- END
- #
- ****
- #
- *CALL SMSGNVF
- ITEM AS I; # SUBSCRIPT FOR ARRAY AST #
- ITEM I I; # LOOP VARIABLE #
- ITEM MATCH B; # EXIT LOOP VARIABLE #
- ITEM NENTRY I; # NUMBER OF ENTRIES IN TABLE #
- ITEM SORD I; # SEC AST ORDINAL #
- ITEM SECMATCH B; # SEC AST MATCH FLAG #
- ITEM PORD I; # PRI AST ORDINAL #
- ITEM LORD I; # LOOP AST ORDINAL #
- ITEM RSTART B; # REQUEST STARTABLE INDICATOR #
- ITEM RCNET I; # LOCAL NETON REASON CODE #
- ITEM CANOK B; # TIMER CANCEL OK FLAG #
- CONTROL EJECT;
- #
- * CLEAR RESPONSE BUFFER, PRESET ERROR CODE TO "INVALID
- * APPLICATION", SET REQUEST STATABLE INDICATOR.
- #
- SPMSG0[1] = 0;
- SPMSG1[1] = 0;
- NETANAM[1] = NETANAM[0];
- NETRC[1] = RNO"IA";
- RSTART = FALSE;
- #
- * SEARCH *AST* TABLE FOR ENTRY THAT MATCHES THE APPLICATION NAME.
- #
- NENTRY = ASTLNGTH / ASTSIZ$; # CALCULATE NUMBER OF ENTRIES #
- FOR I = 0 STEP 1 WHILE
- (I LS NENTRY) AND
- (AST$ANAM[I] NQ NETANAM[0])
- DO
- BEGIN
- END
- #
- * IF NO MATCH FOUND, THEN INVALID APPLICATION NETON.
- * GOTO END EXIT TO COMPLETE ABNORMAL NETON PROCESSING.
- #
- IF I EQ NENTRY
- THEN
- GOTO ENDEXIT;
- #
- * MATCHING AST ENTRY FOUND.
- * SET THE AST ENTRY ORDINALS (LOCAL, PRIMARY,SECONDARY).
- * CLEAR THE NETON REASON CODE.
- * CLASSIFY THE NETON REQUEST AND CALL THE APPROPRIATE
- * PROCEDURE FOR PROCESSING.
- #
- AS = I;
- PORD = AS;
- SORD = AS;
- RCNET = 0;
- IF ((NOT AST$SNPF[PORD]) AND
- (NOT AST$RS[PORD]) AND
- (AST$MXCOP[PORD] EQ 1))
- THEN
- #
- * UNSOLICITED NETON REQUEST.
- #
- BEGIN
- NORMNET(PORD,RCNET);
- NETRC[1] = RCNET;
- END
- ELSE
- #
- * SOLICITED REQUEST MEANING THAT EITHER NVF CAUSED THE NETON VIA
- * A ROUTE OF A REQUEST STARTABLE APPLICATION OR A REQUEST STARTABLE
- * APPLICATION NETTED ON ON ITS OWN OR THE NETTING ON APPLICATION
- * IS A MXCOPYS GREATER THAN 1 TYPE OF APPLICATION.
- #
- BEGIN
- SPECNET(PORD,SORD,RCNET);
- NETRC[1] = RCNET;
- END
- ENDEXIT:
- #
- * CHECK THE REASON CODE. IF NO ERRORS, CHECK FOR SECONDARY AST
- * ENTRY. IF IT EXISTS, SET THE SEC AST ENTRY FROM THE NET/ON/R SM.
- * IF NO SEC AST ENTRY, SET THE PRIMARY AST ENTRY.
- #
- IF NETRC[1] EQ 0
- THEN
- BEGIN
- IF SORD NQ PORD
- THEN
- BEGIN
- AST$AN[SORD] = NETAN[0];
- AST$JSN[SORD] = NETJSN[0];
- AST$AAL[SORD] = NETACCL[0];
- AST$MCN[SORD] = NETMCN[0];
- AST$CUCOP[SORD] = 1;
- # IF THE NUMBER OF THE REVERVED-CONNECTION IS NOT 0, THE APP#
- # WANTS TO RESERVE SOME CONNECTIONS FOR OUTGOING. SET FLAG #
- # TO REMEMBER THIS FACT. #
- IF NETNRCN[0] NQ 0
- THEN
- BEGIN # CALCULATE INCOMING CONNECTIONS ALLOWED #
- AST$MXICN[SORD] = NETMCN[0] - NETNRCN[0];
- AST$RICN[SORD] = TRUE; #THIS APP RESTRICTS INCOMING CON#
- END
- AST$MCN[PORD] = (NETMCN[0] * AST$CUCOP[PORD]);
- END
- ELSE # NO SEC AST ENTRY #
- BEGIN
- AST$AN[PORD] = NETAN[0];
- AST$JSN[PORD] = NETJSN[0];
- AST$AAL[PORD] = NETACCL[0];
- AST$MCN[PORD] = NETMCN[0];
- IF NETNRCN[0] NQ 0
- THEN
- BEGIN # CALCULATE INCOMING CONNECTIONS ALLOWED #
- AST$MXICN[PORD] = NETMCN[0] - NETNRCN[0];
- AST$RICN[PORD] = TRUE; #THIS APP RESTRICTS INCOMING CON#
- END
- END
- IF AST$SNPF[PORD]
- THEN
- BEGIN
- AST$SNPF[PORD] = FALSE;
- AST$PNCOP[PORD] = 0;
- END
- #
- * SET UP THE EVENT FOR THE TA AND AA INPUT QUEUE AS WELL AS
- * THE NET/ON/N SM.
- #
- WCB$SMID[1] = CTQSTAT"SNETN";
- PFCSFC[1] = NETONN;
- NETPRU[1] = AST$PRUF[PORD];
- NETXFER[1] = AST$XFERF[PORD];
- NETK[1] = AST$KDSPF[PORD];
- ASM$TYPE[0] = "NETTED ON";
- IF SORD NQ PORD
- THEN
- BEGIN
- ASM$ANAME[0] = AST$PANAM[SORD];
- NETANAM[1] = AST$PANAM[SORD];
- END
- ELSE
- BEGIN
- ASM$ANAME[0] = AST$PANAM[PORD];
- NETANAM[1] = AST$PANAM[PORD];
- END
- #
- * ROUTE EVENT TO UNSOLICITED EVENT QUEUE.
- #
- NVFUMQE(P<USQ>,ASMBUF[0],APMSG,0,LMSH40$);
- END
- ELSE # ERROR OCCURRED #
- #
- * ERROR HAS OCCURRED. SET NET/ON/A PFC-SFC, CHECK FOR CASES WHERE
- * AN AST ENTRY WAS FOUND (NON RNO"IA" CASES). IF SEC AST ENTRY EXISTS
- * AND NOT A REQUEST START BY NVF, RELEASE THE AST ENTRY.
- #
- BEGIN
- PFCSFC[1] = NETONA;
- WCB$SMID[1] = CTQSTAT"SNETA";
- IF NETRC[1] NQ RNO"IA"
- THEN
- BEGIN
- IF SORD NQ PORD
- THEN
- BEGIN
- IF NOT RSTART
- THEN
- BEGIN
- SORD = SORD * ASTSIZ$;
- SSTRTS(P<AST>,SORD,ASTSIZ$);
- END
- END
- END
- END
- #
- * SET UP REST OF NET/ON RESPONSE SM. SEND RESPONSE SM.
- #
- NETAN[1] = NETAN[0];
- NVFUMQE(P<OTQ>,APSM[1],APPCMD,0,LNETONR);
- #
- * IF REQUEST START BY NVF, THEN MUST SEND THE EVENT TO THE TA
- * AND AA INPUT QUEUES FOR PROCESSING OF POSSIBLE PENDING CON-
- * NECTIONS.
- #
- IF RSTART
- THEN
- BEGIN
- IF AST$TCAN[SORD] NQ 0 THEN
- BEGIN
- SSCCTR(AST$TCAN[SORD],CANOK);
- AST$TCAN[SORD] = 0;
- END
- WCB$WC[1] = LNETONR + 2;
- ABHABT[1] = APPCMD;
- SSTAQE(P<TAINPQ>,WCBUF[1],ABHBUF[1],APSM[1]);
- SSTAQE(P<AAINPQ>,WCBUF[1],ABHBUF[1],APSM[1]);
- END
- RETURN;
- CONTROL EJECT;
- PROC NORMNET(PAI,ERRSTAT);
- # TITLE - NORMNET - PROCESS NORMAL NETON REQUEST #
- BEGIN # NORMNET #
- #
- ** NORMNET - PROCESS NORMAL NETON REQUEST.
- *
- * C. BRION 83/10/19.
- *
- * THIS INTERNAL PROCEDURE PROCESSES NETON REQUESTS THAT ARE
- * NOT A RESULT OF AN NVF ROUTE REQUEST OR FROM A REQUEST
- * STARTABLE TYPE OF APPLICATION OR FROM A MXCOPY GREATER
- * THAN 1 TYPE OF APPLICATION.
- *
- * NORMNET(PIA,ERRSTAT)
- *
- * ENTRY:
- * PAI = PRIMARY AST ENTRY INDEX.
- *
- * THE GLOBAL DEFINITIONS IN EFFECT FOR NORMNET.
- *
- * EXIT:
- * ERRSTAT = ERROR STATUS. NON=ZERO INDICATES A NETON ABNORMAL.
- #
- CONTROL EJECT;
- ITEM PAI I; # LOCAL PRI AST ENTRY INDEX #
- ITEM ERRSTAT I; # ERROR STATUS (NETON RC) #
- ERRSTAT = 0;
- IF (NETANAM[0] EQ "CS" OR
- NETANAM[0] EQ "NS") AND
- (NOT NETPU[0])
- THEN
- BEGIN
- ERRSTAT = RNO"NPR"; # CS AND NS MUST BE A SYSTEM #
- END # CONTROL POINT JOB #
- ELSE IF (AST$PPF[PAI]) AND
- (NOT NETPP[0])
- THEN
- BEGIN
- ERRSTAT = RNO"NPR"; # APPL MUST BE PRIVILEDGED #
- END # AND IS NOT #
- ELSE IF (AST$AN[PAI] NQ 0)
- THEN
- BEGIN
- ERRSTAT = RNO"DUP"; # APPLICATION ALREADY ON #
- END
- ELSE IF AST$DIF[PAI]
- THEN
- BEGIN
- ERRSTAT = RNO"DIS"; # APPL DISABLED #
- END
- ELSE IF AST$DNF[PAI]
- THEN
- BEGIN
- ERRSTAT = RNO"NNA"; # APPL DOWN, LAST NETOFF OR #
- END # FAIL APPL NOT DONE #
- #
- * IF NO ERRORS, INCREMENT NUMBER CURRENT COPIES FOR APPL.
- #
- IF ERRSTAT EQ 0
- THEN
- AST$CUCOP[PAI] = 1;
- END # NORMNET #
- CONTROL EJECT;
- PROC SPECNET(PAI,SAI,RC);
- # TITLE - SPECNET - PROCESS SPECIAL NETON REQUEST #
- BEGIN # SPECNET #
- #
- ** SPECNET - PROCESS SPECIAL NETON REQUEST.
- *
- * C. BRION 83/10/19.
- *
- * THIS INTERNAL PROCEDURE PROCESSES NETON REQUESTS THAT ARE FROM
- * EITHER A REQUEST STARTABLE TYPE OF APPLICATION, A MXCOPY
- * GREATER THAN 1 TYPE OF APPLICATION OR FROM A REQUEST STARTABLE
- * APPLICATION THAT WAS INITIATED BY AN NVF ROUTE REQUEST.
- *
- * SPECNET(PAI,SAI,RC)
- *
- * ENTRY:
- * PAI = PRIMARY AST ENTRY INDEX
- *
- * EXIT:
- * SAI = SECONDARY AST ENTRY INDEX
- * RC = RETURN CODE (NON-ZERO INDICATES ERROR.
- * RSTART = REQUEST STARTABLE INDICATOR.
- *
- * THE GLOBAL DEFINITIONS OF NVFSNON ARE IN EFFECT.
- #
- CONTROL EJECT;
- ITEM PAI I; # PRIMARY AST ENTRY INDEX #
- ITEM SAI I; # SECONDARY AST ENTRY INDEX #
- ITEM RC I; # RETURN ERROR CODE #
- ITEM LAI I; # LOCAL AST ENTRY INDEX #
- ITEM SECFOUND B; # SEC AST ENTRY FOUND FLAG #
- #
- * ATTEMPT TO LOCATE A SECONDARY AST ENTRY BY MATCHING THE PRIMARY
- * APPLICATION NAME OF THE PRIMARY AST TO THE SECONDARY NAME OF THE
- * OTHER AST ENTRIES AND MAKE SURE THE PRIMARY NAMES DO NOT MATCH
- * SO AS TO AVOID MATCHING ON THE PRIMARY ENTRY.
- #
- SAI = PAI;
- SECFOUND = FALSE;
- RSTART = FALSE;
- FOR LAI = 0 STEP 1 WHILE
- ((LAI LS NENTRY) AND
- (NOT SECFOUND))
- DO
- BEGIN
- IF ((AST$UPANAM[PAI] EQ AST$USANAM[LAI]) AND
- (AST$USANAM[LAI] NQ AST$UPANAM[LAI]) AND
- (AST$AN[LAI] EQ 0))
- THEN
- BEGIN
- SECFOUND = TRUE;
- AST$AN[LAI] = NETAN[0];
- SAI = LAI;
- END
- END
- #
- * CHECK IF PRIMARY APPLICATION IS EITHER DISABLED, DOWN OR
- * AT MAX COPIES.
- * IF SO, THEN NETON ABNORMAL MUST BE SENT. SET RETURN CODE.
- #
- IF AST$DIF[PAI]
- THEN
- BEGIN
- RC = RNO"DIS";
- GOTO ERREXIT;
- END
- IF AST$DNF[PAI]
- THEN
- BEGIN
- RC = RNO"NNA";
- GOTO ERREXIT;
- END
- IF ((AST$MXCOP[PAI] EQ AST$CUCOP[PAI]) AND NOT AST$SNPF[PAI])
- THEN
- BEGIN
- RC = RNO"DUP";
- GOTO ERREXIT;
- END
- IF AST$PPF[PAI] AND NOT NETPP[0]
- THEN
- BEGIN # APPL MUST BE PRIVILEDGED #
- RC = RNO"NPR"; # AND IS NOT, REJECT NETON.#
- GOTO ERREXIT;
- END
- #
- * IF NO NETON PENDING AND MXCOPY GREATER THAN 1 WHICH INDICATES
- * THAT A SECONDARY AST ENTRY MUST BE BUILT. CALL INTERNAL PROC
- * GENAST TO BUILD AND INITIALIZE THE SECONDARY AST ENTRY. RESET
- * RSTART GLOBAL SO AS TO KNOW IN MAINLINE IF SEC AST ENTRY BUILT
- * OR NOT. CALL NVFUGSN TO BUILD AND INSTALL SECONDARY APPLICATION
- * NAME IN SEC AST ENTRY IF MAX COPIES GR THAN 1.
- #
- IF AST$MXCOP[PAI] GR 1
- THEN
- BEGIN
- IF NOT AST$SNPF[PAI]
- THEN
- BEGIN
- GENAST(PAI,SAI);
- AST$AN[SAI] = NETAN[0];
- END
- ELSE
- BEGIN
- RSTART = TRUE;
- AST$CUCOP[PAI] = AST$CUCOP[PAI] + 1;
- END
- NVFUGSN(SAI);
- END
- ELSE
- #
- * IF MAX COPY EQUAL 1 THEN A PRIMARY REQUEST STARTABLE TYPE
- * OF APPLICATION NETTING ON. SET THE NUMBER OF CURRENT COPIES
- * TO 1. CHECK IF THE APPL WAS CAUSED TO START UP BY
- * NVF. IF SO, SET THE REQUEST START FLAG FOR LATER.
- #
- BEGIN
- AST$CUCOP[PAI] = 1;
- IF AST$SNPF[PAI]
- THEN
- BEGIN
- RSTART = TRUE;
- END
- END
- ERREXIT:
- END # SPECNET #
- CONTROL EJECT;
- PROC GENAST(PAST,SAST);
- # TITLE - GENAST - GENERATE AST ENTRY. #
- BEGIN # GENAST #
- #
- ** GENAST - GENERATE AST ENTRY.
- *
- * C. BRION 83/05/20, 10/21/83.
- *
- * THIS PROCEDURE IS INTERNAL TO NVFSNON. IT GENERATES A SECONDARY
- * AST ENTRY FOR A PRIMARY MULTIPLE COPY TYPE OF APPLICATION.
- *
- * GENAST(PAST,SAST)
- *
- * ENTRY:
- * PAST = THE PRIMARY AST ENTRY ORDINAL.
- * SAST = THE SECONDARY AST ENTRY ORDIANL.
- *
- * EXIT:
- * SAST = THE ORDINAL OF THE NEWLY GENERATED AST ENTRY.
- #
- CONTROL EJECT;
- ITEM POSAST I; # AST POS FOR SSTETS CALL #
- ITEM PAST I; # PRIMARY AST ENTRY ORDINAL #
- ITEM SAST I; # SECONDARY AST ENTRY ORDINAL #
- #
- * CALCULATE POSITION IN AST WHERE SEC AST ENTRY SHOULD BE TO
- * FOLLOW THE PRIMARY AST ENTRY.
- * SET THE ENTRY ORDINAL.
- * ENLARGE TABLE SPACE.
- #
- POSAST = (PAST + 1) * ASTSIZ$;
- SAST = (POSAST/ASTSIZ$);
- SSTETS(P<AST>,POSAST,ASTSIZ$);
- #
- * INITIALIZE SEC AST ENTRY.
- * INCREMENT NUMBER CURRENT COPIES OF PRI AST ENTRY.
- #
- AST$WORD1[SAST] = AST$WORD1[PAST];
- AST$WORD2[SAST] = AST$WORD2[PAST];
- AST$TACN[SAST] = 0;
- AST$AACN[SAST] = 0;
- AST$RACN[SAST] = 0;
- AST$ICCN[SAST] = 0;
- AST$RS[SAST] = FALSE;
- AST$WORD0[SAST] = 0;
- AST$WORD3[SAST] = 0;
- AST$WORD4[SAST] = 0;
- AST$SANAM[SAST] = AST$PANAM[PAST];
- AST$MXCOP[SAST] = 1;
- AST$CUCOP[SAST] = 1;
- AST$JSN[SAST] = " ";
- AST$AN[SAST] = NETAN[0];
- AST$CUCOP[PAST] = AST$CUCOP[PAST] + 1;
- NENTRY = (ASTLNGTH/ASTSIZ$);
- END # GENAST #
- END # NVFSNON #
- TERM
cdc/nos2.source/nam5871/nvfsnon.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator