TAA Tools
RTVARACDE       RETRIEVE AREA CODE                     TAAPHNE

The Retrieve  Area Code command  retrieves the  description of an  area
code  including the time  zone, state, and  up to 5  descriptions (such
as  city names).   Only the area  codes provided by  the PRTARACDE tool
are supported (includes US, Canada, Caribbean, Samoa, etc).

A typical series of commands would be:

             DCL        &STATE *CHAR LEN(2)
              .
             RTVARACDE  ARACDE(xxx) STATE(&STATE)

The state of  the area code  would be returned  (area codes are  unique
for  each  state, province,  etc).    For  Caribbean countries,  CI  is
returned.

RTVARACDE escape messages you can monitor for
---------------------------------------------

      TAA9891    The area code does not exist

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

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

   ARACDE        The  3  character area  code  to  retrieve information
                 for.

   TIMZON        The time zone of the  area code.  This is an  optional
                 return value that  if used must be  specified as *CHAR
                 LEN(10).  The value returned will be one of:

                     Atlantic
                     Eastern
                     Central
                     Mountain
                     Pacific
                     Hawaiian
                     Cent/Mtn
                     Mtn/Pac
                     Samoan
                     Several (crosses several time zones)

   STATE         The  2 digit  state or  province abbreviation  for the
                 area code.  For  Caribbean countries, CI is  returned.
                 This is  an optional  return value  that if used  must
                 be specified as *CHAR LEN(2).

   DSCCRP1       The text  description of the  area code.   This may be
                 a  city, a state,  or a country.   Up to  5 cities may
                 be returned  in  DESCRP1 -  DESCRP5.   They  represent
                 the  major  cities in  the  area  code.   This  is  an
                 optional  return value that if  used must be specified
                 as *CHAR LEN(40).

   DSCCRP2       The text description  of the area code.   This may  be
                 an  additional city  in the  area  code.   This is  an
                 optional return  value that if used  must be specified
                 as *CHAR LEN(40).

   DSCCRP3       The text description of  the area code.   This may  be
                 an additional  city  in the  area code.    This is  an
                 optional return  value that if used  must be specified
                 as *CHAR LEN(40).

   DSCCRP4       The  text description of  the area code.   This may be
                 an additional  city  in the  area code.    This is  an
                 optional return  value that if used  must be specified
                 as *CHAR LEN(40).

   DSCCRP5       The  text description of  the area code.   This may be
                 an additional  city in  the  area code.   This  is  an
                 optional return value  that if used must  be specified
                 as *CHAR LEN(40).

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

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

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

The following TAA Tools must be on your system:

     PRTARACDE       Print area code
     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
   ------        ----    ---------      ----------    ----------

   RTVARACDE     *CMD                   TAAPHNE       QATTCMD
   TAAPHNEC      *PGM       CLP         TAAPHNEC      QATTCL
   TAAPHNER      *PGM       RPG         TAAPHNER      QATTRPG
					

Added to TAA Productivity tools April 15, 2006


Home Page Up to Top