*DECK NVFTDSP USETEXT TEXTNVF USETEXT TEXTSS USETEXT TXSMNVF USETEXT TXTANVF USETEXT TXTAPSS USETEXT TXTSUSS PROC NVFTDSP((PT),(PD)); # TITLE NVFTDSP - DETERMINE SWITCH POSSIBILITY # BEGIN # NVFTDSP # # ** NVFTDSP - DETERMINE SWITCH POSSIBILITY. * * E. THAVIKULWAT 81/10/02 * C. BRION 83/04/16, 83/05/10, 83/06/23. * * THIS PROCEDURE DETERMINES IF A SWITCH TO THE REQUESTED * APPLICATION IS POSSIBLE. IF SO, A CR/SWH SM IS ISSUED. IT MAY * HAPPEN THAT A REQUEST STARTABLE APPLICATION HAS BEEN REQUESTED. * IN THIS CASE, THE PTAC IS SET TO A NETON PENDING STATE, A TIMER * REQUEST IS ISSUED AND A "WAITING FOR APPLICATION" MESSAGE SENT TO * THE TERMINAL. * * PROC NVFTDSP((PT),(PD)) * * ENTRY: * PT = POINTER TO PTAC ENTRY. * PD = POINTER TO PDCT ENTRY(ONLY FOR PASSIVE DEVICE). * * EXIT: * ONE OF THE FOLLOWING: * 1) CR/SWH SM ISSUED. * 2) APPROPRIATE MESSAGE SENT TO CONSOLE IF SWITCH NOT POSSIBLE. * 3) PASSIVE DEVICE PUT INTO WAIT STATE IF SWITCH NOT POSSIBLE. * 4) THE APPLICATION STARTUP INITIATED AND THE PTAC PUT IN NETON * PENDING STATE. * 5) IF A LOAN CONNECTION REQUEST, A CR/RCN/N FOLLOWED BY THE * CR/SWH/R SM IS ISSUED. * 6) IF A LOAN CONNECTION REQUEST AND THE CONNECTION SWITCH NOT * POSSIBLE, A CR/RCN/A SM IS ISSUED IN ORDER TO RETURN THE * CONNECTION BACK TO THE PRIMARY APPLICATION. * * NOTES: * 1) SWITCH FOR CONSOLE IS POSSIBLE IF APPLICATION IS NETON, IS * ENABLED, NOT DOWN, HAS NOT REACHED THE MAXIMUM CONNECTION * IT CAN ACCEPT, AND HAS NO DUPLICATE USER FOR THAT * APPLICATION IF DUPLICATE USER NOT ALLOWED. IF SWITCH NOT * POSSIBLE, EITHER AN APPROPRIATE MESSAGE IS ISSUED TO THE * TERMINAL AND APPLICATION PROMPT MAY BE REISSUED OR IF A * LOAN REQUEST A CR/RCN/A SM IS ISSUED. * 2) SWITCH FOR PASSIVE DEVICE IS POSSIBLE IF APPLICATION HAS NOT * REACHED THE MAXIMUM CONNECTION IT CAN ACCEPT. IF SWITCH NOT * POSSIBLE AND NOT A LOAN REQUEST RECONNECT, THE DEVICE STAYS * CONNECTED TO NVF UNTIL THE CONSOLE HAS COME BACK AND HAS * MADE ANOTHER SUCCESSFUL APPLICATION SELECTION OR UNTIL THE * NPU TERMINATES THE CONNECTION. IF SWITCH NOT POSSIBLE AND * A LOAN REQUEST RECONNECT THEN A CR/RCN/A SM IS ISSUED TO * RETURN THE CONNECTION BACK TO THE PRIMARY APPLICATION. * # # **** PROC NVFTDSP - XREF LIST. # XREF BEGIN PROC ABORT; # ABORT NVF # PROC MESSAGE; # ISSUE DAYFILE MESSAGE # PROC MOVE; # MACREL MOVE CM WORDS # PROC NVFSCAD; # COMPLETE APPLICATION DEPARTURE # PROC NVFTDAD; # DETERMINE ADDITIONAL DIALOGUE # PROC NVFTILP; # ISSUE LOGIN PROMPT # PROC NVFTRLC; # REFUSE LOAN REQUEST CONNECTION # PROC NVFUCRS; # CHECK REQUEST STARTABLE # PROC NVFUMQE; # TRANSFER SM TO QUEUE # PROC SSCATR; # SS-ACCEPT TIMER REQUEST # PROC SSTETS; # ENLARGE TABLE SPACE # PROC SSTRTS; # SS-RELEASE TABLE SPACE # FUNC EDATE C(10); # CONVERT PACKED DATE TO DISPLAY CODE # FUNC XSFW C(10); # SPACE FILL WORD # END # **** # ITEM ADDR I; # ADDRESS VARIABLE FOR CR/RCN/N # ITEM ANUM I; # APPLICATION NUMBER VARIABLE # ITEM AS I; # SUBSCRIPT FOR ARRAY AST # ITEM ASENTRY I; # NUMBER OF AST ENTRIES # ITEM ASTORD I; # LOCAL AST ORDINAL # ITEM CTYP I; # CONNECTION TYPE FOR NVFUCRS CALL # ITEM ERRCOD I; # ERROR CODE FOR PROC *NVFTDAD* # ITEM ERRKOD I; # ERROR CODE FOR RCN/A AND/OR CR/SWH # ITEM I I; # LOOP VARIABLE # ITEM IDX I; # INDEX FOR 2ND HALF OF *MSGBUF* # ITEM NOSPTAC B; # SPTAC SEARCH FLAG # ITEM PASTMATCH B; # PRIMARY AST MATCH ID # ITEM PD I; # SUBSCRIPT FOR ARRAY PDCT # ITEM PORD I; # LOCAL LOOP AND PRIMARY AST ORD # ITEM PRIORD I; # PRIMARY AST ORDINAL # ITEM PT I; # SUBSCRIPT FOR ARRAY PTAC # ITEM PTDT I; # SUBSCRIPT FOR GOTO SWITCH # ITEM RA I; # SUBSCRIPT FOR ARRAY RAU # ITEM RAU$ENTRY I; # NUMBER OF ENTRIES IN RAU TABLE # ITEM RETORD I; # RETURN AST ORDINAL FOR NVFUCRS # ITEM RETSTAT U; # RETURN RETSTAT FOR NVFUCRS # ITEM SAS I; # SPTAC LOOP COUNTER, ENTRY ORDINAL # ITEM SIZEA I; # SPTAC SIZE # ITEM SIZEB I; # SPTAC AND SM SIZES # ITEM SMOUT B; # SM TYPE, TRUE=CR/RCN/A, FALSE=CR/SWH/R # ITEM TOTALCN I; # TOTAL NUMBER OF CONNECTIONS # SWITCH DTYPSWT:DTSTAT LLINT : SCON, # LABEL FOR CONSOLE DEVICE TYPE # LLPASV : SCR, # LABEL FOR CARD READER DEVICE # LLPASV : SLP, # LABEL FOR LINE PRINTER DEVICE # LLPASV : SCP, # LABEL FOR CARD PUNCH DEVICE # LLPASV : SPL, # LABEL FOR PLOTTER DEVICE # LLINT : SCLP, # LABEL FOR CDCNET LINE PRINTER (PSU) # LLINT : SUSER; # LABEL FOR USER DEVICE TYPE # # ** TMBBUF - TIMER REQUEST BUFFER. * * BUFFER CONTAINING THE TIMER INFO. SET UP TO CONTAIN THE * FC/INACT SM WHICH IS RETURNED TO THE TAINPQ WHEN THE TIMER EXPIRES. # ARRAY TMBBUF[00:00] S(TMBSIZ$); BEGIN ITEM TMB$SMID S:CTQSTAT(00,00,12) = [S"SINA"]; 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); ITEM TMB$DELAY U(03,24,18) = [NETPTIME$]; ITEM TMB$QNUM U(03,42,18); END # ** EXPBUF - PASSSWORD EXPIRATION WARNING. # ARRAY EXPBUF[00:00] S(5); BEGIN ITEM EXP$MSG C(00,00,30) = [".YOUR PASSWORD EXPIRES AT 00.0"]; ITEM EXP$MSG1 C(03,00,07) = ["0.00 ON"]; ITEM EXP$DATE C(03,42,10); # DATE IN YY/MM/DD FORMAT # ITEM EXP$ZERO U(04,42,18) = [0]; END # * EXPDATE - DATE AS IT APPEARS IN MSG$BUF # ARRAY EXPDATE[00:00] S(1); BEGIN ITEM EXWORD U(00,00,60); # FULL WORD OF DATA # ITEM EXLOW18 U(00,42,18); # LOWER 18 BITS OF WORD # ITEM EXYEAR U(00,42,06); # YEAR - 1970 # ITEM EXMONTH U(00,48,06); # MONTH # ITEM EXDATE U(00,54,06); # DATE # END # ** NOAST - NO AST ENTRY WAS FOUND MESSAGE. # $BEGIN ARRAY NOAST [00:00] S(5); BEGIN ITEM NO$MSG C(00,00,36) = ["NVFTDSP - CANNOT FIND AST ENTRY FOR "]; ITEM NO$ANAM C(03,36,07); ITEM NO$ZERO U(04,18,42) = [0]; END # ** NOPRI - NO PRIMARY AST ENTRY WAS FOUND MESSAGE. # ARRAY NOPRI [00:00] S(5); BEGIN ITEM NOP$MSG C(00,00,40) = ["NVFTDSP - CANNOT FIND PRIMARY AST ENTRY."]; ITEM NOP$ZERO U(04,00,60) = [0]; END $END # * TEMPORARY BASED ARRAYS FOR USE WHEN CALLING THE *MOVE* ROUTINE. # BASED ARRAY TEMPFROM [00:00] S(1); BEGIN ITEM FROMWRD U(00,00,60); END BASED ARRAY TEMPTO [00:00] S(1); BEGIN ITEM TOWRD U(00,00,60); END CONTROL EJECT; # * NVFTDSP MAIN LINE STARTS HERE. * * DETERMINE NUMBER AST ENTRIES. # ASENTRY = ASTLNGTH/ASTSIZ$; # * CLEAR OUTGOING SM BUFFER (2ND HALF OF *MSGBUF*). # IDX = (NMSGBUF$ + 1) / 2; # INDEX TO 2ND HALF OF *MSGBUF* # FOR I = IDX STEP 1 UNTIL NMSGBUF$ DO BEGIN MSG$WORD[I] = 0; END PTDT = PTA$DT[PT]; GOTO DTYPSWT[PTDT]; # * CONSOLE DEVICE TYPE. IF SWITCH IS POSSIBLE, OBTAIN VALIDATION * DATA FOR CR/SWH SM FROM PTAC ENTRY. IF NOT POSSIBLE, CALL * *NVFTDAD* WITH APPROPRIATE ERROR CODE AND EXIT. # LLINT: # CONSOLE DEVICE TYPE # PASTMATCH = FALSE; FOR ASTORD = 0 STEP 1 WHILE (ASTORD LS ASENTRY) AND NOT PASTMATCH DO BEGIN IF (AST$PANAM[ASTORD] EQ PTA$SWTAPP[PT]) OR ((AST$SANAM[ASTORD] EQ PTA$SWTAPP[PT]) AND (AST$SANAM[ASTORD] NQ AST$PANAM[ASTORD])) THEN BEGIN PASTMATCH = TRUE; END END $BEGIN IF NOT PASTMATCH THEN BEGIN NO$ANAM[0] = PTA$SWTAPP[PT]; MESSAGE(NOAST[0],0); ABORT; END $END ASTORD = ASTORD - 1; AS = ASTORD; # * IF A LOANED CONNECTION IS BEING RETURNED TO THE PRIMARY APPL, * DECREMENT THE RESERVED CONNECTION COUNT FOR THE PRIMARY APPL. # IF PTA$LRC[PT] GR RCRC"LSA" THEN BEGIN AST$RACN[ASTORD] = AST$RACN[ASTORD] - 1; END # * CHECK FOR REQUEST STARTABLE TYPE OF APPLICATION, OR FOR AN * APPLICATION THAT CAN HAVE MULTIPLE COPIES. # PTA$SWTAN[PT] = AST$AN[ASTORD]; IF AST$RS[ASTORD] OR (AST$MXCOP[ASTORD] GR 1) THEN BEGIN # * APPLICATION IS REQUEST STARTABLE OR CAN HAVE MULTIPLE COPIES. * CALL NVFUCRS TO HANDLE FURTHUR PROCESSING. UPON RETURN, * DEPENDENT ON RETSTAT, EITHER SET ERROR CODE OR SET PTAC STATE TO * NETON PENDING, START TIMER AND RETURN. # RETORD = 0; RETSTAT = CONNOK$; CTYP = TACON$; NVFUCRS(ASTORD,RETORD,RETSTAT,CTYP); IF RETSTAT EQ NOCONN$ OR RETSTAT EQ MCLIMIT$ THEN BEGIN # * CONNECTION NOT POSSIBLE. * IF A LOAN REQUEST CONNECTION TYPE, CALL NVFTRLC * TO RESTORE VCB, ISSUE VCB WRITE REQUEST, ISSUE CR/RCN/A SM * AND RELEASE THE PTAC AND SPTAC IF IT EXISTS. # IF PTA$LRC[PT] EQ RCRC"LSA" THEN BEGIN SMOUT = TRUE; PTA$LRC[PT] = RCRC"SLE"; NVFTRLC(PT,SMOUT,PTA$LRC[PT]); RETURN; END # * NOT A LOANED REQUEST TYPE OF CONNECTION. # IF RETSTAT EQ NOCONN$ THEN # APPL NOT AVAILABLE # ERRCOD = ECANP$; ELSE # MAX COPIES/CONNECTIONS REACHED# ERRCOD = ECABSY$; NVFTDAD(PT,ERRCOD); IF PTA$STATE[PT] EQ PTACST"AWTPRMT" THEN BEGIN NVFTILP(PT); RETURN; END END ELSE IF RETSTAT EQ NETP$ THEN BEGIN # * REQUESTED APPL IS BEING STARTED UP. * CONNECTION IN NETON PENDING STATE. * SETUP TIMER TO PROTECT AGAINST APPLICATION NEVER NETTING ON * AND HANGING THE CONNECTION. # ERRCOD = ECAPNETP$; PTA$STATE[PT] = PTACST"AWTNETP"; TMB$ACN[0] = PTA$ACN[PT]; TMB$QNUM[0] = LOC(P); SSCATR(TMBBUF[0]); PTA$CNUM[PT] = TMB$CNUM[0]; PTA$SWTAPP[PT] = AST$PANAM[ASTORD]; AS = RETORD; RETURN; END ELSE IF RETSTAT EQ CONNOK$ THEN BEGIN AS = RETORD; PTA$SWTAPP[PT] = AST$PANAM[RETORD]; PTA$SWTAN[PT] = AST$AN[RETORD]; END END # * TO HERE, AN APPLICATION AVAILABLE FOR THE CONNECTION. * CHECK THE MAX NUMBER OF CONNECTIONS. # ANUM = AST$AN[AS]; TOTALCN = AST$TACN[AS] + AST$AACN[AS] + AST$RACN[AS]; IF (ANUM EQ 0) OR (TOTALCN GQ AST$MCN[AS]) OR (AST$DIF[AS]) OR (AST$DNF[AS]) THEN BEGIN # * SWITCH NOT POSSIBLE. EITHER APPLICATION IS INACTIVE, AT MAX * NUMBER OF CONNECTIONS, DISABLED OR DOWN. # ERRCOD = ECANP$; IF (ANUM NQ 0) AND (TOTALCN GQ AST$MCN[AS]) THEN BEGIN # * REQUESTED APPLICATION AT CONNECTION LIMIT. # IF PTA$LRC[PT] LS RCRC"LSA" THEN BEGIN ERRCOD = ECABSY$; END ELSE BEGIN ERRCOD = 0; END END # * IF A LOAN REQUEST TYPE OF CONNECTION, THEN MUST SEND THE * CONNECTION BACK TO THE PRIMARY APPLICATION. # IF PTA$LRC[PT] LS RCRC"LSA" THEN BEGIN # * NOT A LOAN REQUEST TYPE OF CONNECTION. * DETERMINE ADDITIONAL DIALOGUE POSSIBILITY AND ISSUE PROMPT * IF SO DETERMINED. # NVFTDAD(PT,ERRCOD); IF PTA$STATE[PT] EQ PTACST"AWTPRMT" THEN BEGIN NVFTILP(PT); END RETURN; END ELSE BEGIN # * LOAN REQUEST TYPE OF CONNECTION. * IF INITIAL LOAN FROM PRIMARY TO SECONDARY, ISSUE A * CR/RCN/A SM VIA CALL TO NVFTRLC. # IF PTA$LRC[PT] EQ RCRC"LSA" THEN BEGIN SMOUT = TRUE; PTA$LRC[PT] = RCRC"SNA"; IF (ANUM NQ 0) AND (TOTALCN GQ AST$MCN[AS]) THEN BEGIN PTA$LRC[PT] = RCRC"SLE"; END NVFTRLC(PT,SMOUT,PTA$LRC[PT]); RETURN; END END END ELSE BEGIN # * SWITCH STILL POSSIBLE. * CHECK IF DUPLICATE USER ALLOWED. # IF AST$UIDF[AS] AND (PTA$LRC[PT] LQ RCRC"LSA") THEN BEGIN # * DUPLICATE USER NOT ALLOWED. CHECK *RAU* TABLE FOR DUPLICATE * USER. IF DUPLICATE, CALL *NVFTDAD* AND EXIT. IF NOT, * MAKE ENTRY IN *RAU* TABLE AND PROCEED TO BUILD CR/SWH SM. # RAU$ENTRY = RAULNGTH / RAUSIZ$; FOR I = 0 STEP 1 WHILE (I LS RAU$ENTRY) DO BEGIN IF (RAU$AN[I] EQ ANUM) AND (RAU$UIDX[I] EQ PTA$UIDX[PT]) AND (RAU$FNAM[I] EQ PTA$FNAM[PT]) THEN BEGIN ERRCOD = ECABSY$; # * DUPLICATE USER, CAN NOT SWITCH. * # IF PTA$LRC[PT] LS RCRC"LSA" THEN BEGIN # * NON LOAN REQUEST TYPE OF CONNECTION. * DETERMINE ADDITIONAL DIALOGUE POSSIBILITY AND ISSUE PROMPT * IF SO DETERMINED. # NVFTDAD(PT,ERRCOD); IF PTA$STATE[PT] EQ PTACST"AWTPRMT" THEN BEGIN NVFTILP(PT); END RETURN; END ELSE BEGIN # * LOAN REQUEST TYPE OF CONNECTION. * IF INITIAL LOAN FROM PRIMARY TO SECONDARY, ISSUE A * CR/RCN/A SM VIA CALL TO NVFTRLC. # IF PTA$LRC[PT] EQ RCRC"LSA" THEN BEGIN SMOUT = TRUE; PTA$LRC[PT] = RCRC"SNA"; NVFTRLC(PT,SMOUT,PTA$LRC[PT]); RETURN; END END END END # * NOT A DUPLICATE USER. GENERATE RAU TABLE ENTRY. NOTE THAT THE CUR- * RENT CONTENT OF I IS THE INDEX TO THE NEW ENTRY. # RA = RAULNGTH; # OFFSET FROM BEGINNING OF RAU TABLE # SSTETS(P,RA,RAUSIZ$); # ALLOCATE SPACE FOR RAU ENTRY # RAU$AN[I] = ANUM; # SAVE APPLICATION NUMBER # RAU$UIDX[I] = PTA$UIDX[PT]; # SAVE USER INDEX # RAU$FNAM[I] = PTA$FNAM[PT]; # SAVE FAMILY NAME # END # * ISSUE THE PASSWORD EXPIRATION WARNING MESSAGE # IF (NOT PTA$PWEXPF[PT]) # PASSWRD EXP MESSAGE NOT SENT# THEN BEGIN EXWORD[0] = PTA$EXPDAT[PT]; # PASSWORD EXPIRATION DATE # IF (EXLOW18[0] NQ 0) # A EXPIRING PASSWORD # THEN BEGIN EXP$DATE[0] = EDATE(EXLOW18[0]);# DATE IN DISPLAY CODE # NVFUMQE(P,EXPBUF[0],APPTTX$,PTA$ACN[PT],50); END PTA$PWEXPF[PT] = TRUE; # MESSAGE SENT TO USER # END END # * SWITCH FOR CONSOLE IS POSSIBLE. * CHECK IF INITIAL LOAN REQUEST. IF SO, SEND THE CR/RCN/N SM, AS * THIS WAS NOT DONE IN *NVFTRVD*. # IF PTA$LRC[PT] EQ RCRC"LSA" THEN BEGIN SPMSG0[1] = 0; PFCSFC[1] = CRRCNN; CRACN[1] = PTA$ACN[PT]; CRNXP[1] = TRUE; CRICT[1] = ICT$; CRALN[1] = ALN$; ADDR = 0; NVFUMQE(P,APSM[1],APPPR$,ADDR,LCRRCNN); SPMSG0[1] = 0; END # * NOW SET UP THE CR/SWH/R SM. # CRSAHMT[1] = PTA$AHMT[PT]; CRSAHDS[1] = PTA$AHDS[PT]; CRSAAWC[1] = PTA$AAWC[PT]; CRSATWD[1] = PTA$ATWD[PT]; GOTO ENDDTYP; # * PASSIVE DEVICE TYPE. IF SWITCH IS POSSIBLE, OBTAIN VALIDATION * DATA FOR CR/SWH SM FROM PDCT ENTRY. IF NOT POSSIBLE, JUST EXIT. # LLPASV: PASTMATCH = FALSE; # * LOCATE THE APPLICATION FOR THE CONNECTION. * FOR PASSIVE DEVICES, THE APPLICATION MAY BE A ONE OF THE * FOLLOWING TYPE OF APPLICATION: * * 1) PRIMARY APPLICATION THAT IS ACTIVE. * 2) SECONDARY APPLICATION THAT IS ACTIVE. # FOR ASTORD = 0 STEP 1 WHILE (ASTORD LS ASENTRY) AND NOT PASTMATCH DO BEGIN IF ((AST$PANAM[ASTORD] EQ PDT$CAPP[PD+1]) AND (AST$AN[ASTORD] NQ 0)) OR ((AST$SANAM[ASTORD] EQ PDT$CAPP[PD+1]) AND (AST$AN[ASTORD] NQ 0) AND (AST$SANAM[ASTORD] NQ AST$PANAM[ASTORD])) THEN BEGIN PASTMATCH = TRUE; END END $BEGIN IF NOT PASTMATCH THEN BEGIN NO$ANAM[0] = PDT$CAPP[PD+1]; MESSAGE(NOAST[0],0); ABORT; END $END ASTORD = ASTORD - 1; AS = ASTORD; # * APPLICATION FOUND. CHECK CONNECTION LIMIT. # TOTALCN = AST$TACN[AS] + AST$AACN[AS] + AST$RACN[AS]; IF (TOTALCN GQ AST$MCN[AS]) THEN BEGIN # * APPLICATION AT CONNECTION LIMIT. PASSIVE DEVICES HELD * AT THIS POINT. CONSOLE CONNECTION ACTIVITY WILL FORCE THE * RELOCATION OF THE PASSIVE DEVICES. # RETURN; END # * SWITCH FOR PASSIVE DEVICE IS POSSIBLE. SAVE FAMILY NAME, USER * NUMBER, AND APPLICATION NAME IN PTAC ENTRY AS *NVFTIAM* (ISSUE * ACCOUNT DAYFILE MESSAGE) EXPECTS IT TO BE IN THE PTAC. PICK UP * VALIDATION DATA FOR CR/SWH SM FROM PDCT ENTRY. # PTA$FWORD[PT] = PDT$FWORD[PD+2]; PTA$UWORD[PT] = PDT$UWORD[PD+3]; PTA$SWTAPP[PT] = PDT$CAPP[PD+1]; PTA$SWTAN[PT] = AST$AN[AS]; # RESTORE APPLICATION NUMBER # # * CHECK IF INITIAL LOAN REQUEST. IF SO, MUST SEND CR/RCN/N SM. # IF PTA$LRC[PT] EQ RCRC"LSA" THEN BEGIN SPMSG0[1] = 0; PFCSFC[1] = CRRCNN; CRACN[1] = PTA$ACN[PT]; CRNXP[1] = TRUE; CRICT[1] = ICT$; CRALN[1] = ALN$; ADDR = 0; NVFUMQE(P,APSM[1],APPPR$,ADDR,LCRRCNN); SPMSG0[1] = 0; END # * NOW SET UP THE CR/SWH/R SM. # CRSWOCN[1] = PTA$OCN[PT]; CRSAHMT[1] = PDT$AHMT[PD+4]; CRSAHDS[1] = PDT$AHDS[PD+5]; CRSAAWC[1] = PDT$AAWC[PD+6]; CRSATWD[1] = PDT$ATWD[PD+7]; GOTO ENDDTYP; ENDDTYP: # COMMON END PROCESSING # ANUM = AST$AN[AS]; AST$TACN[AS] = AST$TACN[AS] + 1; # INCREMENT NUM OF CONNS. # AST$ICCN[AS] = AST$ICCN[AS] + 1; # * COMPLETE BUILDING CR/SWH SM. # PFCSFC[1] = CRSWH; CRNACN[1] = PTA$ACN[PT]; CRABL[1] = PTA$ABL[PT]; CRSWSDT[1] = PTA$SDT[PT]; CRDT[1] = PTA$DT[PT]; CRSWTC[1] = PTA$TC[PT]; CRSWIC[1] = PTA$ICF[PT]; CRSWORD[1] = PTA$DO[PT]; CRSTNAM[1] = XSFW(PTA$TN[PT]); CRSWPW[1] = PTA$PW[PT]; CRSWPL[1] = PTA$PL[PT]; CRSWSL[1] = PTA$SL[PT]; CRSWNET[1] = PTA$NET[PT]; CRSWDBZ[1] = PTA$DBZ[PT]; CRSWXBZ[1] = PTA$XBZ[PT]; CRSWUBZ[1] = PTA$UBZ[PT]; CRSWHW[1] = PTA$HW[PT]; CRSWVTP[1] = PTA$VTP[PT]; CRSWAN[1] = ANUM; CRSWFAM[1] = XSFW(PTA$FNAM[PT]); CRSWFO[1] = PTA$FORD[PT]; CRSWUN[1] = XSFW(PTA$UNUM[PT]); CRSWUI[1] = PTA$UIDX[PT]; # * SET THE LOAN STATUS FIELD IF THIS IS A LOAN TYPE OF CONNECTION. * FOR A NON-LOAN CONNECTION, THE LOAN STATUS IS ZERO. # IF PTA$LRC[PT] LS RCRC"LSA" THEN BEGIN CRSWLST[1] = 0; END ELSE BEGIN CRSWLST[1] = PTA$LRC[PT]; END # * CHECK IF EXTENDED OPTIONAL WORDS ARE AVAILABLE. * IF SO, APPEND THE OPTIONAL WORDS FROM THE SPTAC ENTRY * TO THE CR/SWH/R SM. * DELETE THE SPTAC ENTRY WHEN FINISHED. # SIZEB = 0; SIZEA = LCRSWH; IF PTA$SPTAC[PT] THEN BEGIN NOSPTAC = TRUE; FOR SAS = 0 STEP SPT$ESIZE[SAS] WHILE ((SAS LS SPTACL) AND NOSPTAC) DO BEGIN IF SPT$VCB[SAS] EQ PTA$VCB[PT] THEN BEGIN SIZEB = SPT$ESIZE[SAS] - 1; P = LOC(SPT$WRD2[SAS]); P = LOC(CRSOPW[1]); FOR I = 0 STEP 1 WHILE I LS SIZEB DO BEGIN TOWRD[I] = FROMWRD[I]; END SSTRTS(P,SAS,SPT$ESIZE[SAS]); PTA$SPTAC[PT] = FALSE; NOSPTAC = FALSE; SIZEA = SIZEA + SIZEB; END END END # * IF THIS IS A LOANED CONNECTION THAT IS BEING RETURNED TO THE * PRIMARY APPLICATION, CLEAR THE LOAN FLAG, AS IT IS NO LONGER * "ON LOAN". # IF PTA$LRC[PT] GR RCRC"LSA" THEN BEGIN PTA$LCF[PT] = FALSE; END # * CLEAR ACN FIELD OF PTAC ENTRY AS ACN COULD BE REUSED AFTER A * CR/SWH REQUEST IS ISSUED. # PTA$ACN[PT] = 0; NVFUMQE(P,APSM[1],APPPR$,0,SIZEA); RETURN; END # END NVFTDSP # TERM