Enhancing Logons with SECURITY/3000 ----------------------------------- Logging on the trusty old 3000 is so uninteresting compared to the booting up of a PC. PC users have the advantage of inserting commands into their AUTOEXEC files to display system information such as memory usage and disk space availability. Even utilities can be run informing you of meetings or display a proverb or famous quote during the startup. Why let PC users have all the fun? Although displaying system information to your user would be pointless we do have a variety of different commands and utilities to replace the monotony of logging in. With the help of MPEX, SECURITY and this article, I will help you enhance your logon sequence to implement some of the weird and wonderful things we run during logon time. SECURITY/3000 customers have a keyword called $LOGON-EXECUTE. This keyword enables them to execute a command during logon time and assign that command to a user set. People without SECURITY/3000 can implement the command files using an OPTION LOGON UDC LOGON DETAILS Logon time is a great time for displaying information to users. SECURITY/3000 users can display information relating to the date, time and ldev that particular logon was last used. To accomplish this add these lines into your SECURCON.DATA.VESOFT file:- $LOGON-EXECUTE WRITELN("Last logon:",LASTLOGONDATE," at ",LASTLOGONTIME," on LDEV ", ,LASTLOGONLDEV) ONLINE For each logon to your machine the logging in user would see something like:- Last logon : 05 APR 95 at 08:15 AM on LDEV 110 CALENDAR MPEXs calendar command is ideal for execution at logon time. As the name implies this command will display a calendar month along with important dates and todays date highlighted. To implement an MPEX command into a $LOGON-EXECUTE we would do :- $LOGON-EXECUTE MPE("%CALENDAR"); ONLINE The above logon execute calls the VESOFT function MPE. This is then used to execute an MPEX command, differentiated from an MPE command by the % prefix. The important dates are kept in the HOLID{month num} files located in .DATA.VESOFT. These can be modified to include bank holidays or birthdays. QUOTE GENERATOR A quote generator was one of the first things that we implemented into our logon sequence. The fun was reading a quote that somebody else had added into the file. The QUOTEGEN command is very simple to create if you have MPEX just enter the following lines and keep them as QUOTEGEN:- SETLVAR QUOTEFILE "QUOTES.GSL.VECSL" SETLVAR NUM RANDOM(VEFINFO(QUOTEFILE).EOF) ECHO Quote for today is: ECHO ECHO ![VEFREADDIR("!QUOTEFILE,OLD",NUM)] The second file is our QUOTES file that contains any quotes, proverbs etc that you wish to add. An example file is included in the .GSL.VECSL contributed library for your use. The QUOTEGEN command simply uses the MPEX function RANDOM to pick a number from 0 to the EOF of the file QUOTES -1. The RANDOM function is also very useful for getting lottery numbers, the contributed command LOTTERY.GSL.VECSL does just that! To execute the command file at logon time enter the following lines into your SECURCON.DATA.VESOFT file:- $LOGON-EXECUTE MPE("%QUOTEGEN"); ONLINE Again using the MPE function we call the MPEX command file %QUOTEGEN. Now whenever a logon occurs, they will be greeted with a random quote. There are some 126 quotes currently in the quote file!! MEMORY JOGGER The idea of a jogger is to display messages for up and coming events, reminders, memos, etc that are personal to you. The JOGGER command file (fig. 1) accepts 3 commands : ADD, CLEAR and VIEW. ADD - When an ADD is passed to JOGGER you are prompted to enter a date and message to be displayed at that date. This information along with your session name is written out to a data file containing all JOGGER’s reminders. CLEAR - When a CLEAR is passed to JOGGER, JOGGER reads its data file looking for all dates that are equal to or greater than todays date. These are copied to a temporary file and then used to replace the existing data file. The outcome of this is all old messages are removed. VIEW - When a VIEW is passed to JOGGER, JOGGER prints its data file displaying a ny records that contain your session name and todays date. JOGGER VIEW is what will be executed at logon time. JOGGER reads and writes to the file JOGDATA, which is built by doing : BUILD JOGDATA;REC=-56,,F,ASCII;NOCCTL This JOGDATA data file is structured as follows :- DATE (YY/MM/DD format) 0:8 SESSION NAME 8:8 MESSAGE 16:40 A sample JOGDATA would be:- 95/05/01ADE Start production of GSNEWS 6 95/04/27PETER Site visit in London. Phone for confirmation. 95/06/20PAM Training day tomorrow. Get food. 95/05/18LEE Confirm dentist appointment tomorrow The memory jogger system displays any memos, todos or reminders during the logon procedure in the same fashion as the QUOTEGEN command. Because of this we have combined the two commands into one $LOGON-EXECUTE e.g $LOGON-EXECUTE BEGIN & MPE ("%JOGGER");& MPE ("%QUOTEGEN");& MPE ("%PAUSE 3");& END; ONLINE The BEGIN...END construct allows us to do more than one line during a $LOGON-EXECUTE. Note that each line with the BEGIN..END MUST end with a ";&" Once the users have logged on, they are greeted with a SECURITY/3000 menu. In our menus a user has options to take them into an additional sub menu where they can add, delete or view any memory joggers they wish. This sub menu along with some graphical template menus and a VEMAIL sub menu are included in the GSLMENU.VECSL contributed library To clear up the JOGDATA file we have a simple job that is scheduled to log on every Friday using STREAMX/3000. The JCL is submitted to the scheduler with the line :- STREAM JOGLEAR.JCL.SYS;REPEAT=FRI;AT=23:00 The JCL of JOGCLEAR simply consists of :- !JOB JOGCLEAR,MANAGER.SYS !RUN MAIN.PUB.VESOFT,MPEX;PARM=1 JOGGER CLEAR BYE !EOJ Shipped in the current GSL contributed library along with a vast number of other files are an enhanced JOGGER command that includes full scheduling capabilities , LOTTERY, QUOTEGEN, VEMAIL and STD. VEMAIL is the Inter Company Communication program and STD is a complete $STDLIST checking and management system. Both VEMAIL and STD were written in MPEX and will be discussed in future GSNEWs. All these files are of course error checked with an added bonus of no additional keying in. You may ask yourself, why add these at logon time to increase the time that it takes you log on. The ironic thing is, because something is happening that could be relevant to you, the extra time taken to log on is not noticed!!