Z-ERA27

This document covers the following topics:


Description

Erase a reference document.

When the Deletion-flag is blank, the reference document is moved to the Wastebasket of the cabinet. When the Deletion-flag is marked, the reference 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 reference document is to be erased.
Password A8 R   The password of the above cabinet.
Ref-document-name A32 R*   The name of the reference document to be erased. Either Ref-document-name or ISN, not both. The parameter Ref-document-name is reset after a successful deletion.
ISN P8 R*   The ISN of the reference document to be erased. Either ISN or Ref-document-name, not both. The parameter ISN is reset after a successful deletion.
Deletion-flag A1 O   If blank, the reference document is moved to the Wastebasket. If marked, the reference 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-180
Z-190
Z-1200&0

Example

0010 DEFINE DATA LOCAL
0020 *
0030   1 RETURN-CODE       (N2)
0040   1 CABINET           (A8)
0050   1 PASSWORD          (A8)
0060   1 REF-DOCUMENT-NAME (A32)
0070   1 ISN               (P8)
0080   1 DELETION-FLAG     (A1)
0090 *
0100 END-DEFINE
0110 *
0120 MOVE  'CABINET'        TO CABINET
0130 MOVE  'PASSWORD'       TO PASSWORD
0140 MOVE  'REFERENCE-NAME' TO REF-DOCUMENT-NAME
0150 RESET DELETION-FLAG    /* Reference document is moved to Wastebasket
0160 *
0170 CALLNAT 'Z-ERA27'
0180   RETURN-CODE
0190   CABINET
0200   PASSWORD
0210   REF-DOCUMENT-NAME
0220   ISN
0230   DELETION-FLAG
0240 *
0250 IF RETURN-CODE  EQ  0
0260   WRITE 'Reference document was erased'
0270 ELSE
0280   WRITE 'Return code' RETURN-CODE
0290 END-IF
0300 *
0310 END