IDENTIFICATION DIVISION.

PROGRAM-ID.     MESSAGE-OF-THE-DAY.
AUTHOR.         JEREMY C. RADWAN
INSTALLATION.   UNIVERSITY OF DAYTON.
DATE-WRITTEN.   NOVEMBER 15, 1991
DATE-COMPILED.  
SECURITY.       OPEN.
 
****
**** MOTD (MESSAGE OF THE DAY) V2.0
**** COPYRIGHT (C)1992 BY REALMSOFT ENTERPRISES
**** ALL RIGHTS RESERVED
****
**** A FUNNY VAX UTILITY BY JEREMY C. RADWAN (AKA WINDRACER)
**** SEND ANY QUESTIONS OR COMMENTS TO:
****
**** AG154@CLEVELAND.FREENET.EDU OR
**** RADWANJC@UDAVXB.OCA.UDAYTON.EDU
****
**** I KNOW THERE ARE A LOT OF RANDOM QUOTE GENERATORS OUT THERE
**** TODAY, BUT I WANTED SOMETHING DIFFERENT. HAVING JUST TAKEN COBOL
**** HERE AT THE UNIVERSITY OF DAYTON, I DECIDED TO USE THAT (AS A WAY
**** OF IMPROVING MY COBOL TECHNIQUE). WELL, THIS PROGRAM MAY NOT HAVE 
**** IMPROVED MY PROGRAMMING ABILITY (IT WAS PRETTY SIMPLE, AFTER ALL),
**** BUT IT IS A COOL PROGRAM. HERE'S HOW TO "INSTALL" IT ON YOUR ACCOUNT.
**** NOTE: YOU MUST HAVE COBOL ON YOUR VAX SYSTEM FOR THIS TO WORK!
**** SIMPLY TYPE THE FOLLOWING TWO COMMANDS:
****
**** $ COBOL MOTD
**** $ LINK MOTD
****
**** YOU CAN DELETE THE MOTD.OBJ FILE THAT IS CREATED. ALL YOU NEED IS
**** THE EXECUTABLE (AND THE SOURCE CODE IF YOU WANT IT STILL). THEN, TO
**** RUN THE PROGRAM, USE THIS COMMAND:
****
**** $ RUN MOTD
****
**** OR DEFINE A COMMAND FOR IT. PLEASE FEEL FREE TO DISTRIBUTE THIS
**** PROGRAM AROUND. HOWEVER, PLEASE LEAVE THE CODE, QUOTES, AND CREDITS
**** INTACT. I KNOW THERE MIGHT NOT BE A LOT OF ACTUAL CODE IN THIS PROGRAM,
**** BUT I WORKED HARD ON IT. PLEASE DO NOT TAKE CREDIT FOR OTHER PEOPLE'S
**** WORK. IF YOU HAVE ANY QUESTIONS, COMMENTS, OR SUGGESTIONS, PLEASE
**** MAIL THEM TO ME AT EITHER OF THE ADDRESSES ABOVE. I LOVE GETTING MAIL,
**** SO IF YOU LIKE MY PROGRAM, TELL ME!
****
**** THANKS, AND ENJOY MOTD!                  JEREMY C. RADWAN, MARCH 1992
****
**** P.S. IF ANYONE CAN FIGURE OUT HOW TO MODIFY THIS PROGRAM TO WORK ON
**** AN MS-DOS MACHINE, PLEASE LET ME KNOW!
****

ENVIRONMENT DIVISION.

CONFIGURATION SECTION.
SOURCE-COMPUTER. VAX.
OBJECT-COMPUTER. VAX.

DATA DIVISION.

FILE SECTION.

WORKING-STORAGE SECTION.
**** THIS AREA CONTAINS ANY VARIABLES NEEDED FOR PROGRAM PROCESSING

01   WORK-VARIABLES.
     05  TIME-IN          PIC 9(8).
     05  RND-NUMBER       PIC 9(2).
     05  QUOTE-FOUND      PIC X(3)          VALUE "NO".

PROCEDURE DIVISION.

A100-MAIN-CONTROL.
**** THIS MODULE CONTROLS ALL PROCESSING.
     PERFORM Z100-CLEAR.
     PERFORM Z200-GET-RANDOM.
     PERFORM Z300-MOTD-HEADER.
     PERFORM B100-FIND-QUOTE UNTIL QUOTE-FOUND = "YES".
     PERFORM Z400-MOTD-FOOTER.
     STOP RUN.

B100-FIND-QUOTE.
**** THIS LARGE MODULE ANALYZES THE GENERATED RANDOM NUMBER
**** AND SELECTS AND DISPLAYS A QUOTE.
     EVALUATE RND-NUMBER
     WHEN "00"
          DISPLAY "People ask me why I do this, and I tell them that I have the heart of a small"
          DISPLAY "boy, and I keep it in a jar on my desk."
          DISPLAY "		                                         - Steven King"
          MOVE "YES" TO QUOTE-FOUND
     WHEN "01"
          DISPLAY "                    A Smith and Wesson beats four aces."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "02"
          DISPLAY "     It is better to be ten minutes early, then to be ten minutes late."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "03"
          DISPLAY "      All things are possible, except skiing through a revolving door."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "04"
          DISPLAY " Every four seconds, a woman has a baby. We must find this woman and STOP her!"
          MOVE "YES" TO QUOTE-FOUND
     WHEN "05"
          DISPLAY "     All programmers are playwrights, and all computers are lousy actors."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "06"
          DISPLAY "Duct tape is like the force. It has a Dark Side, and a Light Side, and it holds"
          DISPLAY "the universe together."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "07"
          DISPLAY "        Hardware: (n) The parts of the computer that can be kicked."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "08"
          DISPLAY "      White giant seeking red dwarf interested in binary relationship."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "09"
          DISPLAY "                    God is real unless declared integer."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "10"
          DISPLAY "                        Life is but a Virtual Reality."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "11"
          DISPLAY "                         Ankh if you love Isis."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "12"
          DISPLAY "                             E Pluribus Unix."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "13"
          DISPLAY "      If at first you don't succeed, your skydiving days are over..."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "14"
          DISPLAY "                A nuclear war can ruin your entire day."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "15"
          DISPLAY "     Nuclear weapons can wipe out the entire planet...if used properly."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "16"
          DISPLAY "        Sure I believe in peace...peace through superior firepower."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "17"
          DISPLAY "                              God is love."
          DISPLAY "                             Love is blind."
          DISPLAY "                          Ray Charles is blind."
          DISPLAY "                      Therefore, Ray Charles is God."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "18"
          DISPLAY " Your IBM compatible computer grows more incompatible with every passing second."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "19"
          DISPLAY "A mind is a terrible thing to waste, so if you see one lying around, pick it up"
          DISPLAY "and play with it for a while."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "20"
          DISPLAY "                You can tune a piano, but you can't tuna fish."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "21" 
          DISPLAY "                 Computer programmers do it byte by byte!"
          MOVE "YES" TO QUOTE-FOUND
     WHEN "22"
          DISPLAY "               Pretend to spank me - I'm a psuedo-masochist!"
          MOVE "YES" TO QUOTE-FOUND
     WHEN "23"
          DISPLAY "           Is a computer language without GOTOs totally Wirth-less?"
          MOVE "YES" TO QUOTE-FOUND
     WHEN "24"
          DISPLAY "             A chicken is an egg's way of producing more eggs."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "25"
          DISPLAY "             Reality is for people who can't face science fiction."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "26"
          DISPLAY "           People with narrow minds usually have broad tongues."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "27"
          DISPLAY "                           Friction is a drag."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "28"
          DISPLAY "      If practice makes perfect, and nobody's perfect, why practice?"
          MOVE "YES" TO QUOTE-FOUND
     WHEN "29"
          DISPLAY "                A mouse is an elephant built by the Japanese."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "30"
          DISPLAY "           Santa's elves are just a bunch of subordinate Clauses."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "31"
          DISPLAY "                       A penny saved is ridiculous. "
          MOVE "YES" TO QUOTE-FOUND
     WHEN "32"
          DISPLAY "                     Does the name Pavlov ring a bell?"
          MOVE "YES" TO QUOTE-FOUND
     WHEN "33"
          DISPLAY "                  Help stamp out and abolish redundancy!"
          MOVE "YES" TO QUOTE-FOUND
     WHEN "34"
          DISPLAY "                   Radioactive cats have 18 half-lives."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "35"
          DISPLAY "    Computer programmers never die, they just get lost in the processing."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "36"
          DISPLAY "                     Entropy isn't what it used to be!"
          MOVE "YES" TO QUOTE-FOUND
     WHEN "37"
          DISPLAY "           Keep your mouth shut, and people will think you stupid;"
          DISPLAY "                     Open it and you remove all doubt."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "38"
          DISPLAY "                          Individualists unite!"
          MOVE "YES" TO QUOTE-FOUND
     WHEN "39"
          DISPLAY "               Disco is to music what Etch-a-Sketch is to art."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "40"
          DISPLAY "          The moon may be smaller than Earth, but it's farther away."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "41"
          DISPLAY "The human mind ordinarily operates at only ten percent of its capacity - the"
          DISPLAY "rest is just overhead for the operating system."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "42"
          DISPLAY "   If debugging is the process of removing bugs, then programming must be the"
          DISPLAY "                          process of putting them in!"
          MOVE "YES" TO QUOTE-FOUND
     WHEN "43"
          DISPLAY "          COBOL programs are exercises in Artificial Inelegance."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "44"
          DISPLAY "                          Clones are people two."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "45"
          DISPLAY "    Time is just Nature's way of keeping everything from happening at once."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "46"
          DISPLAY "                     There's no future in time travel."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "47"
          DISPLAY "                       Reality does not exist - yet."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "48"
          DISPLAY "                Xerox never comes up with anything original."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "49"
          DISPLAY "          Never hit a man with glasses; hit him with your fist."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "50"
          DISPLAY "             Two can live as cheaply as one, for half as long."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "51"
          DISPLAY "                   Part-time musicians are semiconductors."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "52"
          DISPLAY "  Counting in binary is just like counting in decimal, if you are all thumbs."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "53"
          DISPLAY "    We really don't understand it, so we'll give it to the programmers!"
          MOVE "YES" TO QUOTE-FOUND
     WHEN "54"
          DISPLAY "         Confession is good for the soul, but bad for your career."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "55"
          DISPLAY "               Don't sweat it - it's only ones and zeroes!"
          MOVE "YES" TO QUOTE-FOUND
     WHEN "56"
          DISPLAY "         Never put off 'til tomorrow what you can avoid altogether."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "57"
          DISPLAY "              You can fool some of the people all of the time,"
          DISPLAY "            and you can fool all of the people some of the time,"
          DISPLAY "                but you can make a fool of yourself anytime."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "58"
          DISPLAY "          People who live in stone houses shouldn't throw glasses."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "59"
          DISPLAY "               There is no such thing as a 'Fail Safe' design."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "60"
          DISPLAY "   If I want your opinion, I'll ask you to fill out the appropriate form."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "61"
          DISPLAY "             Give a woman an inch and she'll park a car in it."
          DISPLAY "            Give a speculator an inch, and he'll build a condo."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "62"
          DISPLAY " If God had intended man to have computers, He would have given him 16 fingers."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "63"
          DISPLAY "               All work and no play...will make you a manager."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "64"
          DISPLAY "      Would the last person to leave Michigan please turn off the lights?"
          MOVE "YES" TO QUOTE-FOUND
     WHEN "65"
          DISPLAY "    The shortest distance between two points is usually under construction."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "66"
          DISPLAY "  There are two ways to write error-free programs...only the third one works."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "67"
          DISPLAY "      If your computer speaks English, it was probably built in Japan."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "68"
          DISPLAY "            COBOL programmers understand why women hate periods."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "69"
          DISPLAY "      Flying is the art of throwing yourself at the ground, and missing." 
          MOVE "YES" TO QUOTE-FOUND
     WHEN "70"
          DISPLAY "                    Your karma just ran over my dogma."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "71"
          DISPLAY "            In God we trust - all others require a phase review."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "72"
          DISPLAY "    Philadelphia isn't dull...it just seems so because it is next to exciting"
          DISPLAY "    Camden, New Jersey."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "73"
          DISPLAY "   The reason the government thinks your just a number is because it's just a "
          DISPLAY "   machine."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "74"
          DISPLAY "             Death is Nature's way of telling you to slow down."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "75"
          DISPLAY "                Computers can never replace human stupidity."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "76"
          DISPLAY "                        Immanual Kant but Kubla Kahn."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "77"
          DISPLAY "             Don't look back, the lemmings are gaining on you."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "78"
          DISPLAY "                  SDRAWKCAB spelled backwards is backwards."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "79"
          DISPLAY "                    Pain is just God's way of hurting you."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "80"
          DISPLAY "   The attention span of a computer is only as long as its electric cord."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "81"
          DISPLAY "          The way to a man's heart is through the left ventricle."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "82"
          DISPLAY "      Alan Luck's Axiom: When all else fails, read the documentation!"
          MOVE "YES" TO QUOTE-FOUND
     WHEN "83"
          DISPLAY "                 Gravity doesn't exist, the Earth sucks..."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "84"
          DISPLAY "     Usenet is like Tetris for people who still remember how to read."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "85"
          DISPLAY "                    It works better if you plug it in."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "86"
          DISPLAY "          Monday is a hard way to spend one-seventh of your life."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "87"
          DISPLAY "                 Don't force it...get a large hammer."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "88"
          DISPLAY "     Before making a backup copy, be sure to first destroy the originals."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "89"
          DISPLAY "      Wernher von Braun settled for a V-2 when he could've had a V-8."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "90"
          DISPLAY "   Shift to the left, shift to the right, mask in, mask out, BYTE! BYTE! BYTE!"
          MOVE "YES" TO QUOTE-FOUND
     WHEN "91"
          DISPLAY "       Health is merely the slowest possible rate at which one can die."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "92"
          DISPLAY "                      Schizophrenia beats being alone."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "93"
          DISPLAY "           To err is human, to forgive is against company policy."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "94"
          DISPLAY "       The problem with the gene pool is that there is no lifeguard."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "95"
          DISPLAY "                   On a clear disk, you can seek forever..."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "96"
          DISPLAY "                 Everyone hates me because I'm paranoid."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "97"
          DISPLAY "               Going the speed of light is bad for your age."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "98"
          DISPLAY "                    Small programs are for small minds."
          MOVE "YES" TO QUOTE-FOUND
     WHEN "99"
          DISPLAY "           MOTD Generator -  written in COBOL by Jeremy C. Radwan"
          DISPLAY "       RADWANJC@udavxb.oca.udayton.edu  OR  ag154@cleveland.freenet.edu"
          MOVE "YES" TO QUOTE-FOUND
     WHEN OTHER
          MOVE "NO" TO QUOTE-FOUND
          PERFORM Z200-GET-RANDOM
     END-EVALUATE.

Z100-CLEAR.
**** THIS MODULE CLEARS THE SCREEN.
     CALL "SCR$ERASE_PAGE" USING BY VALUE 1,1.

Z200-GET-RANDOM.
**** THIS MODULE GENERATES A RANDOM NUMBER BY USING THE
**** HUNDRETHS OF A SECOND (IMPORTED FROM THE SYSTEM CLOCK)
     ACCEPT TIME-IN FROM TIME.
     MOVE TIME-IN TO RND-NUMBER.

Z300-MOTD-HEADER.
**** DISPLAYS THE MESSAGE OF THE DAY HEADER.
     DISPLAY " ".
     DISPLAY "                           Message of the Day:".
     DISPLAY " ".
 
Z400-MOTD-FOOTER.
     DISPLAY " ".
     DISPLAY "      [ MOTD Generator - Copyright (c)1992 by RealmSoft Enterprises ]".
     DISPLAY " ".
     DISPLAY " ".

