cdc:nos2.source:nam5871:nvfticr
Table of Contents
NVFTICR
Table Of Contents
- [00006] PROC NVFTICR(SWTESS)
- [00007] NVFTICR - ISSUE CPM REQUEST
- [00011] ISSUE CPM REQUEST.
- [00056] PROC DFC
- [00057] FUNC GETFIL I
- [00058] PROC GLIDC
- [00059] PROC GPIDA
- [00060] PROC SPIDA
- [00061] PROC JROUTE
- [00062] PROC NVFUMQE
- [00063] PROC SSTRQE
- [00064] PROC VALIDU
- [00065] PROC SSTATS
- [00066] PROC SSTRTS
- [00120] GETPARM - ARRAY FOR THE LOCAL AND PERMANENT FILE NAMES.
- [00372] PROC REQCOMP
- [00373] REQCOMP - REQUEST COMPLETED PROCESSOR.
- [00376] REQCOMP - REQUEST COMPLETED PROCESSOR.
Source Code
- NVFTICR.txt
- *DECK NVFTICR
- USETEXT TEXTNVF
- USETEXT TXTANVF
- USETEXT TEXTSS
- PROC NVFTICR(SWTESS);
- # TITLE NVFTICR - ISSUE CPM REQUEST #
- BEGIN # NVFTICR #
- #
- ** NVFTICR - ISSUE CPM REQUEST.
- *
- * E. THAVIKULWAT 81/10/13
- * C. BRION 83/02/15,83/05/05,83/09/08,83/12/08.
- *
- * THIS PROCEDURE ISSUES CPM 56B, CPM73B, DSP ROUTE FUNCTION
- * REQUESTS, GET FILE REQUESTS AND GETLIDC/GETPIDA/SETPIDA
- * FUNCTION CALLS AND IS CALLED INTO EXECUTION BY THE STATUS
- * WORKLIST PROCESSOR.
- *
- * PROC NVFTICR(SWTESS)
- *
- * ENTRY:
- * SWTESS = STATUS WORKLIST MONITOR ARRAY.
- * CPMRQ = CPM REQUEST QUEUE.
- *
- * EXIT:
- * APPROPRIATE FUNCTION REQUEST ISSUED AND PARAMETERS
- * SET DEPENDING ON WHAT EVENT IS TO RESTART THIS PROCEDURE.
- *
- * NOTES:
- * ONLY ONE REQUEST CAN BE OUTSTANDING AT ANY ONE TIME, THUS
- * IF THE REQUEST IS NOT COMPLETED IMMEDIATELY, RETURN PARAMETERS
- * ARE SET UP TO WATCH FOR COMPLETE BIT AND ROUTINE EXITS. IF THE
- * REQUEST IS COMPLETED IMMEDIATELY, THE NEXT ENTRY IN THE *CPMRQ*
- * QUEUE IS PROCESSED. IF *CPMRQ* QUEUE HAS BEEN EXHAUSTED,
- * RETURN PARAMETERS ARE SET UP TO WATCH THE INTERRUPT WORD
- * *INVTICR* ASSOCIATED WITH *CPMRQ* QUEUE.
- *
- * METHOD:
- * IF COMPLETE BIT SET AND REQUEST IS A CPM 56B (VALID) REQUEST,
- * ENTER THE RETURNED PARAMETER BLOCK INTO THE REQUESTED DESTINA-
- * TION QUEUE (EITHER THE T-A VDATAQ OR THE A-A AAVDATAQ). COMP-
- * PLETED DFC, DSP ROUTE REQUESTS, AND GET REQUESTS ARE IGNORED.
- *
- * CALL *SSTRQE* TO COPY ENTRY FROM *CPMRQ* QUEUE TO WORKING
- * BUFFER AND ISSUE APPROPRIATE CPM REQUEST.
- #
- #
- **** PROC NVFTICR - XREF LIST.
- #
- XREF
- BEGIN
- PROC DFC; # DECREMENT FAMILY COUNT #
- FUNC GETFIL I; # GET FILE MACREL FUNCTION #
- PROC GLIDC; # MACREL GET LID CONFIGURATION #
- PROC GPIDA; # MACREL GET PID ATTRIBUTES #
- PROC SPIDA; # MACREL SET PID ATTRIBUTES #
- PROC JROUTE; # ROUTE MACREL ROUTINE #
- PROC NVFUMQE; # TRANSFER TEXT TO QUEUE #
- PROC SSTRQE; # TRANSFER QUEUE ENTRY TO FIXED BUFFER #
- PROC VALIDU; # VALIDATE TERMINAL USER #
- PROC SSTATS; # SS - ALLOCATE TABLE SPACE #
- PROC SSTRTS; # SS - RELEASE TABLE SPACE #
- END
- #
- ****
- #
- DEF LENGTH$ #(CPMSIZ$+1)*10#; # NUMBER OF CHARACTERS #
- DEF SETNWST$ # 1 #; # SET NW STATUS FUNCTION CODE #
- *CALL SWTESS
- ITEM I I; # LOOP VARIABLE #
- ITEM J I; # LOOP VARIABLE #
- ITEM ADDR I; # ADDRESSING INFORMATION FOR ABH #
- ITEM NUMWRDS I; # NUMBER OF WORDS TO COPY #
- ITEM GETSTAT I; # RETURN STATUS FROM GETFIL CALL #
- ITEM AX I; # ACPID TABLE INDEX WORD ORDINAL #
- ITEM BUFSIZ I; # SIZE OF ACPID TABLE REQUIRED #
- ITEM FXADDR I; # ADDR OF PARAMETER RECORD #
- ITEM PTR I; # POINTER OF IFMC TABLE #
- ITEM FFN B; # FOUND FAMILY NAME #
- #
- * THE FOLLOWING ARRAY IS USED FOR SAVING THE INCOMING FUNCTION RE-
- * QUEST AND ASSOCIATED PARAMETERS.
- #
- ARRAY FUNCTYP[00:00] S(3);
- BEGIN
- ITEM FCT$WORD U(00,00,60); # FULL WORD REFERENCE #
- ITEM FCT$WORD1 U(01,00,60); # FULL WORD 1 REFERENCE #
- ITEM FCT$FC U(00,00,06); # CPM REQUEST FUNCTION CODE #
- ITEM FCT$SFC U(00,06,06); # GET FILE SUB FX CODE #
- ITEM FCT$VCB U(00,24,12); # ACN FOR CPM REQUEST #
- ITEM FCT$QNUM U(00,42,18); # Q NUMBER FOR CPMDATA Q #
- ITEM FCT$LID C(01,00,03); # 3 CHAR LID VALUE #
- ITEM FCT$PID C(01,18,03); # 3 CHAR PID VALUE #
- ITEM FCT$BSIZ U(01,36,13); # DICTATED BUFFER SIZE-LPID FX #
- ITEM FCT$NWST U(01,56,04); # NETWORK STATUS #
- ITEM FCT$WORD2 U(02,00,60); # FULL WORD 2 REFERENCE #
- ITEM FCT$IFCTF B(02,58,01); # INCREMENT FAMILY COUNT FALG #
- END
- #
- * TEMPSTOR - WORKING STORAGE BASED ARRAY.
- #
- BASED ARRAY TEMPSTOR [00:00] S(1);
- BEGIN
- ITEM DUMY U(00,00,60); # WORD REFERENCE #
- END
- #
- ** GETPARM - ARRAY FOR THE LOCAL AND PERMANENT FILE NAMES.
- #
- ARRAY GETPARM [00:00] S(2);
- BEGIN
- ITEM GET$WORD0 U(00,00,60);
- ITEM GET$WORD1 U(01,00,60);
- ITEM GET$LFN C(00,00,07); # LOCAL FILE NAME #
- ITEM GET$PFIX C(01,00,02)=["ZZ"]; # ZZ PREFIX FOR FILE NAME #
- ITEM GET$RPFN C(01,12,05); # 5 CHAR APPL NAME SFIX #
- ITEM GET$PFN C(01,00,07); # FULL PERM FILE NAME #
- END
- #
- ** THE FOLLOWING BASED ARRAY POINTER POINTS TO THE NEW IFMC ENTRY
- #
- BASED ARRAY BIFMC[00:00] S(1);
- BEGIN
- ITEM BFMC$WORD U(00,00,60); # FULL WORD REFERENCE #
- END
- CONTROL EJECT;
- #
- * IF THE WAITCPM FLAG IS TRUE UPON ENTRY, THEN A FUNCTION
- * REQUEST HAS COMPLETED. CALL INTERNAL PROCEDURE REQCOMP TO
- * COMPLETE THE POST REQUEST RESPONSIBILITIES.
- * IF FXACTIVE FLAG (FUNCTION ACTIVE) IS TRUE, COMPLETION
- * STATUS MUST BE CHECKED PRIOR TO ANOTHER FUNCTION REQUEST
- * BEING REMOVED FROM THE CPMRQ FOR PROCESSING.
- #
- IF WAITCPM
- THEN
- BEGIN
- WAITCPM = FALSE;
- FXACTIVE = FALSE;
- REQCOMP;
- END
- IF NOT FXACTIVE
- THEN
- BEGIN
- #
- * PROCESS ENTRY FROM *CPMRQ* QUEUE IF ANY.
- #
- FOR I = 0 WHILE CPMLNGTH NQ 0
- DO
- BEGIN
- #
- * CLEAR CPM PARAMETER BLOCK.
- #
- FOR J = 0 STEP 1 UNTIL CPMSIZ$
- DO
- BEGIN
- CPB$WORD[J] = 0;
- END
- #
- * TRANSFER REQUEST TO WORKING BUFFER. SET UP FUNCTION REQUEST
- * PARAMETER BLOCK AND GENERATE REQUEST.
- #
- SSTRQE(P<CPMRQ>,WCBUF,ABHBUF,MSGBUF);
- FCT$WORD[0] = MSG$WORD[0]; # SAVE FC AND ACN #
- FCT$WORD1[0] = MSG$WORD[1]; # SAVE LID/PID INFO IF PRESENT#
- FCT$WORD2[0] = MSG$WORD[2]; # SAVE INCREMENT FAM COUNT INF#
- NUMWRDS = WCB$WC[0] - 3; # LESS WC,ABH, AND FC WORD #
- FOR J = 0 STEP 1 UNTIL (NUMWRDS - 1)
- DO
- BEGIN
- CPB$WORD[J] = MSG$WORD[J+1];
- END
- IF FCT$FC[0] EQ CPM56B$
- THEN # VALIDATE REQUEST #
- BEGIN
- VALIDU(CPMBUF);
- END
- ELSE IF FCT$FC[0] EQ CPM73B$ # DECREMENT FAMILY COUNT REQ #
- THEN
- BEGIN
- #
- * BEFORE CALLING DFC TO DECREMENT FAMILY COUNT, SEARCH IFMC TABLE,
- * FIND THE RIGHT ENTRY AND DECREMENT THE COUNT FIELD BY 1.
- #
- FOR J=0 STEP 1 UNTIL (IFCLNGTH-1)
- DO
- BEGIN
- IF IFMC$FNAM[J] EQ CPB$FNAM[0]
- THEN
- BEGIN
- IFMC$COUNT[J]=IFMC$COUNT[J]-1;
- IF IFMC$COUNT[J] EQ 0
- THEN
- SSTRTS(P<IFMC>,J,1);
- END
- END
- DFC(CPMBUF);
- END
- ELSE IF FCT$FC[0] EQ DSPROUTE$ # DSP ROUTE FUNCTION #
- THEN
- BEGIN
- #
- * ROUTE OF FILE TO AUTO START AN APPLICATION REQUEST.
- * MUST PERFORM GET ON ZZ FILE TO GET THE FILE FOR ROUTING.
- #
- FCT$SFC[0] = GETFC$;
- GET$WORD0[0] = 0;
- GET$WORD1[0] = 0;
- GET$PFIX[0] = "ZZ";
- GET$LFN[0] = C<0,7>CPB$WORD[0];
- GET$RPFN[0] = C<0,5>GET$LFN[0];
- GETSTAT = 0;
- #
- * LFN AND PFN SET. MAKE GETFIL FUNCTION CALL THAT RESULTS IN A GET
- * OF THE PERMANENT FILE WITH RECALL.
- * ON RETURN, FILE EITHER LOCAL OR FUNCTION STATUS INDICATES ERROR.
- * SIMULATE THE COMPLETE BIT BEING SET TO CONTINUE.
- #
- GETSTAT = GETFIL(GET$LFN[0],GET$PFN[0]);
- CPB$CBIT[0] = TRUE;
- END
- ELSE
- BEGIN
- #
- * MUST BE A LID/PID FUNCTION REQUEST.
- * SET ACPID TABLE INDEX,
- * ALLOCATE DICTATED SIZE FOR TABLE,
- * INITIALIZE THE TABLE ENTRY WHICH ACTS AS THE PARAMETER BLOCK
- * FOR THE FUNCTION REQUEST CALL.
- #
- AX = ACPIDL;
- BUFSIZ = FCT$BSIZ[0];
- SSTATS(P<ACPID>,BUFSIZ);
- ACP$WORD0[AX] = 0;
- ACP$WORD1[AX] = 0;
- ACP$WORD2[AX] = 0;
- ACP$WORD3[AX] = 0;
- ACP$SMID[AX] = FCT$FC[0];
- ACP$ESIZ[AX] = BUFSIZ;
- ACP$VCB[AX] = FCT$VCB[0];
- ACP$CBIT[AX] = TRUE;
- FXADDR = LOC(ACPID[AX]) + 2;
- #
- * FUNCTION INDEPENDENT INITIALIZATION DONE.
- * PERFORM FUCTION DEPENDENT SETUP OF PARAMETER BLOCK.
- #
- #
- * IF GETLIDC REQUEST.
- * ISSUE CALL TO MACREL ROUTINE GLIDC TO PERFORM THE GETLIDC CALL.
- #
- IF FCT$FC[0] EQ GLIDCFC$
- THEN
- BEGIN
- ACP$GLCWC[AX] = BUFSIZ - 2;
- ACP$GLCLID[AX] = FCT$LID[0];
- GLIDC(FXADDR);
- END
- #
- * IF GETPIDA REQUEST.
- * ISSUE CALL TO MACREL ROUTINE GPIDA TO PERFORM THE GETPIDA CALL.
- #
- ELSE IF FCT$FC[0] EQ GPIDAFC$
- THEN
- BEGIN
- ACP$GPAPID[AX] = FCT$PID[0];
- GPIDA(FXADDR);
- END
- #
- * IF SETPIDA REQUEST.
- * ISSUE CALL TO MACREL ROUTINE SPIDA TO MAKE SETPIDA CALL.
- #
- ELSE IF FCT$FC[0] EQ SPIDAFC$
- THEN
- BEGIN
- ACP$FC[AX] = SETNWST$;
- ACP$SPANP[AX] = 1;
- ACP$SPANWID[AX] = TRUE;
- ACP$SPAPID[AX] = FCT$PID[0];
- ACP$SPAST[AX] = FCT$NWST[0];
- SPIDA(FXADDR);
- END
- #
- * SET THE COMPLETE BIT TRUE SINCE THESE FUNCTION REQUESTS ARE
- * ISSUED WITH AUTO RECALL (CONTROL LOST UNTIL COMPLETE).
- #
- CPB$CBIT[0] = TRUE;
- END
- #
- * IF FUNCTION REQUEST COMPLETED, ISSUE CALL TO INTERNAL PRO-
- * CEDURE REQCOMP TO PERFORM THE POST REQUEST PROCESSING.
- #
- COMPCHECK:
- IF CPB$CBIT[0]
- THEN
- BEGIN
- CPB$CBIT[0] = FALSE;
- FXACTIVE = FALSE;
- REQCOMP;
- END
- ELSE
- BEGIN # CPM REQUEST NOT YET DONE #
- WAITCPM = TRUE;
- STE$ADDR1[0] = LOC(CPMBUF);
- STE$ADDR2[0] = 0;
- STE$RTN[0] = LOC(NVFTICR);
- STE$INIT1[0] = CPB$WORD[0];
- STE$CBIT1[0] = FALSE; # INSURE COMPLETE BIT IS CLEAR #
- RETURN; # EXIT #
- END
- #
- * CHECK IF FUNCTION PIGGYBACKED AND ACTIVE.
- * IF SO, RETURN TO CHECK IMMEDIATE COMPLETION.
- #
- IF FXACTIVE
- THEN
- GOTO COMPCHECK;
- END # END FOR I LOOP #
- #
- * NO MORE ENTRIES IN *CPMRQ* QUEUE. SET RESTART CONDITION TO WATCH
- * INTERRUPT WORD *INVTICR* ASSOCIATED WITH *CPMRQ* QUEUE.
- #
- INVTICR = 0;
- STE$ADDR1[0] = LOC(INVTICR);
- STE$ADDR2[0] = 0;
- STE$RTN[0] = LOC(NVFTICR);
- STE$INIT1[0] = 0;
- CPB$CBIT[0] = TRUE;
- RETURN;
- #
- * END OF NO ACTIVE FUNCTION PROCESSING.
- #
- END # IF NOT FCACTIVE #
- ELSE
- BEGIN
- GOTO COMPCHECK;
- END
- CONTROL EJECT;
- PROC REQCOMP;
- # TITLE - REQCOMP - REQUEST COMPLETED PROCESSOR. #
- BEGIN # REQCOMP #
- #
- ** REQCOMP - REQUEST COMPLETED PROCESSOR.
- *
- * C. BRION 83/10/19.
- *
- * THIS INTERNAL TO NVFTICR PROCEDURE IS RESPONSIBLE FOR THE POST
- * FUNCTION PROCESSING OF REQUESTS.
- *
- * PROC REQCOMP
- *
- * ENTRY:
- * THE GLOBALS AS DEFINED IN NVFTICR ARE IN EFFECT.
- *
- * EXIT:
- * IF A VALIDATE REQUEST
- * MAKE QUEUE ENTRY CONTAINING RETURN CPM PARAMETERS TO SPECIFIED
- * / QUEUE.
- *
- * IF ROUTE REQUEST AND GET FILE FUNCTION COMPLETE
- * ISSUE ANOTHER REQUEST FOR THE ROUTE OF FILE.
- * SET FUNCTION ACTIVE FLAG (FXACTIVE) TRUE
- *
- * IF A LID/PID FUNCTION
- * IF NOT A SETPIDA FUNCTION
- * MAKE QUEUE ENTRY CONTAINING COMPLETED FUNCTION REQUEST
- * / TO THE SPECIFIED QUEUE.
- * OTHERWISE
- * RELEASE ACPID TABLE SPACE FOR REQUEST.
- #
- CONTROL EJECT;
- #
- * IF VALIDATE FUNCTION COMPLETED
- * ISSUE COMPLETED PARAMETER BLOCK TO INDICATED QUEUE.
- #
- IF FCT$FC[0] EQ CPM56B$
- THEN
- BEGIN
- IF FCT$IFCTF[0]
- THEN
- BEGIN
- #
- * SEARCH IFMC TABLE, IF FAMILY NAME ALREADY DEFINED IN THE TABLE,
- * INCREMENT COUNT FIELD OF THAT ENTRY BY 1. IF NOT, PUT A NEW
- * ENTRY INTO THE TABLE AND SET THE COUNT FIELD TO 1.
- #
- FFN=FALSE;
- FOR J=0 STEP 1 WHILE ((J LS IFCLNGTH) AND (NOT FFN))
- DO
- BEGIN
- IF IFMC$FNAM[J] EQ CPB$FNAM[0]
- THEN
- BEGIN
- IFMC$COUNT[J]=IFMC$COUNT[J]+1;
- FFN=TRUE;
- END
- END
- IF NOT FFN
- THEN
- BEGIN
- PTR=IFCLNGTH;
- SSTATS(P<IFMC>,1); # ALLOC SPACE FOR NEW ENTRY#
- P<BIFMC>=LOC(IFMC[PTR]); # POINT TO NEW IFMC ENTRY #
- BFMC$WORD[0]=0;
- IFMC$FNAM[PTR]=CPB$FNAM[0];
- IFMC$COUNT[PTR]=1;
- END
- END
- ADDR = FCT$VCB[0];
- P<TEMPSTOR> = FCT$QNUM[0];
- NVFUMQE(TEMPSTOR,CPMBUF[0],APPTTX$,ADDR,LENGTH$);
- END
- #
- * CHECK IF GET FILE FUNCTION. IF SO, CHECK TERMINATION CODE.
- #
- IF FCT$FC[0] EQ DSPROUTE$ AND FCT$SFC[0] EQ GETFC$
- THEN
- BEGIN
- FCT$SFC[0] = 0;
- IF GETSTAT EQ 0
- THEN
- BEGIN
- #
- * TERMINATION CODE INDICATES NO ERRORS. ISSUE ROUTE FUNCTION.
- #
- JROUTE(CPMBUF);
- FXACTIVE = TRUE;
- END
- END
- #
- * CHECK IF COMPLETED GETLIDC OR GETPIDA REQUEST.
- * IF SO, SEND COMPLETED FUNCTION REQUEST TO AALPID QUEUE.
- #
- IF FCT$FC[0] EQ GLIDCFC$ OR
- FCT$FC[0] EQ GPIDAFC$
- THEN
- BEGIN
- ADDR = FCT$VCB[0];
- P<TEMPSTOR> = FCT$QNUM[0];
- NVFUMQE(TEMPSTOR,FUNCTYP[0],APPTTX$,ADDR,LPIDLEN$);
- END
- #
- * CHECK IF COMPLETED SETPIDA REQUEST.
- * IF SO, RELEASE ACPID TABLE SPACE.
- * NO NEED TO INFORM OF COMPLETION THRU RETURN QUEUE.
- #
- IF FCT$FC[0] EQ SPIDAFC$
- THEN
- BEGIN
- SSTRTS(P<ACPID>,AX,FCT$BSIZ[0]);
- END
- END # REQCOMP #
- END # END NVFTICR #
- TERM
cdc/nos2.source/nam5871/nvfticr.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator