*DECK QTCMD USETEXT AIPDEF USETEXT QTRMCOM USETEXT QTRMNIT PROC QTCMD(CC,ADDR); *IF DEF,IMS # *1DC QTCMD * * 1. PROC NAME AUTHOR DATE * QTCMD E. GEE 11/01/84 * * 2. FUNCTION DESCRIPTION. * PROCESS COMMAND CODES FROM THE APPLICATION TO ALTER THE * EXECUTION OF QTRM. * * 3. METHOD USED. * IF QTOPEN NOT CALLED YET AND COMMAND CODE IS NOT 9, * CALL NP$ERR TO ISSUE DAYFILE MESSAGE AND ABORT APP. * IF COMMAND CODE VALID, * STORE NORMAL COMPLETION RETURN CODE FIELD IN NIT. * JUMP TO CODE TO PROCESS THE COMMAND CODE. * 1: SET NOTIFICATION OF BREAK INDICATOR FLAG. * CLEAR AUTOMATIC PROCESS OF USER BREAK FLAG. * 2: SET NOTIFICATION OF USER INTERRUPT FLAG. * 3: SET NOTIFICATION OF INACTIVE CONNECTION FLAG. * 4: SET SUPPORT NAM K-DISPLAY FLAG. * 5: SET NOTIFICATION OF INITIAL CONNECTION REQUEST FLAG. * 6: STORE ADDRESS IN PARM-ADDR FIELD OF NIT. * 7: SET AUTOMATIC PROCESS OF USER BREAK FLAG. * CLEAR NOTIFICATION OF BREAK INDICATOR FLAG. * 8: IF APP WANTS TO POLL INDIVIDUAL CONNECTIONS FOR DATA, * SET CONNECTION POLLING FLAG. * ELSE (APP WANTS TO REVERT TO POLLING ALL CONNECTIONS), * CLEAR CONNECTION POLLING FLAG. * 9: SET NO ABORT IF NETON REJECTED FLAG. * 10: SET NO ABORT IF ERR/LGL RECEIVED FLAG. * 11: SUPPORT ONLY SPECIFIED DEVICE TYPES. * 12: PROCESS PRU/ON SUP MSG ONLY FOR SPECIFIED DEVICE TYPES. * 13: CONVERT PM MESSAGES. * ELSE (INVALID COMMAND CODE VALUE), * STORE QTCMD REJECT RETURN CODE IN NIT. * STORE REASON FOR REJECT IN SEC-RETURN-CODE FIELD. * RETURN. * * 4. ENTRY CONDITIONS. * CC COMMAND CODE * ADDR ADDRESS TO STORE IN PARM-ADDR FIELD * * 5. NORMAL EXIT CONDITIONS. * NIT$RC OK RETURN CODE * * 6. ABNORMAL EXIT CONDITIONS. * NIT$RC QTCMD REJECT RETURN CODE * NIT$S$RC REASON FOR QTCMD REJECTING CALL * * 7. COMDECKS AND SYMPL TEXT USED. * AIPDEF AIP DEFINITIONS * NP$CRT CDC COPYRIGHT * QTRMCOM QTRM VARIABLES * QTRMNIT NIT * * 8. ROUTINES AND OVERLAYS CALLED. * NP$ERR ISSUE ERROR MESSAGE AND ABORT APP * * 9. DAYFILE MESSAGES OR OTHER IMPORTANT INFORMATION. * *** NETWORK APPLICATION ABORTED, RC = 75. *** * *** QTCMD: REQUEST INVALID BEFORE QTOPEN. *** * # *ENDIF # CONTROL DEFINITIONS # CONTROL PRESET; CONTROL PACK; CONTROL DISJOINT; CONTROL INERT; CONTROL FASTLOOP; *CALL NP$CRT # INPUT VARIABLES # ITEM ADDR; # ADDRESS TO STORE IN PARM-ADDR FIELD # ITEM CC; # COMMAND CODE # # ROUTINES CALLED # XREF BEGIN PROC NP$ERR; # DAYFILE ERROR MESSAGE AND ABORT APP # END # LOCAL VARIABLES # DEF MINCC#1#; # MINIMUM COMMAND CODE VALUE # DEF MAXCC#13#; # MAXIMUM COMMAND CODE VALUE # SWITCH SWTCH$CC ,CC$1,CC$2,CC$3,CC$4,CC$5,CC$6,CC$7,CC$8, CC$9,CC$10,CC$11,CC$12,CC$13 ; #**********************************************************************# CONTROL EJECT; # EXECUTABLE CODE BEGINS HERE # BEGIN IF (NOT NETON$STATUS) AND # APP HAS NOT NETTED ON YET # (CC NQ 9 ) # COMMAND CODE IS NOT 9 # THEN # QTOPEN HAS NOT BEEN CALLED # BEGIN NP$ERR("75"); # ISSUE ERROR MESSAGE AND ABORT APP # END IF NETON$STATUS THEN # QTOPEN MUST ALREADY HAVE BEEN CALLED # BEGIN # SO NIT ADDRESS MUST ALREADY EXIST # P = NIT$ADDR; # ADDRESS OF NETWORK INFORMATION TABLE # NIT$RC[0] = S"OK"; # INITIALIZE RETURN CODE TO SUCCESSFUL COM# END IF (CC GQ MINCC) AND (CC LQ MAXCC) THEN # VALID COMMAND CODE # BEGIN GOTO SWTCH$CC[CC]; CC$1: # NOTIFICATION OF BREAK INDICATOR MARK # BEGIN BREAKMARK = TRUE; # SET FLAG TO NOTIFY APP ABOUT BI/MARK # AUTOBREAK = FALSE; # CLEAR AUTO BREAK PROCESSING FLAG # GOTO CC$END; END CC$2: # NOTIFICATION OF USER/APPL INTERRUPTS # BEGIN USERINTR = TRUE; # SET FLAG TO NOTIFY APP ABOUT INTR/USR # GOTO CC$END; END CC$3: # NOTIFICATION OF INACTIVE CONNECTIONS # BEGIN INACTIVE = TRUE; # SET FLAG TO NOTIFY APP ABOUT FC/INACT # GOTO CC$END; END CC$4: # APPLICATION SUPPORTS NAM K-DISPLAY # BEGIN KDISPLAY = TRUE; # SET FLAG FOR SUPPORTING NAM K-DISPLAY # GOTO CC$END; END CC$5: # NOTIFICATION OF CONNNECTION REQUESTS # BEGIN CONINIT = TRUE; # SET FLAG TO NOTIFYING APP ABOUT CON/REQ # GOTO CC$END; END CC$6: # STORE ADDRESS IN PARM-ADDR FIELD OF NIT # BEGIN NIT$PARMADR[0] = LOC(ADDR); # ADDR TO STORE IN PARM-ADDR # GOTO CC$END; END CC$7: # AUTOMATIC PROCESSING OF USER BREAKS # BEGIN AUTOBREAK = TRUE; # SET FLAG FOR AUTO USER BREAK PROCESSING # BREAKMARK = FALSE; # CLEAR NOTIFICATION OF BREAK MARK FLAG # GOTO CC$END; END CC$8: # SELECT CONNECTION FOR POLLING DATA # BEGIN IF ADDR EQ 1 THEN # APP WANTS TO SELECT DATA FROM CONNECTION# BEGIN CONPOLL = TRUE; # SET FLAG FOR NETGET PROCESSING # END ELSE # APP WANTS TO REVERT BACK TO LIST PROCESS# BEGIN CONPOLL = FALSE; # CLEAR FLAG TO REVERT TO CALLING NETGETL # END GOTO CC$END; END CC$9: # DO NOT ABORT IF NETON IS REJECTED # BEGIN NOABTNETONA = TRUE; # SET FLAG TO NOT ABORT IF NETON REJECT # GOTO CC$END; END CC$10: # DO NOT ABORT IF ERR/LGL IS RECEIVED # BEGIN NOABTERRLGL = TRUE; # SET FLAG TO NOT ABT IF ERR/LGL RECEIVE# GOTO CC$END; END CC$11: # SUPPORT ONLY SPECIFIED DEVICE TYPES # BEGIN SUPDTW[0] = ADDR; # SET DEVICE TYPE FLAGS # GOTO CC$END; END CC$12: # PROCESS PRU/ON SUP MSG ONLY FOR # # SPECIFIED DEVICE TYPES. # BEGIN PRUDTW[0] = ADDR; # SET DEVICE TYPES FOR PRU/ON PROCESSING # PRUTRAA[0] = FALSE;# PRU INTERFACE NOT SUPPORTED FOR INTRAHST# PRUCON[0] = FALSE; # PRU INTERFACE NOT SUPPORTED FOR CONSOLE # GOTO CC$END; END CC$13: # CONVERT PM MESSAGES # BEGIN IF (ADDR LS 0) OR # MINIMUM CONVERSION CODE # (ADDR GR 2) # MAXIMUM CONVERSION CODE # THEN # INVALID CONVERSION CODE WAS SPECIFIED # BEGIN NIT$RC[0] = NITRTC"QTCMDREJ"; # QTCMD REJECT RETURN CODE # NIT$S$RC[00] = NITSRTC"BADCONVC"; # BAD CONVERSION CODE # END ELSE # VALID CONVERSION CODE WAS SPECIFIED # BEGIN PMCONV = ADDR; # SET TYPE OF CONVERSION FOR PM MESSAGES # END GOTO CC$END; END CC$END: # END OF CASE STATEMENT # END ELSE # BAD COMMAND CODE WAS SPECIFIED # BEGIN NIT$RC[0] = S"QTCMDREJ"; # QTCMD REJECT RETURN CODE # NIT$S$RC[0] = S"UNRECOG"; # BAD COMMAND CODE # END RETURN; END TERM