Datebook Reference Manual Version 5.10 Bruce Tanner Cerritos College Norwalk, CA 90650 Tanner@Cerritos.EDU 1 Introduction Datebook is a program that creates, deletes, updates and displays a calendar of events. Several types of entries are maintained in Datebook: * Specific date and time such as 1:00PM on September 20, 1991. * Date with no specific time. * Recurring at some interval such as the second Tuesday of the month. * Non-date information such as telephone directories, things to do, etc. Parts of a calendar may be displayed on the terminal screen as well as sent to a local printer, a remote printer or a file. 1.1 Entering Datebook Datebook may be entered from the DCL prompt with the command DATEBOOK This method will place you at the Datebook main menu (see Chapter 2 for a description of the main menu). 1.2 History Datebook was written in January 1982 at Cerritos College by Bruce Tanner. Versions 1 and 2 were written in COBOL-74 (stop laughing, it was either that or MACRO-10) under TOPS-10. In June 1984 version 3 was written using the Rutgers University version of Pascal. In March 1986 version 4 was created to support TOPS-20. Finally, in November 1989 version 5 was ported to VMS. 2 The Main Menu The main menu provides access to the different types of calendars as well as performing operations on large sections of the calendar. Each menu option is indicated by a letter. To select that menu option, type the letter and press the return key. The one exception is which means just press the return key. The main menu screen looks like this: Friday, March 13, 1987 Datebook version 5.10 Calendar: Review/Update Today T Review/Update Tomorrow Y Review/Update Yesterday O Review/Update Other date R Review/Update Recurring entries U Review/Update User defined list D Delete calendar entries S Search calendar for text P Print entries A Alternate calendar file C Display year calendar E Exit Datebook Command? {T,Y,O,R,U,D,S,P,A,C,E}[Today] The first three lines indicate today's date, the version of Datebook and the current calendar being used (see Section 2.9) for using other calendars). The middle of the screen shows the commands that may be given followed by a short description. The menu command line is at the bottom of the screen and starts with the prompt ``Command?''. The items inside the braces {} are the list of allowable commands. The item inside the brackets [] is the command that will be performed if just the return key is pressed. This is referred to as a default command. It is also possible for a command to have a default option, such as in the Print command in Section 2.6. Since in the main menu there is a command that is explicitly associated with the return key, [Today] describes the function rather than listing the menu command itself. Each of the following commands are described in this manual: * Review/Update Today, Tomorrow, Yesterday, or Other date (Section 2.3 and Chapter 3) * Review/Update Recurring entries (Section 2.4 and Chapter 4) * Review/Update User defined list (Section 2.5 and Chapter 5) * Print calendar entries (Section 2.6) * Delete a group of calendar entries (Section 2.7) * Search calendar for text (Section 2.8) * Alternate calendar file (Section 2.9) * Display year calendar (Section 2.10) * Exit Datebook (Section 2.2) 2.1 Dates Many of the commands in Datebook use a date or range of dates as part of their commands. Datebook will only correctly handle dates from January 1, 1900 through December 31, 2099. Datebook tries to be as flexible as possible when determining dates. 2.1.1 The current date The current date is the date shown by Datebook at the top of the screen. You may only change the current date by using the Tomorrow (T), Yesterday (Y), or Other date (O) commands from either the main menu or the daily calendar menu. 2.1.2 Absolute Dates To specify a month, day, and year in Datebook, you may enter an absolute date. Listed below are absolute date formats that Datebook knows about with a typical example of each. Text may be entered in upper case, lower case or a combination of the two. [MM = month, DD = day, YY = (2 or 4 digit) year, MMM = month name (e.g. December) or unique abbreviation (Dec)] MM/DD/YY (3/13/87 or 3/13) MM-DD-YY (3-13-87 or 3-13) YYMMDD (870313) MMDDYY (31387) MMM DD YY (March 13, 1987 or Mar 13) DD MMM YY (13 March 87 or 13 Mar or even 13) If the month and/or year is omitted, the current month and/or year is used. 2.1.3 Relative Dates To enter a date that is relative to the current date or relative to an absolute date, you may enter a relative date. The following are relative date formats with explanations and examples: [NN = a decimal number, DOW (Day of the Week) = {Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Today, Yesterday, Tomorrow, Weekday, Everyday} or a unique abbreviation] +NN The current date + NN days. +7 = this day next week. -NN The current date - NN days. -7 = this day last week. +DOW The next DOW after or equal the current date. +Friday = next Friday. DOW The same as +DOW. -DOW The last DOW before or equal the current date. -Monday = last Monday. N:DOW MMM YY The Nth DOW of the month. 2:Fri March 87 = the second Friday of March, 1987. If MMM YY is omitted, the current month and year is used. 9:DOW is the last DOW of the month. +N:DOW The Nth DOW after the current date. 2:Tue = the second tuesday after the current date. -N:DOW The Nth DOW before the current date. -3:Wed = the third Wednesday before the current date. There is a subtle difference between +DOW and +1:DOW (as well as -DOW and -1:DOW). +DOW is defined as the next DOW after or equal to the current date, whereas +1:DOW is defined as the next DOW after the current date. For example, if the current date were Monday, March 1, +Mon would give Monday, March 1; but +1:Mon would give Monday, March 8. To specify a date which is relative to an absolute date, first specify the absolute date and then the relative date information. For example, to refer to the second Tuesday after May 27, 1986, you would enter ``27 May 86 +2:Tue''. 2.1.4 Special days of the week You may have noticed Weekday and Everyday in the definition of DOW. Weekday is used as a relative day of the week to specify the next (or previous) Monday through Friday. For example, ``1 April + Weekday'' would specify the first weekday in April. If the first was a weekday, the effective date would be the first of April. If the first was a Saturday, the effective date would be the third of April. Weekday does not skip over any holidays known to Datebook. Everyday) is used to specify a recurring entry that happens every day (see Chapter 4). Usually, Weekday is a better choice. Yesterday is equal to the current date -1. Tomorrow is equal to the current date +1. Today is equal to the current date. 2.2 Leaving Datebook You may exit Datebook with either the Exit command (E) or an X, Q, 0 (zero) or Control-Z. 2.3 Displaying a daily calendar There are four commands that will display a daily calendar. The Today (), Tomorrow (T), and Yesterday (Y) commands will display the corresponding daily calendar. The Other date command (O) will prompt you for a date: What date? [Today] +7 The default date is today's date, and in this example we asked to see a week from today. For an explanation of the daily calendar display, see Chapter 3. 2.4 Displaying recurring entries The Recur command (R) will bring up the display of recurring entries. For an explanation of the recurring entry display see Chapter 4. 2.5 Displaying user defined lists The User command (U) will display one of 9 user definable lists (referred to from now on as `user lists'). If you just enter the command ``U'', Datebook will respond with Which User list? {1-9}[Quit] If you enter 1 through 9, that particular user list will be displayed. If you press return, you will return to the main menu. A shortcut method of displaying a user list is to enter ``U1'' through ``U9'', which will not prompt you for the number of the user list. For an explanation of the user list display, see Chapter 5. 2.6 Printing calendar entries You can print the calendar entries for a range of dates with the Print command (P). This is an example of the Print command: Print Calendar or Recurring entries? {C,R} [C] Start with what date? [Today] End with what date? [Today] Include recurring entries in list? [Y] Send the listing to: (T) The Terminal (L) A Local printer connected to your terminal or microcomputer (F) A File (P) A Printer Which device? {T,L,F,P}[T] The first thing Datebook asks is whether you wish to print the Calendar or just the list of recurring records. The default is to print the calendar. Next, it asks the dates with which to start and end the printing. The default in both questions is today's date. It then asks whether you want just a list of non-recurring calendar entries or to have recurring entries included in the listing. The default is to include recurring entries. Finally, Datebook asks where you wish to send the listing. You may send it to the terminal screen, a printer connected to your terminal, a disk file for storage, or a system printer. The default is to display the list on the terminal screen. If the output device is not the terminal, Datebook will print the date of every day that is being printed as an indication of its progress. If the output device is the terminal, Datebook will print Press to exit back to the main menu and wait for you to press the return key at the end of the listing so that you can finish reading the screen. 2.7 Deleting a range of dates The Delete command (D) is used to `clean up' a calendar, making the calendar smaller and therefore faster to load when Datebook starts. Here is an example of the delete command: Start with what date? [1/1/80] End with what date? [Yesterday] Delete from Tuesday, January 1, 1980 to Thursday, March 12, 1987? [N] Y Do you wish to print the calendar entries before deleting them? [N] Friday, January 2, 1987 Monday, March 9, 1987 As in the print command, Datebook asks for a range of dates. This time, the defaults are from a point far in the past to yesterday. Datebook next asks you to confirm that you wish to delete this range of dates. The default is not to delete the dates, forcing you to answer ``yes'' to the question. Next you have the option of printing the calendar entries that will be deleted. If you choose this option, you will be asked to select an output device just like the print command does. As the calendar entries are deleted, the dates are printed on the terminal. 2.8 Searching the calendar for a word If you can't remember when you scheduled a particular appointment, you can search the calendar for any text. For example, let's get the next two birthdays that are in the calendar. Search for what text? [Quit] birthday Start with what date? [Today] End with what date? [Start date +30] +200 Stop after how many matches? [1] 2 Send the listing to: (T) The Terminal (L) A Local printer connected to your terminal or microcomputer (F) A File (P) A Printer Which device? {T,L,F,P}[T] Thursday, September 3, 1987 Leslie's birthday (9/3) Friday, September 18, 1987 Gail's birthday (9/20) Press to exit back to the main menu Datebook first asks for the text that it will use to search the calendar. Next it asks for a range of dates to begin and end the search. End dates are relative to the start date, not the current date. In this case, the defaults start with today and end in 30 days. Datebook then asks whether it should stop after one match, two matches, etc. After it knows how far to search, Datebook asks for a list device just as in the print and delete commands. You can surround the text with delimiters, (Delimiters are taken from the list ", ', * and /) for example since trailing spaces are ignored, "Jack " (with an embedded space) will not match ``Jackie''. For every calendar entry that satisfies the search criteria, Datebook will print the date followed by the entries on that date that match the text given. 2.9 Using other calendars The Alternate calendar command (A) will switch between two calendars; the calendar that is normally read when Datebook starts (called the default calendar) and another person's calendar (called the alternate calendar). Normally, both the default and alternate calendars are your own. However, either of these may be changed to be another calendar. If you have multiple alternate calendars defined, Datebook will show a menu of directory names that contain the alternate calendars, and ask you which one you want to use. Here is an example of an multiple alternate calendar: 0 USER_DISK:[TANNER] 1 USER_DISK:[WILSON] 2 USER_DISK:[BRANTLEY] 3 USER_DISK:[DYKSTRA] Enter item number of alternate calendar directory: [0] 3 In this example, the calendar for DYKSTRA was selected to be used. Alternate calendar 0 (zero) will always be your own calendar. Another way of selecting one of multiple alternate calendars is to give the calendar number along with the Alternate calendar command. For example, the command ``A3'' would also select alternate calendar number 3 (DYKSTRA). To manipulate logical names for default and alternate calendars, see Appendix A. 2.10 The yearly calendar There is a simple perpetual yearly calendar built into Datebook that will place an entire year's calendar on the screen. Here is an example of the Calendar command: Enter year to be displayed [1987] January February March April M T W Th F S M T W Th F S M T W Th F S M T W Th F S 1 2 3 2 3 4 5 6 7 2 3 4 5 6 7 1 2 3 4 5 6 7 8 9 10 9 10 11 12 13 14 9 10 11 12 13 14 6 7 8 9 10 11 12 13 14 15 16 17 16 17 18 19 20 21 16 17 18 19 20 21 13 14 15 16 17 18 19 20 21 22 23 24 23 24 25 26 27 28 23 24 25 26 27 28 20 21 22 23 24 25 26 27 28 29 30 31 30 31 27 28 29 30 . . . . . . . . . . . . The Calendar command (C) first asks for the year to be displayed. The default is the current year. You may press the return key for the default or enter a two or four digit year. The contents of the calendar are then displayed on the screen. Sundays have been removed to allow the calendar to fit on one screen. Datebook will wait for you to press the return key before returning to the main menu. 3 The Daily Calendar The primary function of Datebook is to maintain a collection of calendar entries that are displayed in the daily calendar section. This is a typical calendar page: Friday, March 13, 1987 Calendar: 1 12:00P - 1:00P Lunch R2 Do something today Command? {T,Y,O,A,U,D,C,F,M,R,P,N,E,Q,Help}[Exit to main menu] The top line of the daily calendar display is the date of the calendar entries. If the day is a holiday, the top line will be in inverse video and the date will be followed by the name of the holiday. Each item for a specific date will have a number. In this example, item number 1 is a regular timed entry which says lunch is scheduled from 12:00 PM to 1:00 PM. Item number 2 is a recurring entry (indicated by an `R' before the item number) that is not scheduled for any particular time that day. One other type of time that may be displayed is ``*** All day ***'' which indicates that the entire day is scheduled for that activity. All Timed entries are displayed in chronological order. Non-time entries are displayed after the last timed entry and are not in any order. When it becomes time for an activity to start, the entry will be displayed in inverse video. If there are more than 20 calendar entries for a particular day, the first 20 will be displayed and ``[More]'' will be displayed before the ``Command?'' prompt. The next screen full of entries can be displayed with the Next command (N). Also, if you have mail waiting for you, ``Mail'' will be displayed on the right side of the command line in blinking inverse video. The first command you may wish to try is the Help command (H). This is what the help command will display: A Add an entry to this date D Delete an entry U Update an entry C Check off an entry F Flag an entry N Display the next screen full for this date T Go to the day after this date Y Go to the day before this date O Go to some other date M Move an entry to another date R Replicate entry to another date P Move all pending (not checked off) entries to another date E Exit to the main menu (also ) Q Exit Datebook H Display this screen Entry numbers can be specified with the commands D,U,C,F,M,R e.g. D1, C10 Enter a command or press 3.1 Leaving the daily calendar There are two ways to leave the calendar screen: the Exit command (E) will put you back at the main menu; the Quit command (Q) will quit Datebook immediately. 3.2 Changing dates The commands Tomorrow (T), Yesterday (Y), and Other date (O) will display another date. These commands are identical to the commands in the main menu, see Section 2.3. 3.3 Adding entries To add a calendar entry, use the Add command (A). Datebook will prompt with: Start time: [No time] The default is to make an entry with no time associated with it. See Section 3.3.1 for information about specifying times. If you do give a start time, Datebook will ask for an end time, with the default being the same as the start time: End time: [Same as start time] Finally, you will be asked for the text of the calendar entry: Message: The maximum size of this text is 60 characters. After the entry has been added, Datebook will display the updated calendar entries. For example, if you entered: Start time: [No time] 1 End time: [Same as start time] Message: This is a test Datebook would display: 2 1:00P - 1:00P This is a test 3.3.1 Times Times may be specified in many ways: [P = PM, A = AM] * Fully. (1:00P) * Without the colon. (100P) * If it is on the hour, without the minutes. (1P) * In military time. (1300) * Using Datebook's AM/PM algorithm. (1) If Datebook is given no indication of whether a time is AM or PM, it uses the following rule: If the hour is from 1 to 7, it assumes PM; otherwise it assumes AM. The exception to this rule is that if the start time of an entry is in the PM, then the end time is PM also. So if the start time is given as ``6'' and the end time is given as ``9'', the entry would be from 6 PM to 9 PM (not 9 AM). If an entry will take all day, you can give the start time of ``All''. 3.4 Deleting entries Calendar entries may be removed with the Delete command (D). If an entry is specified in the command (for example D1), then entry number 1 would be deleted. If no entry number is given, Datebook prompts with: Which entry? You would then enter the item number to delete. After the entry is deleted, Datebook will display the updated calendar entries. 3.5 Updating entries You can change an entry's times or message without deleting the entry and creating a new one. The Update command (U) will take an entry number like the delete command or it will prompt for the entry number if one is not given. Here is an example of updating an entry: 1 1:00P - 2:00P Late lunch Command? {T,Y,O,A,U,D,C,F,M,R,P,N,E,Q,Help}[Exit to main menu] U1 Old Start time: 1:00P New Start time: 2 Old End time: 2:00P New End time: 3 Old Message: Late lunch New Message: 1 2:00P - 3:00P Late lunch The Update command displays the old values of the start and end times and the entry's message. If there is no change to be made (as in the example, the old message was not changed), just press the return key. What happens if you want to change a timed entry to a non-timed entry? If you press the return key in response to the `New Start time' prompt, Datebook asks if you wish to convert the entry to have no times: New Start time: Do you wish to blank the Start time? [No] Old Message: Late lunch If you wish to blank the times, enter ``Y'' and press the return key. If you just wish to leave the times alone, press return. To change the end time, you will need to re-enter the start time to get to the end time prompt. 3.6 The Check command The Check command (C) is a non-destructive method of indicating that an entry has been done. The command will prompt for an entry number if one hasn't been given with the command. The command will remove the message but leave the entry number. Two or more sequential checked entries will be displayed on the same line. For example, if entries 1, 2, and 3 were checked, the calendar would display: 1 2 3 4 Message 4 If you check an entry that was already checked, the entry will magically return to its original form. 3.7 The Flag command The Flag command (F) is a way to highlight or `flag' an entry. When a flagged entry is displayed, it will have an ``F'' next to the entry number and will be displayed in bold video. The command will prompt for an entry number if one hasn't been given with the command. Like the Check command, the Flag command will toggle on and off. The Check and Flag commands are mutually exclusive. That is, you can't flag a checked entry, and if you check a flagged entry, it will lose its flagged status. 3.8 Moving entries Calendar entries can be moved to other dates using the Move (M) and Replicate (R) commands. The Move command will transfer a calendar entry from the current date to another date. The Replicate command will make a duplicate entry and place it at another date. Both commands will prompt for an entry number if one is not given with the command, then prompt for the destination date. The Procrastinate command (P) will move all entries that are not checked and do not have a time associated with them. This provides a method of moving all the `to do' items that haven't been done to tomorrow. If a recurring item is moved or copied, a non-recurring copy of the item is placed at the destination. This copy will `hide' any occurrence of the recurring item that would normally be displayed. This means that if you then delete this copy, the hidden recurring entry will appear. While it is waiting for a command, Datebook wakes up once a minute to see if there is any mail and if anyone has changed the calendar you are using. The screen is refreshed every five minutes, possibly highlighting new entries. If the calendar you are using has been changed by someone else shortly before a command is given, Datebook will ask you to give the command again. This is to stop you from making a change to a calendar that is in an unknown state. Review the screen again to see if any of the entries have changed. 4 Recurring entries Recurring entries are appointments that reoccur at fixed intervals, such as every day, every Wednesday afternoon, every second Tuesday of the month, or once a year. The main distinction between regular calendar entries and recurring entries are that the recurring entries are evaluated every time a daily calendar is selected and will be displayed if they match the current date. They specify dates like Wednesday, 2:Tuesday, or April 1 (to use the above examples). The command prompt for recurring entries is almost identical to the regular calendar: Command? {A,U,D,N,E,Q}[Exit to main menu] Actually, the Update (U), Delete (D), Next (N), Exit (E), and Quit (Q) commands are the same as in the regular calendar and need not be covered again. 4.1 Creating entries The Add command (A) is slightly different; the first prompt is for a recurring date instead of using the current date: Recurring date (e.g. 2:Tue): weekday Start time:[No time] 12 End time:[Same as start time] 1 Message: Lunch The above example shows a recurring entry that will indicate an appointment every weekday at 12 PM to 1 PM with the message ``Lunch'': R1 12:00P - 1:00P Lunch The recurring date field can hold a 20 characters relative date. See section 2.1 for a description of relative dates. 5 User defined lists There are 9 separate displays for user-defined, non-date information, such as lists of telephone numbers. These non-date displays look similar to the daily calendar, except that they have no date or time associated with them. Instead, they have a 20 character `Key' field associated with them. The entries are displayed alphabetically by key. Again, the Update (U), Delete (D), Next (N), Exit (E), and Quit (Q) commands are the same as in the regular calendar and need not be covered. 5.1 Creating entries The add command asks for a 20 character key text, then the 60 character message: Key text (20 characters): Smith, John Message: Phone: (123) 456-7890 Which will display the entry: 1 Smith, John Phone: (123) 456-7890 Appendex A - Datebook DBA A.1 Alternate calendars By default, your calendar file is SYS$LOGIN:DATEBOOK.CALENDAR. You may change this default by defining a logical name DATEBOOK_DEFAULT_CALENDAR that points to a disk structure and directory other than your own. In this way, you can use Datebook with someone else's calendar. This does not mean that you can normally look at other people's calendars. The file protection must be set such that you are able to read the calendar. The Alternate calendar command (A) will alternately switch you between the default calendar and the one of calendars specified by the logical name DATEBOOK_ALTERNATE_CALENDAR. If more than one alternate calendar needs to be specified, the directories can be separated by commas, e.g. PS:, PS:, PS:. The default calendar can be your own and the alternate calendar set to one (or more) which you need to access. If you do specify more than one alternate calendar, the Alternate calendar command will not alternately select your default calendar. It will instead ask you to select one of the alternate calendars again. Your own calendar is always item 0 (zero) in the alternate calendar menu. If you have multiple alternate calendars and also define a default calendar other than your own, you must include the default calendar definition as one of the alternate calendars. Otherwise, you will not be able to select the default calendar with the Alternate calendar command. A.2 Holidays Datebook reads a file defined by the logical name DATEBOOK_HOLIDAYS to define known holidays. This file is keyed on the date field in the form YYYYMMDD--20 char holiday-- for example: 19870101New Year's Day Use the file HOLIDAYS.FDL and CONVERT to create the holidays file from a text file. A.3 Other Logical Names The logical name DATEBOOK_WARNING_INTERVAL specifies the maximum number of days that you may keep a calendar entry before a warning message is displayed on the main menu screen. If the logical name is not defined, warnings will not be displayed. Appendix B - Remind Remind is a program that runs in the background and reminds you of an appointment when Datebook is not running. At 10 minutes before, 5 minutes before, and at the start of the appointment, Remind will ring the terminal bell twice and print on the screen [Remind: ] To use Remind, place the following commands in your LOGIN.COM file: $ SPAWN/NOWAIT/INPUT=NL: RUN REMIND