*DECK NVFOFVD
USETEXT TEXTNVF
USETEXT TEXTSS
USETEXT TXCMDNV
USETEXT TXSMNVF
USETEXT TXTAPSS
PROC NVFOFVD;
# TITLE - FORMAT VCB DATA #
BEGIN
#
** NVFOFVD - FORMAT VCB DATA
*
* D.K. ENDO 82/05/06
* C.J. BRION 83/05/10, 83/11/08.
*
* THIS PROCEDURE FORMAT THE USER/TERM STATUS MESSAGES BASED ON A
* VCBSSQ ENTRY AND THE CURRENT COMMAND.
*
* PROC NVFOFVD
*
* ENTRY 1. VCBSSQ WITH AT LEAST ONE ENTRY.
*
* EXIT 1. USER/TERM STATUS MESSAGE TO THE HOP
* 2. NULL TEXT TO C-LAYER TO CLEAR THE PIPE LINE.
*
#
#
**** PROC NVFOFVD - XREF LIST BEGINS.
#
XREF
BEGIN
FUNC ETIME C(10); # UNPACK PACKED TIME #
PROC SSBSBF; # STORE BIT FIELD #
PROC SSTAQE; # ACCEPT QUIEUE ENTRY #
PROC SSTRQE; # REMOVE QUEUE ENTRY #
FUNC XCDD U; # CONVERT INTEGER TO DECIMAL DISPLAY CODE #
FUNC XSFW C(10); # SPACE FILL A LEFT JUST Z-FILLED NAME #
END
#
****
#
DEF NTUTXTL # 50 #; # CHAR COUNT OF NO TERM/USER TEXT #
DEF NUTTXTL # 30 #; # CHAR CNT OF TERM/USER NOT CONNECTED TEXT#
DEF STSTXTL # 60 #; # CHAR COUNT OF STATUS MESSAGE TEXT #
DEF TUNTXTL # 30 #; # CHAR CNT OF NO TERM UNDER USER TEXT #
ITEM CNST1; # CONSTANT ONE #
ITEM CNST2; # CONSTANT TWO #
ITEM CNST3; # CONSTANT THREE #
ITEM CTEMP C(10); # CHARACTER TEMPORARY #
ITEM I; # LOOP INDUCTION VARIALBLE #
ITEM ASENTRY I; # NUMBER AST ENTRIES #
ITEM AS I; # LOCAL AST ENTRY ORDINAL #
#
THIS ARRAY DEFINES THE DEVICE TYPE TABLE. THE DISPLAY CODE NAME
IS FOUND BY INDEXING INTO THE TABLE WITH THE NUMERIC DT VALUE.
#
DEF DTMAX # 07 #;
ARRAY DT$TABLE [00:DTMAX] S(1);
BEGIN
ITEM DT$VAL C(00,00,10) = ["CON",
"CR",
"LP",
"CP",
"PL",
"SAA",
"MAA",
"DT7"
];
END
#
THIS BASED ARRAY POINTS TO THE MESSAGE TO BE SENT TO THE HOP.
#
BASED ARRAY MTXT [00:00] S(1);
BEGIN
ITEM MTT$WORD I(00,00,60);
END
#
THIS ARRAY DEFINES THE -NO TERM/USER- MESSAGE TEXT SENT WHEN NO
TERMINAL OR USER NAME IS FOUND OR CONNECTED TO APPLICATION.
#
ARRAY NTUTXT [00:00] S(5);
BEGIN
ITEM NTU$TXT1 C(00,00,20) = [" NO TERM/USER CONNEC"];
ITEM NTU$TXT2 C(02,00,24) = ["TED TO THIS APPLICATION."];
ITEM NTU$ZBYT U(04,24,36) = [0];
END
#
THIS ARRAY DEFINES THE -NO TERM UNDER USER- MESSAGE TEXT SENT WHEN
USER IS NOT FOUND.
#
ARRAY NUTTXT [00:00] S(3);
BEGIN
ITEM NUT$MSG C(00,00,25) = [" NO TERM UNDER THIS USER."];
ITEM NUT$ZBYT U(02,30,30) = [0];
END
#
THIS ARRAY DEFINES THE -TERM/USER NOT CONNECTED- MESSAGE TEXT SENT
WHEN THE TERM/USER IS NOT FOUND.
#
ARRAY TUNTXT [00:00] S(3);
BEGIN
ITEM TUN$MSG C(00,00,28) = [" THIS TERM IS NOT CONNECTED."];
ITEM TUN$ZBYT U(02,48,12) = [0];
END
#
THIS ARRAY DEFINES THE STATUS MESSAGE TEXT FOR THE TERM OR USER.
#
ARRAY STSTXT [00:00] S(6);
BEGIN
ITEM STS$TYP C(00,00,04);
ITEM STS$COLON C(00,24,02) = [": "];
ITEM STS$NAM1 C(00,36,42);
ITEM STS$C1 C(01,18,01) = [","];
ITEM STS$NAM2 C(01,24,42);
ITEM STS$C2 C(02,06,01) = [","];
ITEM STS$LTIME C(02,12,09);
ITEM STS$C3 C(03,06,01) = [","];
ITEM STS$ANAM C(03,12,07);
ITEM STS$S1 C(03,54,01) = ["/"];
ITEM STS$ACN U(04,00,18);
ITEM STS$C4 C(04,18,01) = [","];
ITEM STS$CTIME C(04,24,09);
ITEM STS$C5 C(05,18,01) = [","];
ITEM STS$DT C(05,24,03);
ITEM STS$ZBYT U(05,42,18) = [0];
END
CONTROL EJECT;
# #
# NVFOFVD CODE BEGINS HERE #
# #
#
* DETERMINE NUMBER AST ENTRIES.
#
ASENTRY = ASTLNGTH/ASTSIZ$;
#
* FOR EACH ENTRY IN THE VCBSSQ, CHECK IF THE END FLAG IS SET.
#
P<TVCBSSQ> = LOC(NVFSM);
FOR I=0 WHILE VSSLNGTH GR 0
DO
BEGIN
SSTRQE(P<VCBSSQ>,WCBUF[0],ABHBUF[0],NVFSM);
#
* IF THE END FLAG IS NOT SET, FORMAT THE STATUS TEXT. IF IT IS A
* TERMINAL STATUS COMMAND FORMAT THE TEXT AND SEND IT TO THE HOP,
* OTHERWISE FORMAT THE USER TEXT AND SEND IT TO THE HOP.
#
IF NOT TSS$VENDF[0]
THEN
BEGIN
DATA$ = TRUE;
IF CRNT$CMD EQ SSA$ OR
CRNT$CMD EQ SSU$ OR
CRNT$CMD EQ STT$
THEN
BEGIN
STS$TYP[0] = "TERM";
CNST1 = 0;
CNST2 = 36;
CNST3 = 42;
SSBSBF(STSTXT,CNST1,CNST2,CNST3,B<0,42>TSS$TN[0]);
CTEMP = XSFW(TSS$UWORD[0]);
CNST1 = 1;
CNST2 = 24;
SSBSBF(STSTXT,CNST1,CNST2,CNST3,B<0,42>CTEMP);
END
ELSE
BEGIN
STS$TYP[0] = "USER";
CTEMP = XSFW(TSS$UWORD[0]);
CNST1 = 0;
CNST2 = 36;
CNST3 = 42;
SSBSBF(STSTXT,CNST1,CNST2,CNST3,B<0,42>CTEMP);
CNST1 = 1;
CNST2 = 24;
SSBSBF(STSTXT,CNST1,CNST2,CNST3,B<0,42>TSS$TN[0]);
END
CTEMP = ETIME(TSS$LTIME[0]);
CNST1 = 2;
CNST2 = 12;
CNST3 = 54;
SSBSBF(STSTXT,CNST1,CNST2,CNST3,CTEMP);
IF TSS$SWAPNM[0] NQ "NVF"
THEN
BEGIN
FOR AS = 0 STEP 1 WHILE
(AS LS ASENTRY AND
TSS$SWAPNM[0] NQ AST$PANAM[AS])
DO
BEGIN
END
STS$ANAM[0] = TSS$SWAPNM[0];
END
ELSE
BEGIN
STS$ANAM[0] = "NVF";
END
STS$ACN[0] = XCDD(1000 + TSS$AACN);
IF TSS$CATIME[0] NQ 0
THEN
BEGIN
CTEMP = ETIME(TSS$CATIME[0]);
END
ELSE
BEGIN
CTEMP = ETIME(TSS$LTIME[0]);
END
CNST1 = 4;
CNST2 = 24;
SSBSBF(STSTXT,CNST1,CNST2,CNST3,CTEMP);
STS$DT[0] = DT$VAL[TSS$DT[0]];
WCB$WORD[1] = 0;
WCB$WC[1] = 2 + STSTXTL/10;
ABHWORD[1] = 0;
ABHABT[1] = HOPTX$;
SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],STSTXT);
END
#
* THE END FLAG AND THE LAST APPLICATION FLAG IS SET THEREFORE
* CHECK THE ERROR CODE FIELD. IF EC IS ONE,
* (NO VCB-S FOUND) AND NO PTAC DATA FOUND EITHER, THEN SEND MESSAGE
* INDICATING NO TERM/USER CONNECTED. IF EC ES TWO,(ABORT COMMAND)
* CLEAR THE ABORT COMMAND FLAG. SEND A NULL TEXT TO THE C-LAYER TO
* CLEAN THE PIPE LINE. CLEAR THE COMMAND IN PROGRESS FLAG.
#
ELSE
BEGIN
IF TSS$EC[0] EQ SSEC"NOMATCH" AND
NOT DATA$ AND
TSS$APENDF[0]
THEN
BEGIN
WCB$WORD[1] = 0;
IF CRNT$CMD EQ SSA$ OR
CRNT$CMD EQ SUA$
THEN
BEGIN
WCB$WC[1] = 2 + NTUTXTL/10;
P<MTXT> = LOC(NTUTXT);
END
ELSE IF CRNT$CMD EQ SSU$ OR
CRNT$CMD EQ STU$
THEN
BEGIN
WCB$WC[1] = 2 + NUTTXTL/10;
P<MTXT> = LOC(NUTTXT);
END
ELSE
BEGIN # ELSE IF CRNT COMMAND IS STT #
WCB$WC[1] = 2 + TUNTXTL/10;
P<MTXT> = LOC(TUNTXT);
END
ABHWORD[1] = 0;
ABHABT[1] = HOPTX$;
SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],MTXT);
END
ELSE IF TSS$EC[0] EQ SSEC"ABRT"
THEN
BEGIN
ABORTCMDF = FALSE;
END
#
* ONLY IF THE END FLAG AND THE LAST APPL FLAG SET, SEND
* HOP TEXT TO CAUSE THE READY.. MESSAGE.
#
IF TSS$VENDF[0] AND TSS$APENDF[0]
THEN
BEGIN
WCB$WORD[1] = 0;
WCB$IAF[1] = TRUE;
WCB$WC[1] = 2;
ABHWORD[1] = 0;
ABHABT[1] = HOPTX$;
SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],NVFSM);
CMDINPGF = FALSE;
END
END
END
RETURN; # **** RETURN **** #
END # NVFOFVD #
TERM