*DECK NDLTRNK USETEXT NDLDATT USETEXT NDLER2T USETEXT NDLNCFT USETEXT NDLPS2T USETEXT NDLTBLT PROC NDLTRNK; # PROCESS TRUNK STATEMENT # BEGIN *IF,DEF,IMS # ** NDLTRNK - TRUNK PROCESSOR * * S.M. ILMBERGER 81/11/2 * * PROCESS TRUNK STATEMENT * * PROC NDLTRNK * * ENTRY NONE * * EXIT NONE * * MESSAGE * INVALID KEYWORD I.D.-ABORT FROM NDLTRNK * * METHOD * * IF NO LABEL ERROR * SAVE NAME IN PLINK$XREF TABLE * FOR EACH PARAMETER ON LOGLINK LINE * IF NO VALUE ERROR * PROCESS AND STORE INFO IN APPROPRIATE PLINK$XREF ITEM * IF P1,P2,N1 OR N2 PARAMETER NOT SPECIFIED * FLAG ERROR - REQUIRED PARAMETER MISSING * CK FOR DUPLICATE TRUNK DEFINITIONS * IF DUPLICATE DEFINITION * FLAG ERROR * CALL NDLCKPT TO CHECK UNIQUENESS OF PORT NUMBERS * END * # *ENDIF # **** PROC NDLTRNK - XREF LIST BEGINS. # XREF BEGIN PROC ABORT; # ABORTS NDLP # PROC NDLCKPT; # CHECK UNIQUENESS OF PORT NUMBER # PROC NDLCKRG; # CHECK RANGE OF VALUE # PROC NDLEM2; # MAKE ENTRY IN PASS 2 ERROR FILE # FUNC XCDD C(10); #CONVERTS INTEGER TO DISPLAY CODE # PROC MESSAGE; # PRINT DAYFIL AND SYSTEM CONSOLE MESSAGE # END # **** # DEF FSTNT # 1 #; # FIRST ENTRY IN NPU TABLE # DEF FRAME0 # 0 #; # CODE FOR FRAME SIZE 256 # DEF FRAME1 # 1 #; # CODE FOR FRAME SIZE 500 # DEF FRAME2 # 2 #; # CODE FOR FRAME SIZE 1050 # DEF FR$499 # 499 #; # FRAME SIZE 499 # DEF FR$1049 # 1049 #; # FRAME SIZE 1049 # DEF MIN$FRAM # 0 # ; # MINIMUM FRAME SIZE # DEF MAX$FRAM # 1200 #; # MAXIMUM FRAME SIZE # DEF DEF$FRAME # 2 # ; # DEFAULT FRAME CODE # DEF N1$PAR # "N1" #; # FOR ERROR MESSAGE # DEF N2$PAR # "N2" #; # FOR ERROR MESSAGE # DEF P1$PAR # "P1" #; # FOR ERROR MESSAGE # DEF P2$PAR # "P2" #; # FOR ERROR MESSAGE # DEF TRN$PAR # "TRUNK" #; # FOR ERROR MESSAGE # ITEM DUPTRNK B; # DUPLICATE TRUNK FLAG # ITEM ENT$NUM; # ENTRY NUMBER OF NPU-TABLE # ITEM I; # LOOP COUNTER # ITEM J; # LOOP COUNTER # ITEM KWD$MAP; # KEYWORD EXISTS MAP # ITEM NOD; ITEM OK$STAT B; ITEM PORT$ST B; ITEM PRT; ITEM CHARVAL C(10); # TEMPORARY FOR CHAR VALUE # SWITCH TRNK$PAR ERR$TR, # UNK # ERR$TR, # NODE # ERR$TR, # VARIANT # ERR$TR, # OPGO # ERR$TR, # # ERR$TR, # LLNAME # ERR$TR, # # ERR$TR, # # ERR$TR, # # ERR$TR, # # ERR$TR, # HNAME # ERR$TR, # LOC # ERR$TR, # # ERR$TR, # # ERR$TR, # # ERR$TR, # # ERR$TR, # # ERR$TR, # # ERR$TR, # NCNAME # DI$ID1, # DI # N1$ID$, # N1 # P1$ID, # P1 # N2$ID, # N2 # P2$ID, # P2 # NOLO1$ID, # NOLOAD1 # NOLO2$ID, # NOLOAD2 # ERR$TR, # # ERR$TR, # 27 # ERR$TR, # 28 # ERR$TR, # 29 # ERR$TR, # 30 # ERR$TR, # 31 # ERR$TR, # 32 # ERR$TR, # 33 # ERR$TR, # 34 # ERR$TR, # 35 # ERR$TR, # 36 # ERR$TR, # 37 # FRAME$ID ;# 38 # CONTROL EJECT; # # # NDLTRNK CODE BEGINS HERE # # # KWD$MAP = 0; # CLEAR KEYWORD EXISTS BIT MAP # PLWC[0] = PLWC[0] + 1; IF NOT STLBERR[1] THEN # NO LABEL ERROR # PLNAME[PLWC[0]] = STLABEL[1]; # SET NAME IN PHYSICAL-LINK-XREF # PLTYPE[PLWC[0]] = 1; FOR I=FSTKID2 STEP 1 UNTIL STWC[0] #PROCESS EACH ENT OF STMT TAB # DO BEGIN BKWD$MAP = 1; # SET BIT FOR KEYWORD # IF NOT STVLERR[I] THEN # NO VALUE ERROR # BEGIN IF STKWID[I] LS KID"NODE" OR STKWID[I] GR KID"FRAME" THEN GOTO ERR$TR; ELSE GOTO TRNK$PAR[STKWID[I]]; N1$ID$: N2$ID: # NEXT PARAMETER IS N1 OR N2 # ENT$NUM = 0; FOR J=FSTNT STEP NTENTSZ WHILE J LQ NTWC[0] AND ENT$NUM EQ 0 DO # SEE ID NAME DEFINES IN NPU-TABLE # BEGIN IF NTNAME[J] EQ STVALNAM[I] THEN BEGIN ENT$NUM = J; END END IF ENT$NUM NQ 0 THEN # NAME IS IN NPU-TABLE # BEGIN # SET NODE NUMBER IN PHYSICAL-LINK-XREF # IF STKWID[I] EQ KID"N1" THEN BEGIN PLNID1[PLWC[0]] = NTNID[ENT$NUM]; END ELSE BEGIN PLNID2[PLWC[0]] = NTNID[ENT$NUM]; END END ELSE BEGIN IF STKWID[I] EQ KID"N1" THEN # FLAG ERROR-PARAMETER NAME IS NOT AN NPU # NDLEM2(ERR119,STLNUM[0],N1$PAR); ELSE NDLEM2(ERR119,STLNUM[0],N2$PAR); END TEST I; P1$ID: # NEXT PARAMETER IS P1 # NDLCKRG(KID"P1",STVALNUM[I],OK$STAT); IF OK$STAT THEN # STORE PORT NUMBER IN PHYSICAL-LINK-XREF # PLP1[PLWC[0]] = STVALNUM[I]; # TABLE # TEST I; P2$ID: # NEXT PARAMETER IS P2 # NDLCKRG(KID"P2",STVALNUM[I],OK$STAT); IF OK$STAT THEN # STORE PORT NUMBRE IN PHYSICAL-LINK-XREF # PLP2[PLWC[0]] = STVALNUM[I]; # TABLE # TEST I; DI$ID1: # NEXT PARAMETER IS DI # IF STVALNAM[I] EQ "YES" THEN # SET STATUS ELEMENT # PLST[PLWC[0]] = TRUE; TEST I; NOLO1$ID: # NEXT PARAMETER = NOLOAD1 # IF STVALNAM[I] EQ "YES" THEN # SET NOLOAD1 FLAG # PLNLD1[PLWC[0]] = TRUE; TEST I; NOLO2$ID: # NEXT PARAMETER = NOLOAD2 # IF STVALNAM[I] EQ "YES" THEN # SET NOLOAD2 FLAG # PLNLD2[PLWC[0]] = TRUE; TEST I; FRAME$ID: OK$STAT = TRUE; IF (STVALNUM[I] LS MIN$FRAM) OR (STVALNUM[I] GR MAX$FRAM) # CHECK RANGE # THEN BEGIN OK$STAT = FALSE ; # OUT OF RANGE# CHARVAL = XCDD(STVALNUM[I]); NDLEM2(ERR100,STLNUM[0],CHARVAL); # GENERATE ERROR MESSAGE# END IF OK$STAT # IF NO OUT OF RANGE # THEN BEGIN IF STVALNUM[I] LQ FR$499 # LESS THAN 499 # THEN BEGIN PLFRAME[PLWC[0]] = FRAME0; #ASSIGN FRAME CODE 0# END ELSE BEGIN IF STVALNUM[I] LQ FR$1049 THEN BEGIN PLFRAME[PLWC[0]] = FRAME1; # ASSIGN FRAME CODE 1# END ELSE BEGIN PLFRAME[PLWC[0]] = FRAME2; #ASSIGN FRAME CODE 2# END END END TEST I; ERR$TR: EPRC2[0] = "NDLTRNK"; MESSAGE(ABRTMSG2,0); ABORT; TEST I; END END # I LOOP # IF BKWD$MAP NQ 1 # DEFAULT FRAME IS USED# THEN PLFRAME[PLWC[0]] = DEF$FRAME; # DEFAULT FRAME 2# IF BKWD$MAP NQ 1 THEN # P1 PARAMETER NOT SPECIFIED # NDLEM2(ERR103,STLNUM[0],P1$PAR); IF BKWD$MAP NQ 1 THEN # P2 PARAMETER NOT SPECIFIED # NDLEM2(ERR103,STLNUM[0],P2$PAR); IF BKWD$MAP NQ 1 THEN # N1 PARAMETER NOT SPECIFIED # NDLEM2(ERR103,STLNUM[0],N1$PAR); IF BKWD$MAP NQ 1 THEN # N2 PARAMETER NOT SPECIFIED # NDLEM2(ERR103,STLNUM[0],N2$PAR); IF PLNID1[PLWC[0]] NQ 0 AND PLNID2[PLWC[0]] NQ 0 THEN # IF N1 AND N2 WERE O.K. # BEGIN DUPTRNK = FALSE; # CLEAR DUPLICATE TRUNK FLAG # FOR I=1 STEP 1 WHILE I LS PLWC[0] AND NOT DUPTRNK DO BEGIN IF (PLNID1[I] EQ PLNID1[PLWC[0]] AND PLNID2[I] EQ PLNID2[PLWC[0]]) OR (PLNID1[I] EQ PLNID2[PLWC[0]] AND PLNID2[I] EQ PLNID1[PLWC[0]]) THEN BEGIN # IF TRUNK WAS ALREADY SPECIFIED # DUPTRNK = TRUE; # SET DUPLICATE TRUNK FLAG # END END IF DUPTRNK # IF DUPLICATE TRUNK WAS DISCOVERED # THEN BEGIN # FLAG ERROR -- DUPLICATE TRUNK FOUND # NDLEM2(ERR130,STLNUM[0],STLABEL[1]); END END IF PLNID1[PLWC[0]] EQ PLNID2[PLWC[0]] THEN # IF BOTH ENDS HAVE SAME NODE I.D. # BEGIN # FLAG ERROR -- TRNK CONNECTED TO SAME NPU# NDLEM2(ERR151,STLNUM[0]," "); END PRT = PLP1[PLWC[0]]; # CHECK PORT NUMBERS FOR UNIQUENESS # NOD = PLNID1[PLWC[0]]; NDLCKPT(PRT,NOD,PORT$ST); PRT = PLP2[PLWC[0]]; NOD = PLNID2[PLWC[0]]; NDLCKPT(PRT,NOD,PORT$ST); RETURN; END # NDLTRNK PROC # TERM