*DECK NP$XLOC
*IF DEF,XFR
USETEXT AIPDEF
USETEXT NX$ACBX
PROC NP$XLOC(ACN);
#
***
* PROC NAME: AUTHOR DATE
* NP$XLOC L.T.NGUYEN 83/03/29
*
* 2.FUNCTIONAL DESCRIPTION:
* LOCATE FTT ENTRY BY USING THE ACN .
*
* 3.METHOD:
* LOOP THROUGHT THE FTT UNTIL FIND A MATCHING ACN.
*
* 4.INPUT PARAMS:
* ACN - CONNECTION NUMBER OF XFR CONNECTION.
*
* 5.EXIT PARAMS:
* FTTINDEX - INDEX OF FTT ENTRY THAT MATCH THE ACN.
*
* 6.PROCS CALLED:
* NONE.
*
* 7.NOTES :
* THIS ROUTINE ASSUMING THAT THERE ALWAYS IS A MATCHING
* ACN IN THE FTT. IF NOT ERROR HAS BEEN OCCURED, ABORT.
*
*
#
BEGIN # NX$LOC #
XREF PROC NP$ERR ;
ITEM ACN I ; # CONNECTION NUMBER #
ITEM I ; # INDUCTIVE VAR #
ITEM FOUND B ; # FOUND FLAG #
FOUND = FALSE; # SET FLAG TO FALSE #
FOR I = 0 STEP 1 WHILE I LS MAXFILEXFR
AND NOT FOUND
DO
BEGIN
IF FTTACN[I] EQ ACN
THEN
BEGIN
FOUND = TRUE ;
FTTINDEX = I ;
END
END
IF NOT FOUND
THEN
NP$ERR("49") ; # ABORT THE C.P. ERROR OCCURED #
RETURN ;
END
TERM
*ENDIF