IDENTIFICATION DIVISION. * PROGRAM-ID. TESTPWD. AUTHOR. DENNIS MERCHANT. DATE-WRITTEN. MAY 1991. DATE-COMPILED. * DATA DIVISION. * WORKING-STORAGE SECTION. * 01 USERNAME PIC X(12) VALUE SPACES. 01 USERNAME_UC PIC X(12) VALUE SPACES. 01 PASS_WORD PIC X(40) VALUE SPACES. 01 PASS_WORD_UC PIC X(40) VALUE SPACES. * 01 STAT PIC S9(9) COMP. * PROCEDURE DIVISION. * MAINLINE-ROUTINE. * DISPLAY 'Enter USERNAME > ' WITH NO ADVANCING. ACCEPT USERNAME. * * Convert password to upper case. * CALL 'STR$UPCASE' USING BY DESCRIPTOR USERNAME_UC USERNAME GIVING STAT. * IF STAT IS FAILURE CALL 'LIB$STOP' USING BY VALUE STAT. * DISPLAY 'Enter Password > ' WITH NO ADVANCING. ACCEPT PASS_WORD WITH NO ECHO. * * Convert password to upper case. * CALL 'STR$UPCASE' USING BY DESCRIPTOR PASS_WORD_UC PASS_WORD GIVING STAT. * IF STAT IS FAILURE CALL 'LIB$STOP' USING BY VALUE STAT. * CALL 'PASSCHK' USING PASS_WORD_UC USERNAME_UC GIVING STAT. * IF STAT IS FAILURE DISPLAY 'Invalid Password.' ELSE DISPLAY 'Valid Signon.'. * STOP RUN. *