TAA Tools
EXTQLFNAM       EXTRACT QUALIFIED NAME                 TAACLRU

The Extract  Qualified  Name command  extracts an  object and  optional
library  qualifier  from  a  string  such  as 'ABC/DEF'  where  ABC  is
considered  to be the library  and DEF the object.   Leading blanks and
apostrophes are  ignored.   Any  characters following  the  end of  the
object name (after the blank delimiter) are ignored.

The code scans for  a blank or /.  A /  is interpreted as the separator
of  a qualified  name.  A  blank is  interpreted as  the end  of a name
after a non-blank exists.

A typical user of the command would be:

             DCL           &OBJ *CHAR LEN(10)
             DCL           &LIB *CHAR LEN(10)
              .
             EXTQLFNAM     INPVAL(xxx) OBJ(&OBJ) LIB(&LIB)

The following describes some input values and the results:

   Input value    Object       Library   Comments
   -----------    ------       -------   --------

   ABC            ABC                    No qualified name
       ABC        ABC                    Leading blanks ignored
   ABC   XYZ                             Excess chars are ignored
   ABC/DEF        DEF          ABC       Qualified name
   ABC/DEF XYZ    DEF          ABC       Excess chars are ignored
       ABC/DEF    DEF          ABC       Leading blanks ignored
   'ABC/DEF'      DEF          ABC       Apostrophes are ignored
   ABC/ DEF                              Error - Name must follow /
   /                                     No name prior to /
   ABCDEFGHIJKL                          Too long a name
   A /DEF         A                      Excess chars are ignored
   123/456        456          123       No check for a valid name

EXTQLFNAM escape messages you can monitor for
---------------------------------------------

      CPF9898    Some error has occurred.

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

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

   INPVAL        The  input  value  (up  to  100  bytes).    Either  an
                 unqualified name or  a qualified name may  be entered.

                 The  value cannot  be all blank.   Leading  blanks and
                 apostrophes  are  ignored.    Excess  characters   are
                 ignored.   See  the  previous  examples of  valid  and
                 invalid syntax.

   OBJ           The  object   name.    This  is   an  optional  return
                 variable  that  if  used must  be  specified  as *CHAR
                 LEN(10).

   LIB           The  library  name.    This  is   an  optional  return
                 variable  that  if used  must  be  specified as  *CHAR
                 LEN(10).


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

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

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

The following TAA Tools must be on your system:

     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message

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

None, the tool is ready to use.

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

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

   EXTQLFNAM     *CMD                   TAACLRU       QATTCMD
   TAACLRUC      *PGM       CLP         TAACLRUC      QATTCL
					

Added to TAA Productivity tools March 26, 2007


Home Page Up to Top