Z-GETAG

This document covers the following topics:


Description

Return the text of an agenda that has been attached to an appointment, meeting or invitation. This also includes modified meetings and cancelation messages.

This subprogram returns agendas in the formats Txt, Cnf, Bin, RFT, FFT and Vce.

To return an agenda which was added via Entire Connection (import), you can mark the parameter Convert to convert it to the old Entire Connection transmission format.

The parameters Last-line-filled and Last-line-text are returned only for the document formats Txt and Cnf.

This subprogram should be invoked iteratively until the return code is 77. Return code 77 indicates that the agenda has been read.

Parameters

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.
Calendar-ISN P10 R   The ISN of the first record of the appointment, meeting or invitation for which the agenda is to be returned.
Agenda-name A32   X The name of the document that is used as an agenda.
Document-format A1   X 0=Txt, 1=Cnf, 2=Bin, 4=RTF, 7=FFT, 9=Vce.
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. Only returned for Txt and Cnf documents.
Last-line-text N2   X The number of the last text line, not considering blank lines at the end of the text. Only returned for Txt and Cnf documents.
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 A25     For internal use. See The Work Parameter.

Return Codes

00 Success
02 Invalid cabinet name or - in batch mode only - locked cabinet
03 Password incorrect
04 ISN was not found
09 ISN does not point to correct object (meeting, appointment or invitation)
77 End of object

Subprograms

Z-120
Z-122
Z-123
Z-165
Z-175
Z-177
Z-194
Z-197
Z-222
Z-223
Z-400
Z-401
Z-1200&0

Example

* Return an agenda of a meeting
*
DEFINE DATA
LOCAL
1  RETURN-CODE      (N2)
1  CABINET          (A8)
1  PASSWORD         (A8)
1  CALENDAR-ISN     (P10)
1  AGENDA-NAME      (A32)
1  DOCUMENT-FORMAT  (A1)
1  TEXT-ARRAY       (A251/1:20)
1  LAST-LINE-FILLED (N2)
1  LAST-LINE-TEXT   (N2)
1  CONVERT          (A1)
1  WORK-PARAMETER   (A25)
*
END-DEFINE
*
RESET WORK-PARAMETER
MOVE 'Cabinet ' TO CABINET
MOVE 'Password' TO PASSWORD
MOVE 102760     TO CALENDAR-ISN
*
REPEAT UNTIL RETURN-CODE NE 0
  CALLNAT 'Z-GETAG'
    RETURN-CODE
    CABINET
    PASSWORD
    CALENDAR-ISN
    AGENDA-NAME
    DOCUMENT-FORMAT
    TEXT-ARRAY(*)
    LAST-LINE-FILLED
    LAST-LINE-TEXT
    CONVERT
    WORK-PARAMETER
*
  IF RETURN-CODE EQ 0 OR EQ 77
NEWPAGE
    WRITE  '=' AGENDA-NAME  /  '='   CALENDAR-ISN  /
*
    WRITE
      '='   DOCUMENT-FORMAT
      '='   CONVERT  /
      '='   LAST-LINE-FILLED
      '='   LAST-LINE-TEXT
*
    IF LAST-LINE-FILLED GT 0
      IF NOT ( DOCUMENT-FORMAT EQ ' '
          OR   DOCUMENT-FORMAT EQ '0'
          OR   DOCUMENT-FORMAT EQ '1' )
*       Text in Bin (no Entire Connection format)
*       or Bin, RFT, FFT, Vce (Entire Connection format)
*       is displayed in hexadecimal format
*
        WRITE
          / 'BIN-ARR(1)              '     TEXT-ARRAY(1)
          (AL=30 EM=HHHHHHHHHHHHHHHHHHHHHHHHH)
          / 'BIN-ARR(2)              '     TEXT-ARRAY(2)
          (AL=30 EM=HHHHHHHHHHHHHHHHHHHHHHHHH)
          / 'BIN-ARR(LAST-LINE-FILLED) '
          TEXT-ARRAY(LAST-LINE-FILLED)
          (AL=30 EM=HHHHHHHHHHHHHHHHHHHHHHHHH)
      ELSE
        WRITE
          / 'TEXT-ARR(1)        '   TEXT-ARRAY(1)(AL=30)
          / 'TEXT-ARR(2)        '   TEXT-ARRAY(2)(AL=30)
          / 'TEXT-ARR(LAST-LINE-FILLED)  '
          TEXT-ARRAY(LAST-LINE-FILLED)(AL=30)
      END-IF
    END-IF
  END-IF
END-REPEAT
WRITE  'Return code: ' RETURN-CODE
END