*DECK NVFTPVR
USETEXT TEXTNVF
USETEXT TEXTSS
USETEXT TXTANVF
PROC NVFTPVR((PT));
# TITLE NVFTPVR - PREPARE VALIDATION REQUEST #
BEGIN # NVFTPVR #
#
** NVFTPVR - PREPARE VALIDATION REQUEST.
*
* E. THAVIKULWAT 81/10/08
*
* THIS PROCEDURE SETS UP THE CPM 56B VALIDATE USER REQUEST. IT IS
* CALLED INTO EXECUTION BY THE FOLLOWING PROCEDURES:
* *NVFTETI* *NVFTILP*
*
* PROC NVFTPVR((PT))
*
* ENTRY:
* PT = POINTER TO PTAC ENTRY.
*
* EXIT:
* CPM 56B VALIDATE USER REQUEST ENTERED IN *CPMRQ* QUEUE.
*
* NOTES:
* FOR AUTOLOGIN DATA, THE FOLLOWING ORDER OF PRECEDENCE IS USED
* TO DETERMINE FAMILY AND USER NAME:
* 1) MANDATORY NAME IS USED IF MANDATORY IS INDICATED.
* 2) DEFAULT NAME IS USED IF DEFAULT IS INDICATED AND
* USER VOLUNTEERED VALUE IS "NULL".
* 3) IF DEFAULT IS INDICATED FOR FAMILY AND USER VOLUNTEERED
* VALUE IS "0", THE SYSTEM DEFAULT FAMILY WILL BE USED.
* 4) USER VOLUNTEERED VALUE IS USED OTHERWISE.
*
* IF USER NAME IS OBTAINED FROM THE *LCF* (LOCAL CONFIGURATION
* FILE), PASSWORD IS NOT VALIDATED. A MESSAGE IS DISPLAYED ON
* THE USER'S SCREEN IF VOLUNTEERED USER OR PASSWORD, ENTERED IN
* THE ABBREVIATED FORMAT, IS IGNORED BECAUSE OF PRESENCE OF
* AUTOLOGIN DATA.
*
* METHOD:
* PRESET FAMILY, USER, AND PASSWORD TO VOLUNTEERED VALUES. IF
* THERE IS AUTOLOGIN DATA, DETERMINE IF IT IS FOR FAMILY OR USER
* OR BOTH AND CHANGE FAMILY, USER, AND PASSWORD TO BE USED
* ACCORDINGLY. ENTER CPM 56B IN *CPMRQ* QUEUE.
#
#
**** PROC NVFTPVR - XREF LIST.
#
XREF
BEGIN
PROC NVFUMQE; # TRANSFER TEXT TO QUEUE #
END
#
****
#
*CALL TMSGNVF
ITEM ADDR I; # ADDRESSING INFORMATION FOR ABH #
ITEM LNGTH I; # LENGTH OF MESSAGE #
ITEM PT I; # SUBSCRIPT FOR ARRAY PTAC #
ITEM PTIND I; # AUTOLOGIN TYPE INDICATOR VARIABLE #
#
* THE FOLLOWING ARRAY DEFINES ONE ZERO IN DISPLAY CODE STORED LEFT-
* JUSTIFIED AND BINARY ZERO FILLED.
#
ARRAY ZERO[00:00] S(1);
BEGIN
ITEM ZRO$PARAM C(00,00,07);
ITEM ZRO$DSP C(00,00,01) = ["0"];
END
#
* POINT BASE ARRAY TO OUTPUT HALF OF *MSGBUF* AND CLEAR THE BUFFER.
#
P<CRQBUF> = LOC(MSGBUF[0]) + ((NMSGBUF$ + 1) / 2);
CRQ$FCWORD[0] = 0;
CRQ$FWORD[0] = 0;
CRQ$PWORD[0] = 0;
CRQ$UWORD[0] = 0;
#
* PRESET FAMILY, USER, AND PASSWORD TO USER VOLUNTEERED VALUES.
#
CRQ$FNAM[0] = PTA$VLTFAM[PT];
CRQ$PASSWD[0] = PTA$VLTPW[PT];
CRQ$IFCTF[0] = TRUE;
CRQ$VPWF[0] = FALSE;
CRQ$UNUM[0] = PTA$VLTUSR[PT];
CRQ$RETPED[0] = TRUE; # RETURN PASSWORD EXP DATE #
CRQ$RETPID[0] = TRUE; # RETURN PERSONAL IDENTIFIER #
PTA$VLTPW[PT] = 0; # DONT KEEP PASSWORD ANY LONGER THAN NEDED#
#
* CHECK IF AUTOLOGIN DATA EXIST FOR FAMILY AND/OR USER. IF IT
* DOES, CHANGE VALUES FOR FAMILY, USER, AND PASSWORD ACCORDINGLY.
#
IF PTA$ALIF[PT]
THEN
BEGIN # HAVE AUTOLOGIN DATA #
PTIND = PTA$FAMIND[PT];
IF PTIND NQ 0
THEN
BEGIN
#
* MANDATORY OR DEFAULT FAMILY SPECIFIED. IF MANDATORY, USE
* MANDATORY FAMILY NAME. IF DEFAULT, AND VOLUNTEERED FAMILY
* VALUE IS "NULL", USE DEFAULT FAMILY NAME. IF DEFAULT, AND
* VOLUNTEERED FAMILY VALUE IS "ZERO", USE SYSTEM DEFAULT FAMILY.
* IF DEFAULT, AND VOLUNTEERED FAMILY VALUE IS NEITHER "NULL"
* NOR "ZERO", USE VOLUNTEERED VALUE.
#
IF (PTIND EQ MNDATRY$)
OR (PTIND EQ PRIMARY$)
OR ((PTIND EQ DEFAULT$) AND (PTA$VLTFAM[PT] EQ NULL$))
THEN # MNDATRY OR DEFAULT AND "NULL" #
BEGIN
CRQ$FNAM[0] = PTA$ALIFAM[PT];
END
ELSE # DEFAULT AND NOT "NULL" #
BEGIN
IF PTA$VLTFAM[PT] EQ ZRO$PARAM[0]
THEN # DEFAULT AND "ZERO" #
BEGIN # USE SYSTEM DEFAULT FAMILY #
CRQ$FWORD[0] = 0;
END
END
IF PTIND EQ PRIMARY$
THEN
BEGIN
PTA$FAMIND[PT] = DEFAULT$;
END
END
PTIND = PTA$USRIND[PT];
IF PTIND NQ 0
THEN
BEGIN
#
* MANDATORY OR DEFAULT USER SPECIFIED. IF MANDATORY, USE
* MANDATORY USER NAME. IF DEFAULT, AND VOLUNTEERED USER VALUE
* IS "NULL", USE DEFAULT USER NAME. IF DEFAULT, AND VOLUNTEERED
* USER VALUE IS NOT "NULL", USE VOLUNTEERED VALUE. IF MANDATORY
* OR DEFAULT USER NAME USED, THEN VALIDATE WITH NO PASSWORD.
#
IF (PTIND EQ MNDATRY$)
OR (PTIND EQ PRIMARY$ AND PTA$VLTUSR[PT] EQ NULL$)
OR ((PTIND EQ DEFAULT$) AND (PTA$VLTUSR[PT] EQ NULL$))
THEN # MNDATRY OR DEFAULT AND "NULL" #
BEGIN
CRQ$UNUM[0] = PTA$ALIUSR[PT];
CRQ$VPWF[0] = TRUE;
IF ((PTIND EQ MNDATRY$) AND (PTA$VUF[PT]))
OR (PTA$VPF[PT])
THEN
BEGIN
#
* VOLUNTEERED USER AND/OR PASSWORD ENTERED IN ABBREVIATED
* FORMAT. SEND "VOLUNTEERED USER/PASSWORD IGNORED" MESSAGE
* TO TERMINAL.
#
UPA$TYPE[0] = "USER/PASSWORD";
ADDR = PTA$ACN[PT];
NVFUMQE(P<CTQ>,UPABUF[0],APPTTX$,ADDR,LMSG40$);
END
END
END
IF PTIND EQ PRIMARY$
THEN
BEGIN
PTA$USRIND[PT] = DEFAULT$;
END
END
#
* ENTER CPM 56B IN *CPMRQ* QUEUE.
#
CRQ$FC[0] = CPM56B$;
CRQ$ACN[0] = PTA$VCB[PT];
CRQ$QNUM[0] = LOC(P<VDATAQ>); # SET DEST QUEUE NUMBER #
CRQ$NOROUT[0]=TRUE;
LNGTH = CRQVSIZ$ * 10;
NVFUMQE(P<CPMRQ>,CRQBUF[0],APPTTX$,0,LNGTH);
PTA$STATE[PT] = PTACST"AWTVAL"; # SET STATE TO AWAIT VALIDATION #
END # END NVFTPVR #
TERM