Z-DIS04X

This document covers the following topics:


Description

Display the contents of a specific bulletin board in chronological order.

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

This subprogram should be invoked iteratively until the return code 77 indicates the end of the list. The Number parameter can be modified between iterative calls.

Note:
This subprogram can be used in conjunction with Z-GET04X.

Parameters

Parameter Format In Out Remarks
Return-code N2 O X Input -1: no ET.
Bulletin-name A15 R   The name of the bulletin board for which you want to display the contents.
Start-date A8 O   Format yyyymmdd. When you enter an invalid format, it is set to 0.
Sequence N1 O   1 (ascending) or 2 (descending). Default: 1.
All-objects A1 O   If marked, all objects are returned. If blank, only documents are returned.
Number N2 O   The maximum number of objects that are returned 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.
Occurrence N2   X Number of objects returned with this call.
Bulletin-table (20)
  ISN P10   X The ISN of the object which has been sent to the bulletin board.
  Subject A60   X The subject of the object which has been sent to the bulletin board.
  Date-delivered N8   X Format yyyymmdd. The date when the object was delivered to the bulletin board.
  Sent-by-name A20   X The name of the user who sent the object 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.
Work-parameter A34     For internal use. See The Work Parameter.

Return Codes

00 Success
77 End of list
90 Bulletin board name required
91 Bulletin board does not exist

Subprograms

None

Example

0010 *
0020 * Example program to display the contents of a specific bulletin board
0030 * in chronological order.
0040 *
0050 DEFINE DATA
0060 LOCAL
0070 1 RETURN-CODE       (N2)
0080 1 BULLETIN-NAME     (A15)
0090 1 START-DATE        (A8)
0100 1 SEQUENCE          (N1)
0110 1 ALL-OBJECTS       (A1)
0120 1 NUMBER            (N2)
0130 1 OCCURRENCE        (N2)
0140 1 BULLETIN-TABLE    (20)
0150   2 ISN             (P10)
0160   2 SUBJECT         (A60)
0170   2 DATE-DELIVERED  (N8)
0180   2 SENT-BY-NAME    (A20)
0190   2 DOCUMENT-FORMAT (A1)
0200                     /* 0 Txt
0210                     /* 1 Cnf
0220                     /* 2 Bin
0230                     /* 3 Int
0240                     /* 4 RFT-DCA
0250                     /* 5 printer profile
0260                     /* 6 Src
0270                     /* 7 FFT-DCA
0280                     /* 8 Obj
0290                     /* 9 Vce
0300                     /* else: no document
0310 *
0320 1 WORK-PARAMETER    (A34)
0330 1 #INDEX            (N2)
0340 *
0350 END-DEFINE
0360 *
0370 RESET RETURN-CODE
0380 MOVE 'BULLETIN'   TO BULLETIN-NAME
0390 MOVE '20000101'   TO START-DATE
0400 MOVE 1            TO SEQUENCE
0410 MOVE 'X'          TO ALL-OBJECTS
0420 MOVE 20           TO NUMBER
0430 *
0440 REPEAT UNTIL RETURN-CODE NE 0
0450 *
0460   CALLNAT 'Z-DIS04X' RETURN-CODE
0470                      BULLETIN-NAME
0480                      START-DATE
0490                      SEQUENCE
0500                      ALL-OBJECTS
0510                      NUMBER
0520                      OCCURRENCE
0530                      BULLETIN-TABLE(*)
0540                      WORK-PARAMETER
0550 *
0560   FOR #INDEX 1 TO OCCURRENCE
0570       IF ISN(#INDEX) NE 0
0580           WRITE NOTITLE (SG=OFF ZP=OFF AD=L)
0590                 '=' #INDEX
0600                 / 'ISN            ' ISN(#INDEX)
0610                 / 'Subject        ' SUBJECT(#INDEX) (AL=15)
0620                 / 'Date sent      ' DATE-DELIVERED(#INDEX)
0630                 / 'Sent by name   ' SENT-BY-NAME(#INDEX)
0640                 / 'Document format' DOCUMENT-FORMAT(#INDEX) /
0650           NEWPAGE
0660       END-IF
0670   END-FOR
0680 END-REPEAT
0690 *
0700 WRITE  'Return code ' RETURN-CODE
0710 *
0720 END