*DECK NP$BFET *IF DEF,XFR USETEXT AIPDEF USETEXT NX$CHAR USETEXT NX$ACBX PROC NP$BFET(FILENAME,CIO$SIZE,NET$SIZE) ; # TITLE NP$BFET - BUILD FET. USE FOR FILE TRANSFER APPLICATION ONLY# BEGIN # NP$BFET # # *** * PROC NAME: AUTHOR DATE * NP$BFET L.T.NGUYEN 83/03/20 * * NP$BFET CREATES THE LOCAL FILE FET AND THE * RHF NETXFR REQUEST/REPLY PARAMETER BLOCK ASSOCIATED WITH THIS ACN. * * PROC NP$BFET(FILENAME) * * ENTRY FILENAME - FILE NAME OF LOCAL FILE. * CIO$SIZE - SIZE OF CIRCULAR BUFFER. * NET$SIZE - SIZE OF NETWORKING BUFFER. * FTTINDEX - INDEX INTO FTT TABLE ( GLOBAL ) * * EXIT LOCAL FILE FET SET UP. * * PROCESS BUILD LOCAL FILE FET. * SET FIRST AND LIMIT POINTERS IN FET. * # ITEM FILENAME C(7); # FILE NAME # ITEM CIO$SIZE U ; # CIO BUFFER AREA # ITEM NET$SIZE U ; XREF BEGIN PROC NP$ZRBK ; # REPLACE TRAILING " " WITH ZEROS # END P = FTTFETADR[FTTINDEX] ; # * BUILD THE LOCAL FILE FET # # CIRCULAR I/O BUFFER. # FETLFNC[0] = FILENAME; FETCOMP = TRUE; NP$ZRBK(LOC(FETWD[0]),1) ; FETFETL[0] = LEN$FET - 5; FETFIR = P + LEN$FET ; FETIN[0] = FETFIR[0]; FETOUT[0] = FETFIR[0]; FETLIM[0] = FETFIR[0] + CIO$SIZE ; P = FTTFETW[FTTINDEX] ; FTTICKVAL[FTTINDEX] = 0; # INITIAL CHECKMARK VALUE TO ZERO # IF P NQ 0 THEN BEGIN # NON - PRU CONNECTION # FETNAME[0] = FILENAME ; FETWFIRST[0] = P + LEN$FETW ; FETWIN[0] = FETWFIRST[0] ; FETWOUT[0] = FETWFIRST[0] ; FETWLIMIT[0] = FETWFIRST[0] + NET$SIZE ; P = FTTCMV$BLK[FTTINDEX]; # CONVERSION PARAMETER BLOCK # CMB$DBUF[0] = 0; CMB$NBUF[0] = 0; CMB$NCOUNT[0] = TBH$LEN; # LENGTH OF TBH IN OCTETS # CMB$BLKSZ[0] = FTTBSIZE[FTTINDEX]; # BLOCK SIZE # CMB$NBYTE[0] = INITNBYTE; # INITIAL VALUE OF NBYTE # IF FTTUDD[FTTINDEX] EQ C6 # IF C6 # THEN BEGIN CMB$STEP[0] = 6; END ELSE BEGIN CMB$STEP[0] = 12; END IF FTTOPCODE[FTTINDEX] EQ SEND # IF SENDER # THEN BEGIN CMB$DBIT[0] = CMB$STEP[0]; CMB$TBLADR[0] = LOC(CSET1) ; # ADDRESS OF CONVERSION TABLE # END ELSE # ELSE IF RECEIVER # BEGIN CMB$DBIT[0] = WORDLENGTH - CMB$STEP[0]; CMB$TBLADR[0] = LOC(CSET2) ; # ADDRESS OF CONVERSION TABLE # END P = FTTCKTBL[FTTINDEX]; # PRESET CHECK MARK TABLE # CHK$IDX[0] = 1; # AT LEAST ONE ENTRY # CHK$DBIT[1] = CMB$DBIT[0]; # SET DBIT # FTTCURPRU[FTTINDEX] = 0; # PRU 0 # FTTDBIT[FTTINDEX] = CMB$DBIT; # DBIT # END RETURN ; END # BUILDFT # TERM *ENDIF