This document covers the following topics:
Return a document, including cover notes, attached notes and enclosed documents, in a text array.
This subprogram is similar to Z-GET11C with the exception that it also returns attached notes and documents in the formats Bin, RFT, FFT and Vce (in addition to Txt and Cnf).
To return documents in the formats Bin, RFT, FFT and Vce, which were added via Entire Connection (import), you can mark the parameter Convert to convert them to the old Entire Connection transmission format.
The parameter Last-line-text is evaluated only for the document formats Txt and Cnf. For all other document formats, the values for Last-line-filled and Last-line-text are identical.
This subprogram should be invoked iteratively until the return code is 77. Return code 77 indicates that the document including all cover notes, attached notes and enclosures has been read.
Notes:
Parameter | Format | In | Out | Remarks |
---|---|---|---|---|
Return-code | N2 | O | X | Input -1: no ET. |
Cabinet | A8 | R | The cabinet which contains the desired document. | |
Password | A8 | R | The password of the above cabinet. | |
Document-name | A32 | R* | X | Input: the name of the document that you want returned. Either
Document-name or Document-ISN, not both.
Output: the name of the document or the description, if no name is assigned. |
Document-ISN | P10 | R* | X | Input: the ISN of the document that you want returned. Either
Document-ISN or Document-name, not both.
Output: the ISN of the document. |
Description | A60/1:4 | X | The description of the document. | |
Document-format | A1 | X | 0=Txt, 1=Cnf, 2=Bin, 4=RTF, 7=FFT, 9=Vce. | |
Text-type | A1 | X | The type of text which is currently being processed: C=cover note, T=document text, E=enclosed document, N=attached note. | |
Text-type-total | P3 | X | The total number of cover notes, enclosures or attached notes. The total number of cover notes, enclosures and attached notes are returned separately. For the document itself, 0 is returned. | |
Text-type-current | P3 | X | The sequence number of the cover note, enclosure or attached note currently being processed. The total number of cover notes, enclosures and attached notes are returned separately. For the document itself, 0 is returned. | |
Text-array | A251/1:20 | X | Text (Txt or Cnf) or binary data (Bin, RFT, FFT or Vce). The first character returned in every element of the Text-array indicates the number of lines to repeat. | |
Last-line-filled | N2 | X | The number of all lines of the current record, including all blank lines at the end of the text. | |
Last-line-text | N2 | X | Txt and Cnf: the number of the last text line, not considering blank lines at the end of the text. All other document formats: identical with Last-line-filled. | |
Note-subject | A32 | X | The subject of the note. | |
Attachment-ISN | P10 | X | The ISN of the cover note, enclosure or attached note. This ISN can be used with Z-DETACH. | |
Convert | A1 | O | Applies to Bin, RFT, FFT and Vce documents. If marked, binary data (B90) is converted to the old Entire Connection transmission format (A120). | |
Work-parameter-1 | A240 | For internal use. See The Work Parameter. | ||
Work-parameter-2 | A81 | For internal use. See The Work Parameter. |
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 |
77 | End of object |
Z-120
Z-122
Z-123
Z-165
Z-175
Z-194
Z-197
Z-222
Z-223
Z-400
Z-401
Z-1200&0
0010 * 0020 * Return a document with cover notes, attached notes, enclosed documents 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 DOCUMENT-ISN (P10) 0110 1 DESCRIPTION (A60/1:4) 0120 1 DOCUMENT-FORMAT (A1) 0130 1 TEXT-TYPE (A1) 0140 1 TEXT-TYPE-TOTAL (P3) 0150 1 TEXT-TYPE-CURRENT(P3) 0160 1 TEXT-ARRAY (A251/1:20) 0170 1 LAST-LINE-FILLED (N2) 0180 1 LAST-LINE-TEXT (N2) 0190 1 NOTE-SUBJECT (A32) 0200 1 ATTACHMENT-ISN (P10) 0210 1 CONVERT (A1) 0220 1 WORK-PARAMETER-1 (A240) 0230 1 WORK-PARAMETER-2 (A81) 0240 * 0250 END-DEFINE 0260 * 0270 RESET WORK-PARAMETER-1 WORK-PARAMETER-2 0280 MOVE 'CABINET ' TO CABINET 0290 MOVE 'PASSWORD' TO PASSWORD 0300 MOVE 'DOCUMENT-NAME' TO DOCUMENT-NAME 0310 * 0320 REPEAT UNTIL RETURN-CODE NE 0 0330 CALLNAT 'Z-GET11D' RETURN-CODE 0340 CABINET 0350 PASSWORD 0360 DOCUMENT-NAME 0370 DOCUMENT-ISN 0380 DESCRIPTION(*) 0390 DOCUMENT-FORMAT 0400 TEXT-TYPE 0410 TEXT-TYPE-TOTAL 0420 TEXT-TYPE-CURRENT 0430 TEXT-ARRAY(*) 0440 LAST-LINE-FILLED 0450 LAST-LINE-TEXT 0460 NOTE-SUBJECT 0470 ATTACHMENT-ISN 0480 CONVERT 0490 WORK-PARAMETER-1 0500 WORK-PARAMETER-2 0510 * 0520 IF RETURN-CODE EQ 0 OR EQ 77 0530 NEWPAGE 0540 WRITE '=' DOCUMENT-NAME / '=' DOCUMENT-ISN / 0550 * 0560 WRITE 0570 'DESCRIPTION(1)' DESCRIPTION (1) / 0580 'DESCRIPTION(2)' DESCRIPTION (2) / 0590 WRITE 0600 '=' DOCUMENT-FORMAT 0610 '=' TEXT-TYPE 0620 '=' TEXT-TYPE-TOTAL 0630 '=' TEXT-TYPE-CURRENT / 0640 '=' NOTE-SUBJECT 0650 '=' ATTACHMENT-ISN 0660 '=' CONVERT / 0670 '=' LAST-LINE-FILLED 0680 '=' LAST-LINE-TEXT 0690 * 0700 IF LAST-LINE-FILLED GT 0 0710 IF NOT ( DOCUMENT-FORMAT EQ ' ' 0720 OR DOCUMENT-FORMAT EQ '0' 0730 OR DOCUMENT-FORMAT EQ '1' ) 0740 * Texts in Bin (not Entire Connection format) 0750 * or Bin,RFT,FFT,Vce (Entire Connection format) 0760 * are displayed in hexadecimal format 0770 * 0780 WRITE 0790 / 'BIN-ARRAY(1) ' TEXT-ARRAY(1) 0800 (AL=30 EM=HHHHHHHHHHHHHHHHHHHHHHHHH) 0810 / 'BIN-ARRAY(2) ' TEXT-ARRAY(2) 0820 (AL=30 EM=HHHHHHHHHHHHHHHHHHHHHHHHH) 0830 / 'BIN-ARRAY(LAST-LINE-FILLED) ' 0840 TEXT-ARRAY(LAST-LINE-FILLED) 0850 (AL=30 EM=HHHHHHHHHHHHHHHHHHHHHHHHH) 0860 ELSE 0870 WRITE 0880 / 'TEXT-ARRAY(1) ' TEXT-ARRAY(1)(AL=30) 0890 / 'TEXT-ARRAY(2) ' TEXT-ARRAY(2)(AL=30) 0900 / 'TEXT-ARRAY(LAST-LINE-FILLED) ' 0910 TEXT-ARRAY(LAST-LINE-FILLED)(AL=30) 0920 END-IF 0930 END-IF 0940 END-IF 0950 END-REPEAT 0960 WRITE 'Return code ' RETURN-CODE 0970 END