Z-TRAINT

This document covers the following topics:


Description

Translate a Cnf document.

The document format of the resulting document is Int (intermediate). Error messages produced by Con-form are suppressed.

You cannot translate a Cnf document which is currently stored in the Inbasket or Outbasket. A document in the Wastebasket, folder Work or any user-defined folder can be translated.

When the document to be translated is stored in the Wastebasket, you must specify the parameter Cnf-ISN (specifying the parameter Cnf-document-name results in the return code 53).

Note:
In previous versions of Con-nect the default value for the left margin was set to 5. As of Con-nect version 3.3.2, the value for the left margin is taken from the user profile.

Parameters

Parameter Format In Out Remarks
Return-code N2 O X Input -1: no ET.
Cabinet A8 R   The cabinet in which the Cnf document is stored.
Password A8 R   The password of the above cabinet.
Cnf-document-name A32 R*   The name of the Cnf document to be translated. Either Cnf-document-name or Cnf-ISN, not both. Must not be specified when the document to be translated is stored in the Wastebasket.
Cnf-ISN P8 R*   The ISN of the Cnf document to be translated. Either Cnf-ISN or Cnf-document-name, not both.
New-document-name A32 R   The name for the Int document.
New-folder A15 O   The folder in which the Int document is to be stored. You must not specify a system folder (except Work) or TRS folder. Default: Work.
New-file A15 O   The name of a file within the above folder in which the Int document is to be stored.
Formatting-profile A32 O   The name of a formatting profile. If blank, a formatting profile is not used.
System-variables A1 O   If marked, the system variables are replaced with the appropriate values.
Keywords A15/1:6 O   Keywords are helpful when you search for an object. You can specify up to 6 keywords for the Int document. A keyword must not contain an asterisk (*).
New-ISN P8   X The ISN of the Int document.

Return Codes

00 Success
02 Invalid cabinet name
03 Password incorrect
04 ISN was not found
07 DCA feature not implemented
08 Supply either ISN or name, not both
09 ISN does not point to correct object
10 Function not valid for a system folder (to file new documents into)
51 Invalid name
52 Document with specified name already exists
53 Requested object does not exist
54 At least one keyword was invalid
55 Requested folder/file does not exist
56 Requested folder is a TRS folder
65 This is not a Con-form document
81 Invalid formatting profile name
82 Requested formatting profile does not exist
87 System address record for system variables not found
91 Supply Cnf-document-name or Cnf-ISN
92 No cabinet profile found for specified cabinet
93 Translate function is not available in Inbasket or Outbasket

Subprograms

Z-105
Z-120
Z-122
Z-123
Z-125
Z-150
Z-175
Z-190
Z-1200&0

Example

0010 DEFINE DATA
0020 LOCAL
0030 1 RETURN-CODE        (N2)
0040 1 CABINET            (A8)
0050 1 PASSWORD           (A8)
0060 1 CNF-DOCUMENT-NAME  (A32)
0070 1 CNF-ISN            (P8)
0080 1 NEW-DOCUMENT-NAME  (A32)
0090 1 NEW-FOLDER         (A15)
0100 1 NEW-FILE           (A15)
0110 1 FORMATTING-PROFILE (A32)
0120 1 SYSTEM-VARIABLES   (A1)
0130 1 KEYWORDS           (A15/1:6)
0140 1 NEW-ISN            (P8)
0150 END-DEFINE
0160 *
0170 RESET RETURN-CODE
0180 MOVE 'CABINET'   TO CABINET
0190 MOVE 'PASSWORD'  TO PASSWORD
0200 MOVE 'DOCNAME'   TO CNF-DOCUMENT-NAME
0210 MOVE 'FOLDER'    TO NEW-FOLDER
0220 MOVE 'FILE'      TO NEW-FILE
0230 MOVE 'NEW-NAME'  TO NEW-DOCUMENT-NAME
0240 MOVE 'KEYWORD1'  TO KEYWORDS (1)
0250 MOVE 'FRPROFILE' TO FORMATTING-PROFILE
0260 MOVE 'X'         TO SYSTEM-VARIABLES
0270 *
0280 CALLNAT 'Z-TRAINT'
0290     RETURN-CODE
0300     CABINET
0310     PASSWORD
0320     CNF-DOCUMENT-NAME
0330     CNF-ISN
0340     NEW-DOCUMENT-NAME
0350     NEW-FOLDER
0360     NEW-FILE
0370     FORMATTING-PROFILE
0380     SYSTEM-VARIABLES
0390     KEYWORDS(*)
0400     NEW-ISN
0410 *
0420 IF RETURN-CODE = 0
0430   WRITE 'Document was translated'
0440 ELSE
0450   WRITE 'Return code' RETURN-CODE
0460 END-IF
0470 *
0480 END