Z-ERA11X

This document covers the following topics:


Description

Erase a document.

This subprogram is the same as Z-ERA11 with the one exception that the parameter ISN uses the format P10.

When the Deletion-flag is blank, the document is moved to the Wastebasket of the cabinet. When the Deletion-flag is marked, the document is erased from Con-nect and cannot be recovered.

Parameters

Parameter Format In Out Remarks
Return-code N2 O X Input -1: no ET.
Cabinet A8 R   The cabinet in which the document is to be erased.
Password A8 R   The password of the above cabinet.
Document-name A32 R*   The name of the document to be erased. Either Document-name or ISN, not both. The parameter Document-name is reset after a successful deletion.
ISN P10 R*   The ISN of the document to be erased. Either ISN or Document-name, not both. The parameter ISN is reset after a successful deletion. You can invoke Z-DIS11X prior to Z-ERA11X to obtain the ISN for the desired document.
Deletion-flag A1 O   If blank, the document is moved to the Wastebasket. If marked, the document is erased from Con-nect.

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
09 ISN does not point to correct object
51 Invalid name
53 Requested object does not exist

Subprograms

Z-100
Z-110
Z-120
Z-122
Z-123
Z-147
Z-165
Z-175
Z-177
Z-180
Z-190
Z-194
Z-197
Z-222
Z-223
Z-400
Z-401
Z-1200&0

Example

0010 *
0020 * Example program to erase a document.
0030 *
0040 DEFINE DATA
0050 LOCAL
0060 1 RETURN-CODE         (N2)
0070 1 CABINET             (A8)
0080 1 PASSWORD            (A8)
0090 1 DOCUMENT-NAME       (A32)
0100 1 ISN                 (P10)
0110 1 DELETION-FLAG       (A1)
0120 END-DEFINE
0130 *
0140 RESET RETURN-CODE
0150 RESET DOCUMENT-NAME
0160 MOVE 'CABINET'  TO CABINET
0170 MOVE 'PASSWORD' TO PASSWORD
0180 MOVE 1234567890 TO ISN
0190 MOVE 'X'        TO DELETION-FLAG
0200 *
0210 CALLNAT 'Z-ERA11X'
0220   RETURN-CODE
0230   CABINET
0240   PASSWORD
0250   DOCUMENT-NAME
0260   ISN
0270   DELETION-FLAG
0280 *
0290 IF  RETURN-CODE EQ 0
0300   WRITE 'Document was erased'
0310 ELSE
0320   WRITE 'Return code' RETURN-CODE
0330 END-IF
0340 *
0350 END