This document covers the following topics:
Add a folder or file.
You can also add a folder and file at the same time. In this case, the specifications for the parameters Description and Keywords apply to both the folder and file. However, it is recommended that you proceed in two steps. In the first step, you add a folder, and in the second step, you add a file (which is stored in the folder that you added in the first step). In this case, you can assign a separate description and separate keywords to the file.
In contrast to the description for a folder (A60/1:2), the description for a file has only one line and can be up to 40 characters long (A40).
The security levels of a file are always that of the folder in which it is stored (as specified in the parameter Security-flags).
The sequence of a file is always that of the folder in which it is stored (as specified in the parameter Folder-sequence).
Parameter | Format | In | Out | Remarks |
---|---|---|---|---|
Return-code | N2 | O | X | Input -1: no ET. |
Cabinet | A8 | R | The cabinet in which the folder or file is to be added. | |
Password | A8 | R | The password of the above cabinet. | |
Folder-name | A15 | R | Either the name of the folder to be added, or the name of the folder in which you want to store the file that you are currently adding. | |
File-name | A15 | O | The name of the file to be added within the above folder. | |
Description | A60/1:2 | O | A brief description for the folder or file. For a file the description has only one line and it can be up to 40 characters long (A40). | |
Keywords | A15/1:6 | O | Keywords are helpful when you search for an object. You can specify up to 6 keywords. A keyword must not contain an asterisk (*). | |
Security-flags | A2 | O | The security levels for Read and Modify. Values 0 to 9. | |
Folder-sequence | N1 | O | 1 (ascending by date), 2 (descending by date), or 3 (user-defined). Default: 1. | |
Folder-number | N5 | X | The internal number for the new folder. | |
File-number | N5 | X | The internal number for the new file. | |
ISN | P10 | X | The ISN of the new folder or file. When you add a folder and file at the same time, this is the ISN of the file. |
00 | Success |
02 | Invalid cabinet name or - in batch mode only - locked cabinet |
03 | Password incorrect |
10 | Function not valid for a system folder |
12 | System folder record does not exist, contact administrator |
54 | At least one keyword was invalid |
61 | Invalid security code(s) |
73 | Invalid folder/file name |
74 | Folder/file already exists |
75 | Too many folders/files in this cabinet (>65535) |
76 | Sequence number for folder invalid, set to 1 |
Z-120
Z-122
Z-123
Z-156
Z-175
Z-190
Z-1200&0
0010 DEFINE DATA 0020 * 0030 LOCAL 0040 * 0050 1 RETURN-CODE (N2) 0060 1 CABINET (A8) 0070 1 PASSWORD (A8) 0080 1 FOLDER-NAME (A15) 0090 1 FILE-NAME (A15) 0100 1 DESCRIPTION (A60/1:2) 0110 1 KEYWORDS (A15/1:6) 0120 1 SECURITY-FLAGS (A2) 0130 1 REDEFINE SECURITY-FLAGS 0140 2 SECURITY-READ (A1) 0150 2 SECURITY-MODIFY (A1) 0160 1 FOLDER-SEQUENCE (N1) 0170 1 FOLDER-NUMBER (N5) 0180 1 FILE-NUMBER (N5) 0190 1 ISN (P10) 0200 * 0210 END-DEFINE 0220 * 0230 INPUT (IP=OFF AD='_') 0240 'Cabinet ' CABINET 0250 / 'Password ' PASSWORD (AD=N) 0260 / 'Folder ' FOLDER-NAME 0270 / 'File ' FILE-NAME 0280 / 'Description ' DESCRIPTION (1) 0290 / ' ' DESCRIPTION (2) 0300 / 'Keywords ' KEYWORDS (1:3) 0310 / ' ' KEYWORDS (4:6) 0320 / 'Security Read' SECURITY-READ 'Modify' SECURITY-MODIFY 0330 / 'Sequence (1-3)' FOLDER-SEQUENCE (SG=OFF) 0340 IF FOLDER-NAME NE ' ' 0350 CALLNAT 'Z-ADD13A' 0360 RETURN-CODE 0370 CABINET 0380 PASSWORD 0390 FOLDER-NAME 0400 FILE-NAME 0410 DESCRIPTION (*) 0420 KEYWORDS (*) 0430 SECURITY-FLAGS 0440 FOLDER-SEQUENCE 0450 FOLDER-NUMBER 0460 FILE-NUMBER 0470 ISN 0480 IF RETURN-CODE EQ 0 0490 WRITE 'Folder/file has been created' 0500 ELSE 0510 WRITE 'Folder/file cannot be created:' RETURN-CODE 0520 END-IF 0530 END-IF 0540 * 0550 END