This document covers the following topics:
Display a list of notepad pages.
You can either retrieve all notepad pages or only those with specific keywords.
You can specify one of the following in the parameter Note-keywords (you must not specify both at the same time):
To retrieve the notepad pages with specific keywords: specify the keywords separated by blanks.
To retrieve the notepad pages with keywords that start with the same letters: specify the letters followed by an asterisk (*).
Parameter | Format | In | Out | Remarks |
---|---|---|---|---|
Return-code | N2 | O | X | |
Cabinet | A8 | R | The name of the cabinet in which you want to display the list of notepad pages. | |
Password | A8 | R | The password of the above cabinet. | |
Start-note-subject | A32 | O* | Either Start-note-subject or Note-keywords, not both. | |
Note-keywords | A32 | O* | A list of keywords where the keywords are separated by spaces. Or the first letters of a keyword followed by an asterisk (*). Either Note-keywords or Start-note-subject, not both. | |
Number | N2 | O | The maximum number of notepad pages that are returned with each call. When you do not specify a value, or when you specify a value greater than 20, the default value 20 is used. | |
Note-table (20) | ||||
Subject | A32 | X | The subject of the note. There may be several notes with the same subject. | |
ISN | P10 | X | The ISN of the note. | |
Date-created | N8 | X | The date the note was created. | |
Time-created | N4 | X | The time the note was created. | |
Work-parameter | A42 | For internal use. See The Work Parameter. |
00 | Success |
02 | Invalid cabinet name |
03 | Password incorrect |
77 | End of list |
90 | Specify either Start-note-subject or Note-keywords, not both |
91 | Keyword cannot be interpreted - do not specify further keywords after the asterisk (*) |
Z-120
Z-122
Z-123
Z-175
Z-1200&0
0010 * 0020 * Example program to display a list of notepad pages 0030 * 0040 DEFINE DATA 0050 * 0060 LOCAL 0070 1 RETURN-CODE (N2) 0080 1 CABINET (A8) 0090 1 PASSWORD (A8) 0100 1 START-NOTE-SUBJECT(A32) 0110 1 NOTE-KEYWORDS (A32) 0120 1 NUMBER (N2) 0130 1 NOTE-TABLE (20) 0140 2 SUBJECT (A32) 0150 2 ISN (P10) 0160 2 DATE-CREATED (N8) 0170 2 TIME-CREATED (N4) 0180 1 WORK-PARAMETER (A42) 0190 1 INDEX (N3) 0200 * 0210 * 0220 END-DEFINE 0230 * 0240 AT TOP OF PAGE 0250 WRITE 0260 '-----------Subject------------- ----ISN---- ---Date-- -Time-' 0270 END-TOPPAGE 0280 * 0290 RESET RETURN-CODE 0300 MOVE 'CABINET ' TO CABINET 0310 MOVE 'PASSWORD' TO PASSWORD 0320 MOVE 'Meeting 9/24 ' TO START-NOTE-SUBJECT 0330 MOVE 20 TO NUMBER 0340 * 0350 REPEAT UNTIL RETURN-CODE NE 0 0360 CALLNAT 'Z-DIS20' 0370 RETURN-CODE 0380 CABINET 0390 PASSWORD 0400 START-NOTE-SUBJECT 0410 NOTE-KEYWORDS 0420 NUMBER 0430 NOTE-TABLE (*) 0440 WORK-PARAMETER 0450 IF RETURN-CODE EQ 00 OR EQ 77 0460 NEWPAGE 0470 FOR INDEX 1 TO 20 0480 IF SUBJECT(INDEX) NE ' ' 0490 OR ISN(INDEX) NE 0 0500 WRITE 0510 SUBJECT(INDEX) 0520 ISN (INDEX) 0530 DATE-CREATED(INDEX) 0540 TIME-CREATED(INDEX) 0550 END-IF 0560 END-FOR 0570 END-IF 0580 END-REPEAT 0590 * 0600 WRITE 'Return code ' RETURN-CODE 0610 END