Z-ADD11X

This document covers the following topics:


Description

Add a Con-nect document from the contents of the Natural source code edit area (ESIZE).

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

The edit area contents are not changed. The new document can contain up to four lines of description. The document is always filed in folder Work.

Note:
"*/" in the first two positions of a line in the Natural edit area generates a new page in the Con-nect document.

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 added.
Password A8 R   The password of the above cabinet.
Document-name A32 R   The name of the document to be added. Need not be specified if the first line of the Description is specified.
Description A60/1:4 O   A brief description for the document. If you do not specify a Document-name, you must specify a Description.
ISN P10   X The ISN of the new document.

Return Codes

00 Success
02 Invalid cabinet name or - in batch mode only - locked cabinet
03 Password incorrect
51 Invalid name
52 Document with specified name already exists
60 Edit area was empty

Subprograms

Z-120
Z-122
Z-123
Z-135
Z-145
Z-162
Z-175
Z-190
Z-1200&0

Example

0010 DEFINE DATA LOCAL
0020 01 RETURN-CODE   (N2)
0030 01 CABINET       (A8)
0040 01 PASSWORD      (A8)
0050 01 DOCUMENT-NAME (A32)
0060 01 DESCRIPTION   (A60/1:4)
0070 01 ISN           (P10)
0080 END-DEFINE
0090 *
0100 DEFINE PRINTER (4) OUTPUT 'SOURCE' /* Report 4 is now edit area
0110 *
0120 SET CONTROL 'Z'                    /* Erase edit area
0130 *
0140 MOVE 'USER-ID ' TO CABINET
0150 MOVE 'PW'       TO PASSWORD
0160 MOVE 'REPORT-1' TO DOCUMENT-NAME
0170 MOVE 'This is the first description line' TO DESCRIPTION (1)
0180 *
0190 WRITE (4) NOTITLE NOHDR ' This is the document text'
0200 *
0210 CALLNAT 'Z-ADD11X' RETURN-CODE CABINET PASSWORD
0220                    DOCUMENT-NAME DESCRIPTION(*) ISN
0230 *
0240 IF RETURN-CODE EQ 0
0250   WRITE 'Document was added'
0260 ELSE
0270   WRITE 'Return code' RETURN-CODE
0280 END-IF
0290 *
0300 END