*DECK NS$NON
USETEXT COM$NS
USETEXT DEF$NS
PROC NS$NON; # ISSUE NETON REQUEST #
# TITLE NS$NON - ISSUE NETON REQUEST. #
BEGIN # NS$NON #
#
** NS$NON - ISSUE NETON REQUEST.
*
* J.C. LEE 1981
*
* THIS ROUTINE ISSUES NETON REQUEST.
*
* PROC NS$NON
*
* ENTRY:
* NONE.
*
* EXIT:
* NONE.
*
* METHOD:
* ISSUE "NS TRYING NETON" MESSAGE TO DAYFILE.
* KEEP ON TRYING TO NETON AS LONG AS NETON
* LIMIT HAS NOT REACHED AND NAM NOT AVAILABLE.
* IF NETON NOT SUCCESSFUL, DAYFILE MESSAGE AND ABORT.
* ELSE, SET NS NETTED-ON FLAG.
*
#
$BEGIN
XREF
BEGIN
PROC NS$DBG; # TRACE PROCEDURE CALL #
END
$END
XREF
BEGIN
PROC NETON; # NETON #
PROC NS$MSG; # DISPATCH MESSAGE #
PROC RECALL; # RECALL #
END
DEF N$NETONTRY # 10000 #; # NUMBER OF NETON TRYS ALLOWED #
STATUS NETONSTAT # NETON RETURN STATUS #
NETTEDON, # 0 NORMAL, NETON ACCEPTED #
NONAM, # 1 ABNORMAL, NAM NOT AVAILABLE #
DUPAPPL, # 2 ABNORMAL, DUPLICATE APPLICATION NETON #
APPLDA, # 3 ABNORMAL, APPLICATION DISABLED #
;
DEF L$M01 # 3 #; # BAD NETON MESSAGE SIZE #
DEF DM$M01 # DM$ABORT+DM$SYSLOC #; # MESSAGE ROUTING OPTIONS #
ARRAY MSG$M01 [1:3] S(L$M01);
BEGIN # BAD NETON MESSAGE #
ITEM M01$TEXT C(0,0,21) = [ # MESSAGE TEXT #
"NS NAM NOT AVAILABLE.",
"NS DUPLICATE NETON. ",
"NS DISABLED. ",
];
ITEM M01$END U(2,6,54) = [3(0)]; # LINE TERMINATOR #
END
DEF L$M02 # 2 #; # TRYING NETON MESSAGE SIZE #
DEF DM$M02 # DM$SYSLOC #; # MESSAGE ROUTING OPTIONS #
ARRAY MSG$M02 [0:0] S(L$M02);
BEGIN # TRYING NETON MESSAGE #
ITEM M02$TEXT C(0,0,16) = # MESSAGE TEXT #
["NS TRYING NETON."];
ITEM M02$END U(1,36,24) = [0]; # LINE TERMINATOR #
END
ITEM I I; # LOOP VARIABLE #
ITEM STAT S:NETONSTAT; # NETON RETURN STATUS #
CONTROL EJECT;
$BEGIN
NS$DBG("NON"); # TRACE CALL #
$END
NS$MSG(MSG$M02,L$M02,DM$M02); # DAYFILE -TRYING NETON- #
STAT = S"NONAM";
FOR I = 1 STEP 1 WHILE STAT EQ S"NONAM" # NAM NOT AVAILABLE #
AND I LQ N$NETONTRY # NETON TRYS ALLOWED #
DO # KEEP ON TRYING TO NETON #
BEGIN
RECALL(0); # GIVE UP CPU WHILE WAITING FOR NAM #
NETON("NS",NSUPWORD,STAT,0,0); # ISSUE NETON REQUEST #
END
IF STAT NQ S"NETTEDON"
THEN # NETON IS NOT SUCCESSFUL #
NS$MSG(MSG$M01[STAT],L$M01,DM$M01); # DAYFILE / ABORT NS #
NSNETON = TRUE; # SET NS NETTED ON FLAG #
RETURN;
END # NS$NON #
TERM