TAA Tools
RTVDOCOBJ       RETRIEVE DOCUMENT OBJECT               TAADOCB

The  Retrieve   Document  Object  command   allows  the   retrieval  of
information about  a *DOC object when only the  system object name that
exists  in the  QDOC library  is known.   The  system object  names may
appear from a function such  as when using the DSPOBJD outfile.   These
names do  not relate to a  user recognizable name.   RTVDOCOBJ provides
a  translation from  the *DOC object  name to  the information provided
by QRYDOCLIB.

A typical series of commands would be:

             DCLF       QADSPOBJ /* DSPOBJD model file */
             DCL        &DATA *CHAR LEN(500)
              .
             DSPOBJD    OBJ(QDOC/*ALL) OBJTYPE(*DOC) +
                          OUTFILE(...)
              .
             RCVF
              .
             RTVDOCOBJ  DOC(&ODOBNM) DATA(&DATA)

The &DATA  value  will contain  the first  500  bytes of  the  document
description.

When RTVDOCOBJ  runs, the default  is to  create the TAAQRYDOC  file in
QTEMP if  it does not exist.  This is  a keyed version of the QRYDOCLIB
outfile (model file  is QAOSIQDL  with a format  name of  OSQDL).   The
RTVDOCOBJ command then  retrieves the information from the  keyed file.

If  subsequent RTVDOCOBJ  commands are  used,  the performance  is much
faster at the outfile does not have to be created.

RTVDOCOBJ escape messages you can monitor for
---------------------------------------------

      TAA9891    Unable to do RTVOBJD for the object
      TAA9892    Unable to find the document in the QRYDOCLIB outfile

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

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

   DOC           The  qualified name of the  document name as displayed
                 with  DSPOBJD.   The  library  qualifier  defaults  to
                 QDOC.

   DOCID         The document  ID as provided by  the QRYDOCLIB outfile
                 for  field   QDLDID.    This  is  an  optional  return
                 variable that  if  used  must be  specified  as  *CHAR
                 LEN(24).

   DOCNAM        The  document  name  as   provided  by  the  QRYDOCLIB
                 outfile  for  field  QDLDNM.    This  is  an  optional
                 return variable  that if  used  must be  specified  as
                 *CHAR LEN(12).

   OWNER         The owner of the  object.  This is an  optional return
                 variable  that  if used  must  be  specified as  *CHAR
                 LEN(10).

   SIZE          The  size of the  object.  This  is an optional return
                 variable  that if  used  must  be  specified  as  *DEC
                 LEN(15).

   FLR           The  folder where  the  object exists  as provided  by
                 the  QRYDOCLIB outfile for  field QDLFLR.   This is an
                 optional  return  variable  that   if  used  must   be
                 specified as *CHAR LEN(63).

   DATA          The  document  data  information as  provided  by  the
                 QRYDOCLIB  outfile  for  field  QDLDTA.    This is  an
                 optional  return  variable  that   if  used  must   be
                 specified as *CHAR LEN(500).

   CRTOUTFILE    Whether to create the QRYDOCLIB outfile.

                 *DFT  is the  default  meaning if  the  file does  not
                 exist,  it will  be created  in  QTEMP using  the name
                 TAAQRYDOC.   If  the file  already exists,  the create
                 step is bypassed.

                 *YES  may   be  specified   to  delete  any   existing
                 TAAQRYDOC  file  in  QTEMP   and  re-create  it  using
                 QRYDOCLIB.


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

Because  RTVDOCOBJ  returns variables,  it  may only  be used  in  a CL
program.

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

The following TAA Tools must be on your system:

     DUPTAADBF       Duplicate TAA data base file
     RSNLSTMSG       Resend last message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape 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
   ------        ----    ---------      ----------    ----------

   RTVDOCOBJ     *CMD                   TAADOCB       QATTCMD
   TAADOCBC      *PGM       CLP         TAADOCBC      QATTCL
   TAADOCBR      *PGM       RPG         TAADOCBR      QATTRPG
   TAADOCBP      *FILE      PF          TAADOCBP      QATTDDS
					

Added to TAA Productivity tools January 1, 2008


Home Page Up to Top