Z-GET04X

This document covers the following topics:


Description

Return an object which is contained in a specific bulletin board.

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

This subprogram requires that you specify the ISN of the wanted object. To get the ISN, you must first invoke Z-DIS04X.

When you leave the parameter All-objects blank, an object other than a document is ignored. In this case, the document text, including cover notes and enclosed documents, is returned in the parameter Text-array.

When you mark the parameter All-objects, an object other than a document (for example, a reference document or application) is also returned. In this case, only the cover note of the object is returned in the parameter Text-array.

This subprogram should be invoked iteratively until the return code 77 indicates the end of text. The type of text which is currently being processed is returned by the parameter Text-type.

Parameters

Parameter Format In Out Remarks
Return-code N2   X  
ISN P10 R   The ISN of the object to be returned. Z-DIS04X returns the ISN for each object on a specific bulletin board.
All-objects A1 O   If blank, only documents are returned. If marked, all objects are returned.
Subject A60   X The subject of the object which has been sent to the bulletin board.
Document-format A1   X Any value other than 0 to 9 indicates that the object is not a document. See Document Formats.
Text-type A1   X C=cover note, T=document text, E=enclosed document.
Text-type-total P3   X The total number of cover notes and enclosures. 0 for type T.
Text-type-current P3   X The sequence number of the currently processed cover note or enclosure. 0 for type T.
Text-array A251/1:20   X The text of the document, cover note or enclosure.
Work-parameter-1 A240     For internal use. See The Work Parameter.
Work-parameter-2 A79     For internal use. See The Work Parameter.

Return Codes

00 Success
04 ISN was not found
09 ISN does not point to correct object
77 End of object (cover note, document, enclosures)
90 ISN does not point to bulletin board object

Subprograms

None

Example

0010 *
0020 * Example program to return an object which is contained in a specific
0030 * bulletin board.
0040 *
0050 DEFINE DATA
0060 LOCAL
0070 1 RETURN-CODE           (N2)
0080 1 ISN                   (P10)
0090 1 ALL-OBJECTS           (A1)
0100 1 SUBJECT               (A60)
0110 1 DOCUMENT-FORMAT       (A1)
0120 1 TEXT-TYPE             (A1)
0130 1 TEXT-TYPE-TOTAL       (P3)
0140 1 TEXT-TYPE-CURRENT     (P3)
0150 1 TEXT-ARRAY            (A251/1:20)
0160 1 WORK-PARAMETER-1      (A240)
0170 1 WORK-PARAMETER-2      (A79)
0180 1 #INDEX                (N2)
0190 *
0200 END-DEFINE
0210 *
0220 RESET RETURN-CODE
0230 MOVE 1234567890 TO ISN
0240 MOVE 'X'        TO ALL-OBJECTS
0250 *
0260 REPEAT UNTIL RETURN-CODE NE 0
0270 *
0280   CALLNAT 'Z-GET04X'
0290     RETURN-CODE
0300     ISN
0310     ALL-OBJECTS
0320     SUBJECT
0330     DOCUMENT-FORMAT
0340     TEXT-TYPE
0350     TEXT-TYPE-TOTAL
0360     TEXT-TYPE-CURRENT
0370     TEXT-ARRAY(*)
0380     WORK-PARAMETER-1
0390     WORK-PARAMETER-2
0400 *
0410   WRITE  NOTITLE (SG=OFF ZP=OFF AD=L)
0420     'Subject' SUBJECT /
0430     'Document format' DOCUMENT-FORMAT 2X
0440     'Text type' TEXT-TYPE 2X
0450     'Text-type-total' TEXT-TYPE-TOTAL 2X
0460     'Text-type-current' TEXT-TYPE-CURRENT /
0470 *
0480   FOR #INDEX 1 TO 20
0490     WRITE  NOTITLE (SG=OFF ZP=OFF AD=L) TEXT-ARRAY(#INDEX) (AL=79)
0500   END-FOR
0510 *
0520 END-REPEAT
0530 *
0540 WRITE  'Return code ' RETURN-CODE
0550 *
0560 END