.PAGE SIZE 55, 68 .JUSTIFY.FILL .CENTER Coping with Office Automation Products .BLANK.CENTER (such as All-In-1) .BLANK.CENTER using Datatrieve .BLANK.CENTER Part 3: Time Management (Meetings) .BLANK 2.CENTER B.#Z.#Lederman .BLANK.CENTER ITT World Communications .BLANK.CENTER New York, NY 10004-2464 .NOTE Abstract This article is the third in a series showing some of the uses for Datatrieve in managing and/or coping with such products as All-In-1. This particular article shows how to manipulate the time management files. .PARAGRAPH For the remainder of this article, AI1 is an abbreviation for All-In-1, WPS for any version of WPS or WPS-Plus, and DTR for Datatrieve. .END NOTE .PARAGRAPH Time Management is one of the applications which is built into All-In-1. It allows a user to mark a calendar for reminders and action items, and to allow groups of users to schedule meetings by checking all of the users' calendars for conflicts. Although most access to the data is done through AI1, there are times when the users, and especially the AI1 manager, may need to access and/or manipulate the data outside of AI1. This article will deal with multi-user time management (meetings). .PARAGRAPH To take the easiest case first, here is a definition for OA$DATA:CALACCESS.DAT, the file which determines which users are allowed to access which other users' calendars. .BLANK.NO JUSTIFY.NO FILL.TEST PAGE 11 REDEFINE RECORD AI1__CALACCESS__RECORD 01 AI1__CALACCESS__REC. 10 GRANTUSER PIC X(30) EDIT__STRING T(16) QUERY__HEADER "User"/"Granting"/"Access". 10 ACCUSER PIC X(30) EDIT__STRING T(16) QUERY__HEADER "Access"/"Given"/"To". 10 READ PIC X QUERY__HEADER "Read"/"Your"/"Calendar". 10 WRITE PIC X QUERY__HEADER "Schedule"/"for"/"You". 10 PHONE PIC X QUERY__HEADER "". ; .BLANK.JUSTIFY.FILL When this domain is printed the fields look like this: .BLANK.NO JUSTIFY.NO FILL.TEST PAGE 21 User Access Read Schedule Granting Given Your for Access To Calendar You .BLANK ERSKINE STEVE Y Y ERSKINE ELLIOTT Y Y LEROY REGGIE Y Y LEROY HOWIE Y N LEROY RALPH Y N LEROY SOLON Y N LEROY JOSHI Y N LEROY STEVE Y Y RKELLY VICKIC Y N STEVE ERSKINE Y N VICKIC BEATE Y N VICKIC ERSKINE Y Y VICKIC IRENE Y N VICKIC STEVE Y N VICKIC ELLIOTT Y N VICKIC RKELLY Y N .BLANK.JUSTIFY.FILL The fields and their use should be fairly obvious: each user has an entry for each other user to which they wish to grant read access and/or scheduling access. What is not immediately obvious is the first important reason why a manager would want Datatrieve access to this file, although it becomes apparent when I explain that none of the persons listed in this domain have access to this system. As mentioned in the previous article, All-In-1 does not clean up after itself properly, especially when deleting users. All of the persons you see listed above were deleted from All-In-1 using the normal System Manager's functions, but AI1 didn't delete their entries from the Calendar Access files (neither this one or the others shown below). Using Datatrieve, it is easy to locate and delete all records which have the name of a person who is no longer an AI1 user in either the GRANTUSER or ACCUSER fields and thus clean up the file. The other reason is that it is much easier to obtain a quick listing of all users in the CALACCESS file with DTR than it is with AI1. These two reasons for using Datatrieve to access All-In-1 data files will appear many times in this series of articles. .PARAGRAPH Something to be aware of is that any user with write access to this file can add or modify records. This is handy if the system manager wants to add new users to have access to many existing users, or if the manager wants to obtain access to other users' calendars, but it's not so good if users give themselves more access then they should have to other users' calendars. You should check to see that the world has read access only to the data file: the AI1 task image is itself privileged and will still have access on behalf of the users. .PARAGRAPH The next file I will consider is OA$DATA:ATTENDEE.DAT, the file which contains the list of meetings and attendees. The record definition for this file is: .BLANK.NO JUSTIFY.NO FILL REDEFINE RECORD AI1__ATTENDEE__REC 01 AI1__ATTENDEE__REC. 02 MEET__REC. 03 MEET__MATCH. 10 NAME1 PIC X(30) EDIT__STRING T(15). 10 MATCH1. 20 FILLER PIC X(12). 20 DATE COMPUTED BY CHOICE OF (MM1 EQ " ") THEN FN$DATE("18-NOV-1858 00:00:00.00") ELSE FN$DATE(MD1 | "-" | MM1 VIA MONTH__TABLE | "-" | MY1 | " " | MH1 | ":" | MI1 | ":00.00") END__CHOICE. 20 TIME COMPUTED BY FN$TIME(MATCH1.DATE) EDIT__STRING X(5). 20 LENGTH PIC X(4). 10 MATCH1__R REDEFINES MATCH1. 20 MY1 PIC X(4). 20 MM1 PIC X(2). 20 MD1 PIC X(2). 20 MH1 PIC X(2). 20 MI1 PIC X(2). 03 MEETR REDEFINES MEET__MATCH. 20 MEETING__POINTER PIC X(46). 03 ATTEN. 10 ATTENDEE__NAME PIC X(30) EDIT__STRING T(15). 02 MEETRC REDEFINES MEET__REC. 20 MEETING__RECORD PIC X(76). 02 DATA. 10 FLAG PIC X. 10 YES__NO PIC X(3). 10 MESSAGE PIC X(56) EDIT__STRING T(24). 10 APPOINTMENTS OCCURS 6 TIMES. 15 MATCH2. 20 FILLER PIC X(12). 20 DATE COMPUTED BY CHOICE OF (MM2 EQ " ") THEN FN$DATE("18-NOV-1858 00:00:00.00") ELSE FN$DATE(MD2 | "-" | MM2 VIA MONTH__TABLE | "-" | MY2 | " " | MH2 | ":" | MI2 | ":00.00") END__CHOICE. 20 TIME COMPUTED BY FN$TIME(MATCH2.DATE) EDIT__STRING X(5). 20 LENGTH PIC X(4). 15 MATCH2__R REDEFINES MATCH2. 20 MY2 PIC X(4). 20 MM2 PIC X(2). 20 MD2 PIC X(2). 20 MH2 PIC X(2). 20 MI2 PIC X(2). 20 LENGTH PIC X(4). 10 END PIC X(19). ; .BLANK.JUSTIFY.FILL As in previous articles, I am using the REDEFINES clause to take the date and time stored by AI1 as ASCII characters and converting it into the Datatrieve (and VMS) standard binary date and time. This isn't strictly necessary to examine the file or for most management functions, but it does make retrieval by date easier within Datatrieve. Unlike most of the other definitions you will see in this series of articles, I have not been able to find an AI1 form which displays this data file, so I cannot be certain that I have the same names for these fields that AI1 uses, and therefore some of the field names may not correspond to their intended use. However, there is an FDL file which has the key definitions, and some of the odd looking REDEFINES and group levels are there so that I can access the data in the individual fields and still have redefined fields that match the file keys. .PARAGRAPH This domains prints out best when 132 columns wide, but as this won't fit well in the newsletter I am going to show a listing of a few records. .BLANK.NO JUSTIFY.NO FILL NAME1 : ERSKINE DATE : 29-Aug-1985 TIME : 13:30 LENGTH : 0000 NAME2 : STEVE FLAG : YES__NO : YES MESSAGE : DATE : 29-Aug-1985 TIME : 13:30 LENGTH : 0000 DATE : 29-Aug-1985 TIME : 17:00 LENGTH : 0000 DATE : 30-Aug-1985 TIME : 08:00 LENGTH : 0000 DATE : 30-Aug-1985 TIME : 17:00 LENGTH : 0000 DATE : 2-Sep-1985 TIME : 08:00 LENGTH : 0000 DATE : 2-Sep-1985 TIME : 17:00 LENGTH : 0000 END : .BLANK NAME1 : HOWIE DATE : 30-Aug-1985 TIME : 20:00 LENGTH : 0000 NAME2 : STEVE FLAG : YES__NO : NO MESSAGE : DATE : 2-Sep-1985 TIME : 08:00 LENGTH : 0000 DATE : 2-Sep-1985 TIME : 17:00 LENGTH : 0000 DATE : 3-Sep-1985 TIME : 08:00 LENGTH : 0000 DATE : 3-Sep-1985 TIME : 17:00 LENGTH : 0000 DATE : 4-Sep-1985 TIME : 08:00 LENGTH : 0000 DATE : 4-Sep-1985 TIME : 17:00 LENGTH : 0000 END : .BLANK NAME1 : IVP DATE : 1-Jan-2010 TIME : 08:00 LENGTH : 0001 NAME2 : NOT__A__REAL__NAME FLAG : YES__NO : YES MESSAGE : I will be a little late. DATE : 18-Nov-1858 TIME : 00:00 LENGTH : DATE : 18-Nov-1858 TIME : 00:00 LENGTH : DATE : 18-Nov-1858 TIME : 00:00 LENGTH : DATE : 18-Nov-1858 TIME : 00:00 LENGTH : DATE : 18-Nov-1858 TIME : 00:00 LENGTH : DATE : 18-Nov-1858 TIME : 00:00 LENGTH : END : .BLANK NAME1 : IVP DATE : 1-Jan-2010 TIME : 08:00 LENGTH : 0001 NAME2 : YHTALEOJ FLAG : YES__NO : MESSAGE : DATE : 18-Nov-1858 TIME : 00:00 LENGTH : DATE : 18-Nov-1858 TIME : 00:00 LENGTH : DATE : 18-Nov-1858 TIME : 00:00 LENGTH : DATE : 18-Nov-1858 TIME : 00:00 LENGTH : DATE : 18-Nov-1858 TIME : 00:00 LENGTH : DATE : 18-Nov-1858 TIME : 00:00 LENGTH : END : .BLANK.JUSTIFY.FILL You can probably begin to see from these few records some of the reasons for using DTR to get at this data. As before, removing a user from AI1 does not remove that users' meetings from the data file, so DTR can be used to remove them. There also does not appear to be any mechanism to remove past meetings automatically (notice the meetings scheduled by IVP, the Installation Verification Procedure, are still present) so DTR can be used to remove them. Finally, the reason for using the REDEFINES clauses to put the date into a form where comparisons work well within DTR becomes apparent when a user tries to go in and remove past meetings. I have not found a way to get AI1 to tell me which past days still have meetings assigned, and the tendency is going to be for users to simply leave all past meetings scheduled. Eventually, the ATTENDEE.DAT file is going to be very large, and most of the data within it will be for meetings which already occurred. Using the date comparison within Datatrieve makes it easy to find and delete all past meeting records. You could also store them into a separate domain for journaling if you wish to, but you should keep obsolete data out of ATTENDEE.DAT or else AI1 performance could suffer. .PARAGRAPH Next comes OA$DATA:MEETING.DAT, the file which contains a list of meetings. .BLANK.NO JUSTIFY.NO FILL REDEFINE RECORD AI1__MEETING__RECORD 01 AI1__MEETING__REC. 10 MEETING__MATCH. 15 SCHEDULER PIC X(30) EDIT__STRING T(15). 15 MATCH1. 20 FILLER PIC X(12). 20 DATE COMPUTED BY CHOICE OF (MM1 EQ " ") THEN FN$DATE("18-NOV-1858 00:00:00.00") ELSE FN$DATE(MD1 | "-" | MM1 VIA MONTH__TABLE | "-" | MY1 | " " | MH1 | ":" | MI1 | ":00.00") END__CHOICE. 20 TIME COMPUTED BY FN$TIME(MATCH1.DATE) EDIT__STRING X(5). 20 LENGTH PIC X(4). 15 MATCH1__R REDEFINES MATCH1. 20 MY1 PIC X(4). 20 MM1 PIC X(2). 20 MD1 PIC X(2). 20 MH1 PIC X(2). 20 MI1 PIC X(2). 10 MEETR REDEFINES MEETING__MATCH. 20 MEETING__POINTER PIC X(46). 10 MATCH2. 20 FILLER PIC X(12). 20 DATE COMPUTED BY CHOICE OF (MM2 EQ " ") THEN FN$DATE("18-NOV-1858 00:00:00.00") ELSE FN$DATE(MD2 | "-" | MM2 VIA MONTH__TABLE | "-" | MY2 | " " | MH2 | ":" | MI2 | ":00.00") END__CHOICE. 20 TIME COMPUTED BY FN$TIME(MATCH2.DATE) EDIT__STRING X(5). 20 LENGTH PIC X(3). 10 MATCH2__R REDEFINES MATCH2. 20 MY2 PIC X(4). 20 MM2 PIC X(2). 20 MD2 PIC X(2). 20 MH2 PIC X(2). 20 MI2 PIC X(2). 10 PURPOSE PIC X(60) EDIT__STRING T(15). 10 LOCATION PIC X(32) EDIT__STRING T(16). 10 PRIORITY PIC XX. 10 A PIC X(31). 10 NAME2 PIC X(30) EDIT__STRING T(15). 10 B PIC X(60). ; .BLANK.JUSTIFY.FILL Once again this information is easier to read when 132 columns wide, so I will have to list just a few records here. .BLANK.NO JUSTIFY.NO FILL SCHEDULER : ERSKINE DATE : 29-Aug-1985 TIME : 13:30 LENGTH : 0000 DATE : 29-Aug-1985 TIME : 14:00 LENGTH : 000 PURPOSE : test meeting LOCATION : my office PRIORITY : A1 A : NAME2 : B : .BLANK SCHEDULER : IVP DATE : 1-Jan-2010 TIME : 08:00 LENGTH : 0000 DATE : 1-Jan-2010 TIME : 21:00 LENGTH : 000 PURPOSE : To test Installation Verification Procedures LOCATION : Charlotte PRIORITY : A1 A : NAME2 : B : .BLANK SCHEDULER : IVP DATE : 1-Jan-2010 TIME : 08:00 LENGTH : 0001 DATE : 1-Jan-2010 TIME : 21:30 LENGTH : 000 PURPOSE : To test Installation Verification Procedures LOCATION : Charlotte PRIORITY : A1 A : NAME2 : B : .BLANK.JUSTIFY.FILL As before, this domain contains records of obsolete meetings, meetings for persons no longer using the system, and IVP meetings that are scheduled for the future but really don't need to remain in the file once the Installation Verification Procedure finishes. .PARAGRAPH When cleaning up the ATTENDEE and MEETING files, you should remember that their use is inter-linked: you shouldn't have meetings without attendees, and vice versa. I have not done much in the way of trying to match up the two files: whenever I have had to clean them up it has been a case of deleting all records which refer to a particular ex-user or deleting all records of meetings scheduled before a particular date, and just assuming that this doesn't leave any non-matched records (this is probably a fairly safe assumption). If you do want to try matching things up, then the field MEETING__POINTER, which is a keyed field in both domains, is probably the best place to start. For example (only a few records are reproduced here): .BLANK.NO JUSTIFY.NO FILL DTR>for meeting cross attendee over meeting__pointer - CON>print scheduler, attendee__name, date .BLANK.TEST PAGE 15 ATTENDEE SCHEDULER NAME DATE .BLANK ERSKINE RALPH 29-Aug-1985 ERSKINE STEVE 29-Aug-1985 ERSKINE IRENE 30-Aug-1985 HOWIE STEVE 30-Aug-1985 IRENE PATMC 30-Aug-1985 IVP NOT__A__REAL__NAME 1-Jan-2010 IVP NOT__A__REAL__NAME 1-Jan-2010 IVP YHTALEOJ 1-Jan-2010 LEDERMAN MANAGER 15-Dec-1986 LEDERMAN ERSKINE AT A1 15-Dec-1986 AT SYS31 .BLANK.JUSTIFY.FILL