This document covers the following topics:
Erase a folder or file.
You can only erase an empty folder or file. You cannot erase a system folder such as the Wastebasket or the folder Work.
To erase a file, you must specify the file name and the name of the folder in which it is stored.
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 stored. | |
Password | A8 | R | The password of the above cabinet. | |
Folder-name | A15 | R | Either the name of the folder to be erased, or the name of the folder in which the file to be erased is stored. | |
File-name | A15 | O | The name of the file to be erased. |
00 | Success |
02 | Invalid cabinet name |
03 | Password incorrect |
10 | Function not valid for a system folder |
55 | Requested folder/file does not exist |
73 | Invalid folder/file name |
90 | Folder/file is not empty |
91 | Folder/file name is required |
92 | Folder name is required to erase a file |
Z-120
Z-122
Z-123
Z-1200&0
0010 DEFINE DATA LOCAL 0020 1 RETURN-CODE (N2) 0030 1 CABINET (A8) 0040 1 PASSWORD (A8) 0050 1 FOLDER-NAME (A15) 0060 1 FILE-NAME (A15) 0070 END-DEFINE 0080 * 0090 INPUT 'CABINET :' CABINET / 0100 'PASSWORD :' PASSWORD / 0110 'FOLDER-NAME :' FOLDER-NAME / 0120 'FILE-NAME :' FILE-NAME / 0130 'RETURN-CODE :' RETURN-CODE 0140 * 0150 CALLNAT 'Z-ERA13' RETURN-CODE 0160 CABINET 0170 PASSWORD 0180 FOLDER-NAME 0190 FILE-NAME 0200 * 0210 IF RETURN-CODE EQ 0 0220 WRITE 'Folder/file was erased' 0230 ELSE 0240 WRITE 'Folder/file could not be erased:' RETURN-CODE 0250 END-IF 0260 * 0270 END