cdc:nos2.source:nam5871:np_xfer
Table of Contents
NP$XFER
Table Of Contents
- [00003] PROC NP$XFER(BASE)
- [00096] PROC NP$ERR
- [00097] PROC NP$OSIF
- [00098] PROC NP$RCL
- [00100] PROC NP$SN
Source Code
- NP$XFER.txt
- *DECK NP$XFER
- USETEXT AIPDEF
- PROC NP$XFER(BASE);
- *IF DEF,IMS
- #
- *1DC NP$XFER
- *
- * 1. PROC NAME AUTHOR DATE
- * NP$XFER S.KRULEVITCH 77/05/23
- *
- * 2. FUNCTIONAL DESCRIPTION
- * THIS ROUTINE FORMATS A REQUEST TO MOVE THE NWL TO NIP.
- * IT CALLS NP$OSIF TO MAKE THE ACTUAL OPERATING SYSTEM CALL.
- *
- * 3. THE SUBSYSTEM CALL IS FORMATTED AS FOLLOWS:
- * 2 3 4
- * 0 0 2
- * S S C AUTO SS$ID=NIP ADDR=BASE=LOC(NWL)
- * NWL[NCTL] CONTAINS THE COMPLETE BIT,ERROR FLAGS,THE RT BITS
- * AND THE WORD COUNT OF THE NWL(MAXIMUM=64=100B).
- * RT BIT 47 SET TO ZERO MEANS THE OPERATING SYSTEM WILL HOLD A
- * REQUEST UNTIL THE SUBSYSTEM IS ABLE TO ACCEPT IT. SET TO ONE,
- * CONTROL WILL BE RETURNED TO THE USER IF THE SUBSYSTEM IS BUSY.
- * RT BIT 46 SET TO ONE IMPLIES THAT ERROR FLAGS WILL BE SET AND
- * CONTROL WILL BE RETURNED TO THE USER ON NONFATAL ERRORS.
- * THE AUTO RECALL BIT WILL BE SET IF THE APPLICATION IS NOT IN
- * PARALLEL MODE.
- * IF IT IS A NETON WORKLIST, THE NWL WILL BE ISSUED WITH RECALL
- * (IF APPLICATION IS NOT IN PARALLEL MODE) ON NETON WORKLIST
- * ENTRY-S COMPLETION BIT.
- *
- * 4. ENTRY CONDITIONS
- * BASE - SET TO THE ADDRESS OF EITHER NWL OR SWL
- * BUF$LEN[1] - SET TO NUMBER OF WORDS IN WORKLIST
- * ACCEPTED - TRUE IF WORKLIST TRANSFER IS NOT A NETON
- * PARALLEL - SET TRUE IF APPLICATION WANTS TO GAIN CONTROL AS
- * SOON AS POSSIBLE AFTER NIP HAS BEEN CALLED
- *
- * 5. EXIT CONDITIONS
- * BASE - SET TO ADDRESS OF THE ARRAY WHICH CONTAINS (OR WILL
- * CONTAIN) THE WORKLIST RESPONSE.
- * DEFER$PRO - SET TRUE IF THE COMPLETE BIT, CB[0], IS NOT SET -
- * SO SUPERVISORY MESSAGE PROCESSING WAS DEFERRED
- *
- * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
- * AIPDEF CRCOM NP$DB NP$LOF
- * NP$MODE NP$NWL NP$STAT
- *
- * 7. ROUTINES CALLED
- * NP$ERR - ERROR PROCESSIMG
- * NP$OSIF - ISSUE OS REQUEST
- * NP$RCL - RECALL COMPASS ROUTINE
- * NP$SN - INCREMENTS STATISTICS COUNTER
- *
- * 8. DAYFILE MESSAGES
- * NETWORK APPLICATION ABORTED, RC = 51.
- * NP$XFER: NWL HAS OVERFLOWED.
- *
- * NETWORK APPLICATION ABORTED, RC = 67.
- * NP$XFER: NIP NOT AVAILABLE AT SCP.
- *
- *
- # NAMA614
- *ENDIF
- BEGIN
- #
- THE FOLLOWING COMMON DECKS ARE COMPILED INLINE IN
- ORDER TO PRESET THE COMMON BLOCKS.
- #
- CONTROL PRESET;
- *CALL CRCOM
- *CALL NP$MODE
- *CALL NP$NWL
- *CALL NP$NWNC
- *CALL NP$STAT
- *IF,DEF,DEBUG
- *CALL NP$DB
- *CALL NP$LOF
- *ENDIF
- *IF DEF,XFR,4
- *CALL NX$ACBF
- *CALL NX$ACBX
- *CALL NX$MSG
- *CALL NX$CHAR
- # #
- # FORMAL PARAMETERS: #
- # #
- ITEM BASE I; #ADDRESS OF WORKLIST #
- # #
- # EXTERNAL ROUTINES CALLED: #
- # #
- XREF BEGIN
- PROC NP$ERR; #ERROR PROCESSOR #
- PROC NP$OSIF; #ISSUE OS REQUEST #
- PROC NP$RCL; #RECALL #
- *IF DEF,STAT
- PROC NP$SN; #INCREMENTS STATISTICS COUNTER#
- *ENDIF
- END #XREFS#
- # #
- # LOCAL DECLARATIONS: #
- # #
- XREF ITEM SS$ID U; # NIP SCP IDENT #
- ARRAY SSCALL[0] S(1);
- ITEM
- CTL$WD I (0),
- SSC C (0,0,3),
- AUTO B (0,19,1),
- SSCP U(0,20,4),
- SS U (0,30,12),
- ADDR U (0,42,18);
- BASED ARRAY PAREA[0:63] S(1);
- ITEM
- WORD I (0),
- BUF$LEN U (0,30,12),
- RSSRIN I(0,0,36),
- WRDCNT I(0,36,6),
- RCDC I(0,42,4),
- RT I(0,46,2),
- FLAGS I(0,48,11),
- OPCD U(0,54,5), # WORKLIST OPCODE #
- CBIT B(0,59,1);
- ITEM
- N I; #TEMPORARY VARIABLE #
- #**********************************************************************#
- # #
- # NP$XFER EXECUTION BEGINS HERE #
- # #
- P<PAREA> = BASE;
- IF PARALLEL
- THEN
- WORD[0] = X"3000"; #SET RT BITS (12 AND 13) #
- ELSE
- WORD[0] = X"2000";
- # BIT 12 SET TO ONE IMPLIES THAT THE O/S WILL RETURN CONTROL TO #
- # THE USER IF THE SUBSYSTEM IS BUSY. #
- N=BUF$LEN[NHDR];
- *IF DEF,DEBUG
- IF N GR LWL+1 #WORKLIST HAS OVERFLOWED NWL #
- THEN
- BEGIN
- NP$ERR("51"); # NAM DEBUG ERROR. #
- END #N GR WLS#
- *ENDIF
- WRDCNT[0] = N;
- # #
- # SET UP SSC CALL #
- # #
- CTL$WD = 0;
- SSC = "SSC";
- AUTO = NOT PARALLEL AND ACCEPTED;
- SS = SS$ID;
- ADDR = BASE;
- NP$OSIF(SSCALL);
- # #
- # CHECK FLAGS #
- # #
- IF PARALLEL
- THEN
- BEGIN
- IF NOT CBIT[0]
- THEN
- BEGIN
- DEFER$PRO = TRUE;
- C$FLAG[0] = FALSE; #OPERATION INCOMPLETE #
- IF NOT ACCEPTED
- THEN
- BEGIN # IF A NETON WORKLIST TRANSFER #
- IF NWL$CB[NHDR+1]
- THEN
- BEGIN # NETON OPERATION IS COMPLETED #
- DEFER$PRO = FALSE;
- C$FLAG = TRUE;
- N$FLAG = TRUE;
- END
- END
- *IF DEF,STAT
- # #
- # UPDATE STATISTICS #
- # #
- NP$SN(TYPE"WLX"); #INCREMENT COUNTER #
- *ENDIF
- END
- ELSE
- BEGIN
- DEFER$PRO = FALSE;
- C$FLAG[0] = TRUE; #OPERATION COMPLETE #
- *IF -DEF,STAT
- N$FLAG = NOT CTL$NONAM[NCTL];
- *ENDIF
- *IF DEF,STAT
- IF CTL$NONAM[NCTL]
- THEN
- BEGIN
- N$FLAG = FALSE; #NAM NOT AVAILABLE #
- NP$SN(TYPE"WLNX"); #INCREMENT COUNTER #
- END #NONAM#
- *ENDIF
- IF CTL$BUSY[NCTL]
- THEN
- BEGIN
- C$FLAG = FALSE; #OPERATION INCOMPLETE #
- DEFER$PRO = TRUE;
- *IF DEF,STAT
- # #
- # UPDATE STATISTICS #
- # #
- NP$SN(TYPE"WLNX"); #INCREMENT COUNTER #
- *ENDIF
- END
- *IF DEF,STAT
- ELSE
- BEGIN
- # #
- # UPDATE STATISTICS #
- # #
- NP$SN(TYPE"WLX"); #INCREMENT COUNTER #
- END #PARALLEL SUCCESSFUL WORKLIST TRANSFER#
- *ENDIF
- END#CB TRUE#
- END #PARALLEL FLAGS SET#
- ELSE
- IF OPCD[NHDR+1] NQ OP$OFF
- THEN # THIS WAS NOT A NETOFF WORKLIST #
- BEGIN
- IF CTL$NONAM[NCTL]
- THEN # NAM IS NOT AVAILABLE #
- BEGIN
- IF (ACCEPTED ) AND # NETON COMPLETED SUCCESSFULLY #
- (NOT NOABTAPP) # OKAY TO ABORT APPLICATION #
- THEN # NON-NETON WORKLIST TRANSFER HAD FAILED #
- BEGIN # ABORT APP SINCE NAM IS GONE #
- N$AWL[0] = 0; # CLEAR AWL RESPONSE FLAGS #
- *IF DEF,STAT
- NP$SN(TYPE"WLNX");
- *ENDIF
- NP$ERR("67");
- END
- ELSE
- N$FLAG[0] = FALSE; # NAM NOT AVAILABLE #
- END
- ELSE
- BEGIN # NAM IS AVAILABLE #
- IF CTL$BUSY[NCTL]
- THEN # NIP HAD NO BUFFER AVAILABLE FOR NWL #
- BEGIN
- *IF,DEF,STAT
- NP$SN(TYPE"WLNX"); # INCREMENT NO OF REJECTED NWLS #
- *ENDIF
- END
- ELSE # NWL WORKLIST RECEIVED BY NIP #
- BEGIN
- IF ACCEPTED
- THEN # APPLICATION HAS ALREADY NETTED ON #
- BEGIN
- *IF,DEF,STAT
- NP$SN(TYPE"WLX"); # INCREMENT NO OF SUCCESSFUL NWLS #
- *ENDIF
- END
- ELSE # THIS MUST BE NETON NWL ISSUED W/O RECALL#
- BEGIN
- NP$RCL(LOC(NWL[NHDR+1])); # WAIT FOR NIP TO PROCESS #
- END # NETON WORKLIST #
- END
- *IF DEF,XFR
- IF XFRWLIST
- THEN
- BEGIN # VALIDATING NETXFR CALL #
- FOR N = N WHILE NOT NWL$CB[NHDR+1]
- DO
- NP$RCL(0) ; # RECALL UNTILL RESPONSE FROM NAM #
- END
- *ENDIF
- END
- END
- RETURN;
- END #NP$XFER#
- TERM
cdc/nos2.source/nam5871/np_xfer.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator