This document covers the following topics:
Mark a cabinet for deletion and lock access to this cabinet.
This subprogram can be used only by a supervisor or cabinet administrator.
After a cabinet has been marked for deletion, it is not deleted until the Con-nect utility B04050 is run. See the Con-nect Utilities documentation, section Delete Pending Cabinets.
The cabinet which has been marked for deletion is not deleted by the utility before the date specified in the parameter Delete-date has been reached.
You can also use this subprogram to cancel the deletion and lock marks. To do so, you must mark the parameter Reset-flag for the specified cabinet. The return code 92 indicates that the deletion and lock marks have been canceled.
Successful termination of Z-ERA05A always results in an END TRANSACTION. You are not able to control transaction handling.
Parameter | Format | In | Out | Remarks |
---|---|---|---|---|
Return-code | N2 | X | ||
Cabinet | A8 | R | The cabinet ID of a supervisor or cabinet administrator. | |
Password | A8 | R | The password of the above cabinet. | |
Cabinet-delete | A8 | R | The name of the cabinet to be locked and deleted. | |
Delete-date | A8 | O | Format yyyymmdd. The date specified is interpreted as GMT date
with GMT time as 0. If a date is not specified, the current date is assumed.
If the current date is specified (or assumed), the cabinet is locked immediately. If a date is specified which occurs after the current date, the cabinet will be locked when the specified date has been reached. |
|
Reset-flag | A1 | O | If marked, the cabinet deletion and lock marks are canceled. |
00 | Success |
02 | Invalid cabinet name or - in batch mode only - locked cabinet |
03 | Password incorrect |
15 | Invalid administrator status |
90 | Cabinet record does not exist |
91 | Cabinet is already marked for deletion |
92 | Deletion and lock marks of cabinet are canceled (not an error) |
93 | Invalid date format |
94 | Passed date |
95 | Deletion and lock marks cannot be canceled, because the cabinet was not marked for deletion |
96 | Cabinet-delete is already marked for rename |
Z-120
Z-122
Z-123
Z-1200&0
0010 * 0020 * Example program to lock and erase a cabinet 0030 * 0040 * 0050 DEFINE DATA 0060 LOCAL 0070 1 RETURN-CODE (N2) 0080 1 CABINET (A8) 0090 1 PASSWORD (A8) 0100 1 CABINET-DELETE (A8) 0110 1 DELETE-DATE (A8) 0120 1 RESET-FLAG (A1) 0130 * 0140 END-DEFINE 0150 * 0160 RESET RETURN-CODE 0170 MOVE 'ADMIN' TO CABINET 0180 MOVE 'ADMIN' TO PASSWORD 0190 MOVE 'FBL' TO CABINET-DELETE 0200 MOVE '20101231' TO DELETE-DATE 0210 * 0220 * 0230 CALLNAT 'Z-ERA05A' 0240 RETURN-CODE 0250 CABINET 0260 PASSWORD 0270 CABINET-DELETE 0280 DELETE-DATE 0290 RESET-FLAG 0300 * 0310 IF RETURN-CODE EQ 0 0320 WRITE 'Cabinet was locked and marked for deletion' 0330 ELSE 0340 WRITE 'Return code :' RETURN-CODE 0350 END-IF 0360 * 0370 END