Z-MOD06

This document covers the following topics:


Description

Modify an appointment or meeting.

If the originator modifies the basic information of a meeting (date, time, subject, location or agenda) after the invitations have been sent, a new version of the meeting is created and the old version is saved as the history of the meeting. As much as 9999 versions of a meeting can be kept. As long as the modified invitations are not sent with Z-MCONFM, the status of the meeting is "pending".

If other information of a meeting is changed either by the originator or by an attendee (e.g. keywords, security levels, private flag or time occupation), a new version is not created.

The date range between Start-date and End-date must be equal to or less than 90 days (otherwise the return code 43 is issued).

Start-time and End-time are interpreted as GMT (0).

If Start-time and End-time are not specified, the time range from 0:00 to 23:59 is automatically provided.

If the parameter No-time-occupancy is specified, the appointment or meeting does not occupy time in the calendar. This means that if another user wants to add a meeting and searches the calendar, this time range is not marked as reserved.

If the parameter No-time-occupancy is not specified (i.e. the appointment or meeting is to occupy time in the calendar) and another calendar entry already occupies the specified time range, return code 94 is issued. Old versions of a meeting (history) are not considered.

If the parameter Separate-daily-entries is specified, the appointment or meeting occupies only the specified time range for each day. If the parameter Separate-daily-entries is not specified, the whole time range starting with the Start-time of the first day and ending with the End-time of the last day is reserved.

To add attendees and resources to the address list of the meeting, you have to call Z-ADDATT.

To undo attendees and resources that have been defined with Z-ADDATT after the invitations have been sent, you have to call Z-UNDO.

When you modify a meeting, you must also call the following subprograms:

  1. Z-STIME to start the search for free time if you have marked the parameter Search-free-time.

  2. Z-MCONFM to confirm (i.e. send) the modified invitations.

Notes can later be added to the appointment or meeting using Z-NOTE.

Parameters which are not completed in the parameter list are deleted from the appointment or meeting. Thus, to retain the existing values, you must specify them once more before you invoke this subprogram.

Parameters

Parameter Format In Out Remarks
Return-code N2 O X Input -1: no ET.
Cabinet A8 R   The cabinet which contains the appointment or meeting that is to be modified.
Password A8 R   The password of the above cabinet.
Calendar-ISN P10 R X Input: ISN of the first record of the appointment or meeting to be modified. Output: ISN of the first record of the appointment or meeting that has been modified.
Start-date A8 R   The starting date of the appointment or meeting. Format yyyymmdd.
Start-time A4 O   The starting time of the appointment or meeting. Format hhmm.
End-date A8 O   The ending date of the appointment or meeting. Format yyyymmdd.
End-time A4 O   The ending time of the appointment or meeting. Format hhmm.
Object-number N2 O   3=appointment, 16=meeting. If not specified, the object type is not modified.
Separate-daily-entries A1 O   If specified, the appointment or meeting occupies only the specified time range for each day. If not specified, the whole time range starting with the Start-time of the first day and ending with the End-time of the last day is reserved.
Ignore-existing-entries A1 O   If specified, the appointment or meeting is modified although the time range is already occupied by another calendar entry.
Subject A20 R/O   The subject of the appointment or meeting. You must specify at least one of the following: Subject, Description or Location.
Description A60/1:3 R/O   A brief description for the appointment or meeting. You must specify at least one of the following: Description, Subject or Location.
Location A60 R/O   The location of the appointment or meeting. You must specify at least one of the following: Location, Subject or Description.
Agenda A32 O   The name of a document which has been linked to the appointment or meeting.
Keywords A15/1:6 O   Keywords are helpful later when you search for an object. You can specify up to 6 keywords. A keyword must not contain an asterisk (*).
Private-flag A1 O   Only allowed with a private cabinet. If marked, the appointment or meeting is a private object.
Security-flags A1/1:4 O   The security levels for Read, Modify, Copy and Print. Values 0 to 9. You can also assign the value X which provides absolute protection.
No-time-occupancy A1 O   If specified, the appointment or meeting does not occupy time in the calendar.
Accept-decline A1 O   Applies only to an invitation to the meeting in the attendee's cabinet. 1=accept meeting, 2=decline meeting and add it to your calendar. Use Z-ACCEPT or Z-CAN06 if you want to decline and stop the meeting; this function is not executed by Z-MOD06.
Search-free-time A1 O   If specified, a special flag is set in the meeting records. Use Z-STIME to search the calendars of all attendees for free time. This function is not executed by Z-MODD06.

Return Codes

00 Success
02 Invalid cabinet name or - in batch mode only - locked cabinet
03 Password incorrect
04 ISN was not found
09 ISN does not point to correct object
13 Invalid object number
18 API context buffer not available
24 Security violation (wrong level for mailing invitations)
41 Invalid start-date
42 Invalid start-time
43 Invalid end-date
44 Invalid end-time
51 Invalid name (subject, description or location missing)
53 Requested object (agenda) does not exist
54 At least one keyword is invalid
57 Document (agenda) contains no text
61 Invalid security code(s)
93 Security levels must not be greater than those of profile
94 The specified time range is already occupied
96 Date, time, subject, location or agenda can only be modified by originator
98 Meeting can only be accepted/declined by attendee, not by originator. Or invalid value in parameter Accept-decline.

Subprograms

N-IDATCM
N-NAMMOD
Z-0106A
Z-0106AN
Z-0106B
Z-0106C
Z-0420
Z-0420A
Z-100
Z-110
Z-120
Z-122
Z-123
Z-124
Z-135
Z-160
Z-165
Z-175
Z-180
Z-185
Z-190
Z-209
Z-216
Z-223
Z-711
Z-711A
Z-728
Z-731
Z-737
Z-740
Z-741
Z-742
Z-743
Z-751
Z-120&0

Example

* Modify meeting
* 
DEFINE DATA
LOCAL
*
* Parameters of Z-GET06B. 
* Some of them are used for Z-MOD06.
*
1 RETURN-CODE      (N2)
1 CABINET          (A8)
1 PASSWORD         (A8)
1 START-DATE       (A8)
1 START-TIME       (A4)
1 END-DATE         (A8)
1 END-TIME         (A4)
1 SUBJECT          (A20)
1 DESCRIPTION      (A60/1:3)
1 LOCATION         (A60)
1 AGENDA           (A32)
1 KEYWORDS         (A15/1:6)
1 PRIVATE-FLAG     (A1)
1 SECURITY-FLAGS   (A1/1:4)
1 OBJECT-NUMBER    (N2)
1 RANGE-TYPE       (A1)
1 NO-OCCUPATION    (A1)
1 CURRENT-DATE     (A8)
1 CURRENT-START    (A8)
1 CURRENT-END      (A8)
1 CALENDAR-ISN     (P10) 
1 ONLY-FIRST       (A1)
1 NOTES            (N2)
1 WORK-PARAMETER   (A40)
*
*
* Remaining parameters for Z-MOD06.
*
1 MOD06-RETURN-CODE       (N2)
1 SEPARATE-DAILY-ENTRIES  (A1)
1 IGNORE-EXISTING-ENTRIES (A1)
1 SEARCH-FREE-TIME        (A1)
1 ACCEPT-DECLINE          (A1)
*
END-DEFINE
*
*
RESET RETURN-CODE
MOVE 'Cabinet ' TO CABINET
MOVE 'Password' TO PASSWORD
MOVE '20001231' TO START-DATE
MOVE '2000'     TO START-TIME
MOVE 'X'        TO ONLY-FIRST
*
REPEAT UNTIL RETURN-CODE NE 0
*
* Get calendar information
*
  CALLNAT 'Z-GET06B'
    RETURN-CODE
    CABINET
    PASSWORD
    START-DATE
    START-TIME
    END-DATE
    END-TIME
    SUBJECT
    DESCRIPTION(*)
    LOCATION
    AGENDA
    KEYWORDS(*)
    PRIVATE-FLAG
    SECURITY-FLAGS(*)
    OBJECT-NUMBER
    RANGE-TYPE
    NO-OCCUPATION
    CURRENT-DATE
    CURRENT-START
    CURRENT-END
    CALENDAR-ISN
    ONLY-FIRST
    NOTES
    WORK-PARAMETER
*
* Write information of found meeting
*
  IF RETURN-CODE EQ 0
    IF SUBJECT EQ 'Urgent-Meeting'
        AND OBJECT-NUMBER EQ 16
      NEWPAGE
      WRITE
        '=' CABINET /
        '=' PASSWORD /
        '=' START-DATE
        '=' START-TIME /
        '=' END-DATE
        '=' END-TIME /
        '=' SUBJECT /
        '=' DESCRIPTION(1) /
        '=' LOCATION /
        '=' AGENDA /
        '=' KEYWORDS(1:3) /
        '=' KEYWORDS(4:6) /
        '=' PRIVATE-FLAG
        '=' SECURITY-FLAGS(1:4) /
        '=' OBJECT-NUMBER /
        '=' RANGE-TYPE /
        '=' NO-OCCUPATION /
        '=' CURRENT-DATE /
        '=' CURRENT-START /
        '=' CURRENT-END /
        '=' CALENDAR-ISN     /
        '=' ONLY-FIRST  /
        '=' NOTES  /
*
* Modify subject of meeting
*
      MOVE 'Very-Urgent-Meeting' TO SUBJECT
*
* Modify meeting. New subject will be Very-Urgent-Meeting
* Address list will consist of 2 attendees.
*
      IF RANGE-TYPE EQ '2'         /* separate daily entries
        MOVE 'X' TO SEPARATE-DAILY-ENTRIES
      ELSE
        RESET SEPARATE-DAILY-ENTRIES
      END-IF
*
      CALLNAT 'Z-MOD06'
        MOD06-RETURN-CODE
        CABINET
        PASSWORD
        CALENDAR-ISN
        START-DATE
        START-TIME
        END-DATE
        END-TIME
        OBJECT-NUMBER
        SEPARATE-DAILY-ENTRIES
        IGNORE-EXISTING-ENTRIES
        SUBJECT
        DESCRIPTION(*)
        LOCATION
        AGENDA
        KEYWORDS(*)
        PRIVATE-FLAG
        SECURITY-FLAGS(*)
        NO-OCCUPATION
        ACCEPT-DECLINE
        SEARCH-FREE-TIME
*
      IF MOD06-RETURN-CODE NE 0
        MOVE MOD06-RETURN-CODE TO RETURN-CODE
      ELSE
        ESCAPE BOTTOM
      END-IF
END-IF
  END-IF
END-REPEAT
IF RETURN-CODE = 0
  WRITE 'Meeting was modified'
ELSE
  WRITE 'Meeting NOT modified. Return code: ' RETURN-CODE
END-IF
END