Z-ADD06

This document covers the following topics:


Description

Add an appointment or the basic information (date, time, subject, location or agenda) of a meeting.

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 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.

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

  1. Z-ADDATT to add attendees and resources to the address list of the meeting (they cannot be added with Z-ADD06).

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

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

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

Parameters

Parameter Format In Out Remarks
Return-code N2 O X Input -1: no ET.
Cabinet A8 R   The cabinet in which the appointment or meeting is to be added.
Password A8 R   The password of the above cabinet.
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 R   3=appointment, 16=meeting.
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 added 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 is to be 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 appoinment or meeting does not occupy time in the calendar.
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-ADD06.
Calendar-ISN P10   X The ISN of the first record of the appointment or meeting.

Return Codes

00 Success
02 Invalid cabinet name
03 Password incorrect
13 Invalid object number
18 API context buffer not available
24 Security violation
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

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-191A
Z-194
Z-197A
Z-201
Z-207
Z-216
Z-209
Z-223
Z-711
Z-711A
Z-728
Z-731
Z-737
Z-740
Z-741
Z-742
Z-743
Z-120&0
Z-1200&0
Z-MOD06

Example

DEFINE DATA
LOCAL
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 OBJECT-NUMBER           (N2)
1 SEPARATE-DAILY-ENTRIES  (A1)
1 IGNORE-EXISTING-ENTRIES (A1)
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 NO-TIME-OCCUPANCY       (A1)
1 SEARCH-FREE-TIME        (A1)
1 CALENDAR-ISN            (P10)
*
END-DEFINE
*
MOVE 'Cabinet'  TO CABINET
MOVE 'Password' TO PASSWORD
MOVE '20011231' TO START-DATE
MOVE '1900'     TO START-TIME
MOVE '20020102' TO END-DATE
MOVE '2100'     TO END-TIME
MOVE 16         TO OBJECT-NUMBER
MOVE 'X'        TO SEPARATE-DAILY-ENTRIES
MOVE 'X'        TO IGNORE-EXISTING-ENTRIES
MOVE 'Subject-is-New-Year'     TO SUBJECT
MOVE 'Description-first-line ' TO DESCRIPTION(1)
MOVE 'Description-second-line' TO DESCRIPTION(2)
MOVE 'Location-of-meeting'     TO LOCATION
MOVE 'Doc-name1'               TO AGENDA
MOVE 'Keyword-number-one'      TO KEYWORDS(1)
MOVE '9'                       TO SECURITY-FLAGS(*)
MOVE 'X'                       TO SEARCH-FREE-TIME
*
CALLNAT 'Z-ADD06'
  RETURN-CODE
  CABINET
  PASSWORD
  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-TIME-OCCUPANCY
  SEARCH-FREE-TIME
  CALENDAR-ISN
*
WRITE
  '='  CABINET
  '='  PASSWORD
  '='  START-DATE
  '='  START-TIME
  '='  END-DATE
  '='  END-TIME
  '='  OBJECT-NUMBER
  '='  SEPARATE-DAILY-ENTRIES
  '='  IGNORE-EXISTING-ENTRIES
  '='  SUBJECT
  '='  DESCRIPTION(1)
  '='  DESCRIPTION(2)
  '='  LOCATION
  '='  AGENDA
  '='  KEYWORDS(1:2)
  '='  PRIVATE-FLAG
  '='  SECURITY-FLAGS(1:4)
  '='  NO-TIME-OCCUPANCY
  '='  SEARCH-FREE-TIME
  '='  CALENDAR-ISN
*
IF RETURN-CODE NE 0
  WRITE / 'Return code' RETURN-CODE
ELSE
  WRITE / 'Return status OK'
END-IF
*
END