TAA Tools
CRTTSTJRN       CREATE TEST JOURNAL                    TAAJROB

The Create Test Journal  command is designed for writing  or setting up
test cases  involving journaling.  A journal  receiver (TSTRCV0001) and
journal  (TSTJRN) are created  in a named library.   You may optionally
start physical  file  journaling  and  access path  journaling  to  all
files in the library.  The companion command is DLTTSTJRN.

Creating   and   deleting   journal  environments   requires   specific
instructions  that must be run in the  correct sequence.  CRTTSTJRN and
DLTTSTJRN simplify this operation for you.

Assume you want  to write  a CL  program that will  test some  function
that involves journaling.   The following would be  a typical approach.

             DCL        &LIB *CHAR LEN(10) VALUE(xxxx)
              .
                        /* If the library does not exist, create it */
             CHKOBJ     OBJ(&LIB) OBJTYPE(*LIB)
             MONMSG     MSGID(CPF9801) EXEC(GOTO CRT)
                        /* If the library does exist, delete it */
             DLTTSTJRN  LIB(&LIB)
             DLTLIB     LIB(&LIB)
 CRT:        CRTLIB     LIB(&LIB)
                        /***************************************/
                        /*                                     */
                        /*     Your code to create files       */
                        /*      in the library                 */
                        /*                                     */
                        /***************************************/
                        /* Create journal and start journaling */
             CRTTSTJRN  LIB(&LIB) STRJRNPF(*YES)
                        /* Create receiver chain if needed */
             MTNJRN     JRN(&LIB/TSTJRN) GENNEWRCVR(*YES)
             MTNJRN     JRN(&LIB/TSTJRN) GENNEWRCVR(*YES)
                        /***************************************/
                        /*                                     */
                        /*     Your code for the test case     */
                        /*                                     */
                        /***************************************/
                        /* Delete the journal and library */
             DLTTSTJRN  LIB(&LIB)
             DLTLIB     LIB(&LIB)

DLTTSTJRN tolerance
-------------------

The  DLTTSTJRN command  only  operates on  a journal  named  TSTJRN and
journal receivers named TSTRCV*  in a specified library.   You must  be
authorized to delete the objects.

The command is tolerant of various situations:

  **   If access paths are  being journaled, they are ended  by the use
       of ENDJRNAP.

  **   If  physical files are  being journaled,  they are ended  by the
       use of ENDJRNPF.

  **   If  the  journal  does  not  exist,  the  ENDJRNxx  commands are
       bypassed.      The   journal   receivers   are    deleted   with
       DLTOPT(*IGNINQMSG).   This  prevents  the  inquiry message  from
       occurring  that  states  the  journal  receiver  has never  been
       saved.

CRTTSTJRN/DLTTSTJRN escape messages you can monitor for
-------------------------------------------------------

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

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

   LIB           The library  where the  journal receiver  and  journal
                 will be  created.  The journal  is named TSTJRN.   The
                 journal receiver is named TSTRCV0001.

   STRJRNPF      Whether   to  journal   the  physical  files   in  the
                 library.   *YES  is  the default  to  cause  all  data
                 files in the library to be journaled.

                 *NO may be specified to prevent journaling.

   IMAGES        The type  of images  to use  when journaling  physical
                 files.   *AFTER  is the  default  to journal  just the
                 after   record  images.    *BOTH  may  be  entered  to
                 journal both  before  and  after record  images.    If
                 JRNPF(*NO)  is specified,  this parameter  is ignored.

   STRJRNAP      Whether  to journal the access paths  for files in the
                 library.  *NO is the  default.  *YES may be  specified
                 to cause  all file access paths  in the library  to be
                 journaled.

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

   LIB           The  library where  the  journal receiver  and journal
                 will be deleted.   Any  journal named  TSTJRN will  be
                 deleted.   Any  journal receivers  named TSTRCV*  will
                 be deleted.

                 The  command is  tolerant of  several  conditions such
                 as  no files  are being  journaled, no  journal object
                 exists, multiple  receivers, etc.   At the  completion
                 of  the command, the  library should  be clear  of the
                 TSTJRN journal and any TSTRCV* receivers.

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

None.

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

The following TAA Tools must be on your system:

     CVTLIBDBF       Convert library data base files
     EDTVAR          Edit variable
     SNDCOMPMSG      Send completion message
     SNDSTSMSG       Send status message

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

None, the tool is ready to use.

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

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

   CRTTSTJRN     *CMD                   TAAJROB       QATTCMD
   DLTTSTJRN     *CMD                   TAAJROB2      QATTCMD
   TAAJROBC      *PGM       CLP         TAAJROBC      QATTCL
   TAAJROBC2     *PGM       CLP         TAAJROBC2     QATTCL

Structure
---------

CRTTSTJRN   Cmd
   TAAJROBC   CL pgm

DLTTSTJRN   Cmd
   TAAJROBC2  CL pgm
					

Added to TAA Productivity tools February 1, 2001


Home Page Up to Top