TAA Tools
RTVJRNRCV       RETRIEVE JOURNAL RECEIVERS             TAAJRNZ

The Retrieve Journal  Receivers command returns  a list of  the journal
receivers  for a  specific journal.   This  is  known as  the 'receiver
chain'.   Each element in  the list contains the  receiver name and the
library name.  Other tools  such as RTVJRNRCVA may be used  to retrieve
the  attributes of  an  individual receiver.    A Journal  API is  used
internally.

A typical series of commands would be:

             DCL        &NBRRCV *DEC LEN(5 0)
             DCL        &RCVRLST *CHAR LEN(30000)
             DCL        &RX *DEC LEN(5 0)
             DCL        &JRNRCV *CHAR LEN(10)
             DCL        &JRNRCVL *CHAR LEN(10)
             DCL        &QLFRCV *CHAR LEN(20)
              .
             RTVJRNRCV  JRN(xxx)  NBRRCV(&NBRRCV) +
                          JRNRCVLST2(&RCVRLST)
             CHGVAR     &RX -19
 LOOP:       CHGVAR     &RX (&RX + 20)
             IF         (&RX *LT 30000) DO /* Within the list */
             CHGVAR     &QLFRCV %SST(&RCVRLST &RX 20)
             IF         (&QLFRCV *NE ' ') DO /* Some rcvr */
             CHGVAR     &JRNRCV %SST(&QLFRCV 1 10)
             CHGVAR     &JRNRCVL %SST(&QLFRCV 11 10)
                        /****************************************/
                        /*                                      */
                        /*         Your processing              */
                        /*                                      */
                        /****************************************/
             GOTO       LOOP
             ENDDO      /* Some rcvr */
             ENDDO      /* Within the list */

Each  entry in the  list is  20 bytes made  up of  the journal receiver
name and library.   A maximum of 1500 receivers  may be returned.   The
old  command  parameters  (JRNRCVLST   and  RCVNBRLST)  allowed  for  a
maximum of 490 receivers.

The  Journal API 'QjoRetrieveJournalInformation' is  used to access the
information.

RTVJRNRCV escape messages you can monitor for
---------------------------------------------

None.  Escape messages from based on functions will be re-sent.

Command parameters                                    *CMD
------------------

   JRN           The qualified  name of  the  journal to  retrieve  the
                 list  from.   The  library  value defaults  to  *LIBL.
                 *CURLIB may also be used.

   RTNLIB        An  optional return  value for  the library  where the
                 journal  exists.  This  value may be  helpful if *LIBL
                 or *CURLIB  is  used for  the  qualified name  of  the
                 journal.     If  specified,   the  variable   must  be
                 declared as *CHAR LEN(10).

   NBRRCV        An   optional  return  variable  for   the  number  of
                 receivers  in  the  receiver  chain.    If  used,  the
                 variable must be specified as *DEC LEN(5 0).

                 If  more   than  1500   receivers  exist,   the  value
                 returned   will  be   99999.     The   JRNRCVLST2  and
                 RCVNBRLST2 parameters  will  contain  information  for
                 the first 490 receivers.

   JRNRCVRLST    This is  the old parameter.   Use  JRNRCVLST2 instead.
                 JRNRCVRLST  is  an optional  return  variable for  the
                 list  of receivers.   A  maximum of  490 receivers may
                 be returned.  Each  returned receiver is described  in
                 20  bytes  made  up   of  the  journal  receiver  name
                 (positions  1-10)  and  the  journal receiver  library
                 name (positions 11-20).

                 If  less  than  490  receivers  exist,  the  remaining
                 space will  be blank.  If  used, the variable  must be
                 specified as *CHAR LEN(9800).

   RCVNBRLST     This  is the old  parameter.   Use RCVNBRLST2 instead.
                 RCVNBRLST is  an  optional  return  variable  for  the
                 corresponding  receiver   number  for   the  list   of
                 receivers  in   JRNRCVLST.    Each   number  is  *CHAR
                 LEN(5).       The   numbers    appear   with   WRKJRNA
                 OUTPUT(*PRINT).   A  maximum of  490 receiver  numbers
                 may be returned.

                 If  dual  receivers are  defined  for  a journal,  the
                 same number exists for two receivers.

                 If  less  than  490  receivers  exist,  the  remaining
                 space will be  blank.  If used,  the variable must  be
                 specified as *CHAR LEN(2450).

   JRNRCVLST2    This  is  the  new  parameter  which  should  be  used
                 instead  of  JRNRCVLST.    JRNRCVLST2  is an  optional
                 return  variable  for  the  list  of  receivers.     A
                 maximum  of 1500  receivers  may  be returned.    Each
                 returned  receiver is  described in  20 bytes  made up
                 of  the  journal  receiver name  (positions  1-10) and
                 the journal receiver  library name (positions  11-20).

                 If  less  than  1500  receivers exist,  the  remaining
                 space  will be blank.   If used, the  variable must be
                 specified as *CHAR LEN(30000).

   RCVNBRLST2    This  is  the  new  parameter  which  should  be  used
                 instead  of  RCVNBRLST.   RCVNBRLST2  is  an  optional
                 return   variable  for   the   corresponding  receiver
                 number  for  the  list  of  receivers  in  JRNRCVLST2.
                 Each  number is  *CHAR  LEN(5).   The  numbers  appear
                 with  WRKJRNA  OUTPUT(*PRINT).    A  maximum  of  1500
                 receiver numbers may be returned.

                 If  dual  receivers  are defined  for  a  journal, the
                 same number exists for two receivers.

                 If  less  than 1500  receivers  exist,  the  remaining
                 space will  be blank.   If used, the variable  must be
                 specified as *CHAR LEN(7500).

Restrictions
------------

A maximum of 1500 receivers may be returned.

Because  the command returns  variables, RTVJRNRCV may only  be used in
a CL program.

Prerequisites
-------------

The following TAA Tools must be on your system:

     CHKOBJ3         Check object 3

Implementation
--------------

None, the tool is ready to use.

Objects used by the tool
------------------------

   Object        Type    Attribute      Src member    Src file
   ------        ----    ---------      ----------    ----------

   RTVJRNRCV     *CMD                   TAAJRNZ       QATTCMD
   TAAJRNZC      *PGM       CLP         TAAJRNZC      QATTCL
   TAAJRNZR      *PGM       RPGLE       TAAJRNZR      QATTRPG
					

Added to TAA Productivity tools February 28, 2000


Home Page Up to Top