Z-ADD03C

This document covers the following topics:


Description

Add an appointment.

This subprogram is similar to Z-ADD03B with the exception that it also returns the first ISN of the new appointment.

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-date and End-date are computed according to the given time zone.

If a time zone is not specified, Start-time and End-time are interpreted as GMT (0). If these values are to be put into a different time zone, the difference must be entered into the parameter Timezone.

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

Parameters

Parameter Format In Out Remarks
Return-code N2 O X Input -1: no ET.
Cabinet A8 R   The cabinet in which the appointment is to be added.
Password A8 R   The password of the above cabinet.
Start-date A8 R   The starting date of the appointment. Format yyyymmdd.
Start-time A8 O   The starting time of the appointment. Format hhmm.
End-date A8 O   The ending date of the appointment. Format yyyymmdd.
End-time A8 O   The ending time of the appointment. Format hhmm.
No-time-occupancy A1 O   If specified, the appointment does not occupy time in the calendar.
Separate-daily-entries A1 O   If specified, the appointment occupies only the specified time range for each day.
Subject A20 R/O   The subject of the appointment. You must specify at least one of the following: Subject, Description or Location.
Description A60/1:3 R/O   A brief description of the appointment. You must specify at least one of the following: Description, Subject or Location.
Location A60 R/O   The location of the appointment. You must specify at least one of the following: Location, Subject or Description.
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 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.
Timezone N2 O   Default: 0 (GMT). Values -12 to +11.
Object-ISN P10   X The first ISN of the new appointment.

Return Codes

00 Success
02 Invalid cabinet name or - in batch mode only - locked cabinet
03 Password incorrect
41 Invalid start-date
42 Invalid start-time
43 Invalid end-date
44 Invalid end-time
47 Invalid timezone
51 Invalid name (subject)
54 At least one keyword is invalid
61 Invalid security code(s)

Subprograms

N-IDATCM
Z-0106A
Z-0106C
Z-0106Z2
Z-120
Z-122
Z-123
Z-160
Z-175
Z-185
Z-1200&0

Example

0010 *
0020 * An example program to add an appointment
0030 *
0040 DEFINE DATA
0050 LOCAL
0060 1 RETURN-CODE               (N2)
0070 1 CABINET                   (A8)
0080 1 PASSWORD                  (A8)
0090 1 START-DATE                (A8)
0100 1 START-TIME                (A8)
0110 1 END-DATE                  (A8)
0120 1 END-TIME                  (A8)
0130 1 SEPARATE-DAILY-ENTRIES    (A1)
0140 1 NO-TIME-OCCUPANCY         (A1)
0150 1 SUBJECT                   (A20)
0160 1 DESCRIPTION               (A60/1:3)
0170 1 LOCATION                  (A60)
0180 1 KEYWORDS                  (A15/1:6)
0190 1 PRIVATE-FLAG              (A1)
0200 1 SECURITY-FLAGS            (A1/1:4)
0210 1 TIMEZONE                  (N2)
0220 1 OBJECT-ISN                (P10)
0230 *
0240 END-DEFINE
0250 *
0260 RESET RETURN-CODE
0270 MOVE 'CABINET '             TO CABINET
0280 MOVE 'PASSWORD'             TO PASSWORD
0290 MOVE '19971231'             TO START-DATE
0300 MOVE '2100'                 TO START-TIME
0310 MOVE '19980101'             TO END-DATE
0320 MOVE '0600'                 TO END-TIME
0330 MOVE 'X'                    TO SEPARATE-DAILY-ENTRIES
0340 MOVE 'NEW YEAR CELEBRATION' TO SUBJECT
0350 MOVE 'DESCRIPTION 1'        TO DESCRIPTION(1)
0360 MOVE 'DESCRIPTION 2'        TO DESCRIPTION(2)
0370 MOVE 'LOCATION'             TO LOCATION
0380 MOVE 'KEYWORD1'             TO KEYWORDS(1)
0390 MOVE 'KEYWORD2'             TO KEYWORDS(2)
0400 MOVE 'X'                    TO PRIVATE-FLAG
0410 MOVE '3'                    TO SECURITY-FLAGS(1)     /* Read
0420 MOVE '7'                    TO SECURITY-FLAGS(1)     /* Modify
0430 MOVE  2                     TO TIMEZONE
0440 *
0450 CALLNAT 'Z-ADD03C' RETURN-CODE
0460   CABINET
0470   PASSWORD
0480   START-DATE
0490   START-TIME
0500   END-DATE
0510   END-TIME
0520   NO-TIME-OCCUPANCY
0530   SEPARATE-DAILY-ENTRIES
0540   SUBJECT
0550   DESCRIPTION(*)
0560   LOCATION
0570   KEYWORDS(*)
0580   PRIVATE-FLAG
0590   SECURITY-FLAGS(*)
0600   TIMEZONE
0610   OBJECT-ISN
0620 *
0630 IF RETURN-CODE EQ 0
0640   WRITE 'Appointment was added'
0650   WRITE 'ISN of created appointment record' OBJECT-ISN
0660 END-IF
0670 *
0680 WRITE 'Return code' RETURN-CODE
0690 *
0700 END