Program : COOKIE.MAR This program produces a random fortune cookie message. The messages are kept in an indexed file. COOKIE.MAR calls a program called RAND which generates a random number between 1 and the maximum number of messages in the COOKIE.DAT file. The random number is used as a key to the indexed file and the record(s) with this key are displayed on the terminal. The COOKIE.DAT file is an indexed file with a maximum record length of 84. The first 4 bytes are the key and are of the format 0000 to 9999. The last 80 bytes are the fortune cookie message. A sample message might look like: 0020 This is a two line 0020 fortune cookie message. The file looks like this: COOKIE.DAT;3 File ID: (2598,6,0) Size: 219/219 Owner: Created: 3-JAN-1991 12:23:59.58 Revised: 3-JAN-1991 12:24:03.68 (1) Expires: Backup: 20-SEP-1991 21:00:34.08 File organization: Indexed, Prolog: 3, Using 1 key In 2 areas File attributes: Allocation: 219, Extend: 27, Maximum bucket size: 3, Global buffer count: 0, Version limit: 3 Contiguous best try Record format: Variable length, maximum 84 bytes Record attributes: Carriage return carriage control RMS attributes: None Journaling enabled: None File protection: System:RWED, Owner:RWED, Group:RE, World:RE Access Cntrl List: None There are 2 symbols in the program that may have to be changed. One is in the FAB definition (COOKIE_FAB) where the COOKIE.DAT file is coded. The other is a symbol called HIGH which is the total number of messages (not records) in the COOKIE.DAT file. To assemble and link the program: $ macro/list cookie $ macro/list rand $ link cookie+rand Program : RAND.MAR This program uses the date and time as a seed to generate a random number between the two values supplied to it. It is used by COOKIE.MAR. Program : PASSCHK.MAR This program verifies whether a password supplied by a user is valid. It is passed a username and password. It calls SYS$GETUAI to get the hashed password, the hashing algorithm, and the salt for that particular username. It then hashes the supplied password using SYS$HASH_PASSWORD, passing it the algorithm and salt. The two hashed passwords are compared (the one from SYS$GETUAI and the one from SYS$HASH_PWD). If they are equal the supplied password is valid. A value of 1 (success) or 2 (failure) is returned. Program : TESTPWD.COB This is a sample program which calls PASSCHK to verify a password. When the program is run a username and password are prompted for. They are converted to upper case and passed to PASSCHK. The return code is checked and a message is displayed indicating whether the password is valid or not. To test the password checker: $ macro/list passchk $ cobol/list testpwd $ link testpwd+passchk $ run testpwd -------------------------------------------------------------------------------- INSTALL_SPECIAL.COM & MODEM.COM There are two unique parts to INSTALL_SPECIAL.COM. It is recommended that if you are going to use these sections of code, that they be run in your SYSTARTUP.COM just so that you can get consistent LTA numbers. The first shows how to install an outdialing modem (DF224) onto the network. It assumes you are installing it onto port LTA9:, and that on the Terminal Server, you have set the port name to 623_5803. Once this command procedure has been run, you access the modem using MODEM.COM which checks whether or not someone is dialed out or in on the modem, and/or allows you to use the modem appropriately. The second portion of INSTALL_SPECIAL.COM shows how to attach an InterMEC Bar Code printer onto your system. It assumes that you are installing onto port LTA6:, and that the Terminal Server knows this port as BAR_TONY. Once it's there, you have to issue a print command, specifying which print queue, and forms. You are on your own for the internal formats of the Bar Code Tickets. PRINT_QUEUE_MANAGER.COM Simple command procedure which allows our operations staff to change forms on printers. It takes care of all the more detailed internals. We find it convenient to have all our operators define a symbol in their LOGIN.COM specifying the name of the printer which we mount various type of forms on most of the time. In our case this is CAM_PRINTER_2. ABNORMAL_CONDITIONS.COM Updated Version. Used to report problems, and then go back in and modify the report as new information becomes available. Some minor changes have been made over last years version. Assumptions are that you have a logical defined pointing to where ACRs are to live; and you should have at least a null file called ACR:ACR_SUMMARY.FILE, and the procedure will create another called ACR:ACR_SEQUENCE.FILE. After that, these two are updated by the routine.