Z-ADD11C

This document covers the following topics:


Description

Add a Con-nect document using data from a text array (A251/1:20).

You can add either a Txt or a Cnf document. The document is always filed in folder Work.

The parameter Text-array must be redefined as:

Byte Number Description
1 Number of line feeds (1 to 9)
2 to 251 Text

Blank text lines (i.e. line feeds) must be defined separately; for example, when you specify the value 9, this must not be followed by any text. Text lines must always be preceded by the value 1 (when you do not enter a value, 1 is automatically used). For example:

MOVE '1This line contains text'    TO TEXT-ARRAY (1)
MOVE '2'                           TO TEXT-ARRAY (2)   /* inserts 2 blank lines
MOVE '1This is another text line'  TO TEXT-ARRAY (3)

Blank lines after the document text can be suppressed by specifying the number of text lines that are to be stored in the Number parameter. If the Number parameter is not specified, 20 is assumed.

This subprogram can be called iteratively to add a document of any length. During successive calls you must take care that the Work-parameter is not disturbed by the calling routine.

The parameter Text-array is not reset after a call. Thus, when using this subprogram iteratively, you must reset the parameter Text-array before filling it again.

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.
Keywords A15/1:6 O   Keywords are helpful when you search for an object. You can specify up to 6 keywords. A keyword must not contain an asterisk (*).
Document-format A1 R   0=Txt or 1=Cnf.
Text-array A251/1:20 R   The text for the document.
Number N2 O   The number of lines that are stored with each call. When you do not specify a value, or when you specify a value greater than 20, the default value 20 is used.
ISN P8   X The ISN of the new document.
Work-parameter A21     For internal use. See The Work Parameter.

Return Codes

00 Success
02 Invalid cabinet name
03 Password incorrect
51 Invalid name
52 Document with specified name already exists
54 At least one keyword was invalid
58 No directory record has been created
79 Invalid document format

Subprograms

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