Z-NOTE

This document covers the following topics:


Description

Maintain notepad pages.

The following functions are available:

  • Add, modify, display or erase a notepad page.

  • Attach a notepad page to a document, appointment or meeting (supply parameters Object-number, Command as either A or M, and either parameter Document-name or Object-ISN).

To get the ISN of an appointment or meeting to which notes are attached, you can invoke Z-GET06B prior to this subprogram.

To display a list of notepad pages, you can invoke Z-DIS20 prior to this subprogram.

A note can contain up to 10 lines of text. The content of the edit area is not changed.

Parameters

Parameter Format In Out Remarks
Return-code N2 O X Input -1: no ET.
Cabinet A8 R   The cabinet in which the note is (to be) stored.
Password A8 R   The password of the above cabinet.
Command A1 R   Must be one of the following: A=add, M=modify, D=display, E=erase.
Note-subject A32 R*   The subject of the note. Either Note-subject or Note-ISN, not both.
Note-ISN P10 R* X The ISN of the note. Input: either Note-ISN or Note-subject, not both. If you specified A in the Command parameter, you must not specify an ISN. Output: the ISN is returned for commands A, M and D.
Object-number N2 O   The type of object to which the note is attached. Must be one of the following: 3=appointment, 11=document, 16=meeting.
Document-name A32 O*   Pertains only to attaching (Command A or M) a notepad page to a document (Object-number 11). Name of the document to which the note is (to be) attached. Either Document-name or Object-ISN, not both.
Object-ISN P10 O*   Pertains only to attaching (Command A or M) a notepad page. ISN of the document, appointment or meeting (Object-number 3,11 or 16) to which the note is (to be) attached. Either Object-ISN or Document-name, not both.
Note-text A37/1:10 R X Input of the note text for Command A or M. Output for Command D.

Return Codes

00 Success
02 Invalid cabinet name or - in batch mode only - locked cabinet
03 Password incorrect
04 ISN was not found
08 Supply either ISN or name, not both (here: Note-subject or Note-ISN)
09 ISN does not point to correct object
13 Invalid object number
51 Invalid name - Note-subject must not be blank
53 Requested object does not exist
59 Requested procedure not found
90 Subject of note must not consist of noisewords only
91 Note cannot be attached to a document when Command E or D
92 Notepad text lines must not be blank when Command A or M
93 Document, meeting or appointment was not found
94 ISN of document, meeting or appointment was not found
95 ISN does not point to a document, meeting or appointment
96 Supply either Document-name or Object-ISN, not both
97 Note-ISN is not allowed when Command A
98 25 notes have already been attached to document, meeting or appointment
99 Note subject is not unique in the cabinet

Subprograms

Z-120
Z-122
Z-135
Z-175
Z-190
Z-711

Example

0010 *
0020 *   Example program to add and attach a notepad page.
0030 *
0040 DEFINE DATA
0050 LOCAL
0060 1 RETURN-CODE      (N2)
0070 1 CABINET          (A8)
0080 1 PASSWORD         (A8)
0090 1 COMMAND          (A1)
0100 1 NOTE-SUBJECT     (A32)
0110 1 NOTE-ISN         (P10)
0120 1 NOTE-TEXT        (A37/1:10)
0130 1 OBJECT-NUMBER    (N2)
0140 1 DOCUMENT-NAME    (A32)
0150 1 OBJECT-ISN       (P10)
0160 *
0170 *
0180 END-DEFINE
0190 *
0200 RESET RETURN-CODE
0210 MOVE 'CABINET '    TO CABINET
0220 MOVE 'PASSWORD'    TO PASSWORD
0230 MOVE 'A'           TO COMMAND       /* A=add
0240 MOVE 'NOTE SUBJECT'TO NOTE-SUBJECT
0250 MOVE '11'          TO OBJECT-NUMBER /* 11=document
0260 MOVE 'DOCUMENT NAME'        TO DOCUMENT-NAME
0270 MOVE 'NOTE TEXT 1st STRING' TO NOTE-TEXT(1)
0280 MOVE 'NOTE TEXT 2nd STRING' TO NOTE-TEXT(2)
0290 *
0300 CALLNAT 'Z-NOTE'
0310   RETURN-CODE
0320   CABINET
0330   PASSWORD
0340   COMMAND
0350   NOTE-SUBJECT
0360   NOTE-ISN
0370   OBJECT-NUMBER
0380   DOCUMENT-NAME
0390   OBJECT-ISN
0400   NOTE-TEXT(*)
0410 *
0420 IF RETURN-CODE EQ 0
0430   WRITE 'Note entered and attached to document'
0440 ELSE
0450   WRITE 'Return code ' RETURN-CODE
0460 END-IF
0470 END