PRTARACDE PRINT AREA CODES TAAPHNB |
The Print Area Codes command prints a listing of the area codes for
the major cities in the USA and Canada. Options exist to print all
the area codes in a state or province or a specific area code. The
RPG provided program may also be used to retrieve the array data
used.
A typical command would be:
PRTARACDE STATE(MN)
All the area codes in the state of MN (Minnesota) would be printed
with the major cities in each area code.
An option exists to print the area codes by city name within state.
Using the RPG program to extract the array
------------------------------------------
The RPG program TAAPHNBR may be called directly with the value *RTV
to retrieve the array data used within the program. The array data
is too large for a single array so 4 arrays are passed.
The logical contents are only a single array (no separate array for
the area codes exists). You must scan the data to access the
information needed.
Two separate arrays exist for the Time zone code and description.
A typical RPG interface to the program would be:
E ARE 760 50 Area codes
E AR1 190 50 Area codes
E AR2 190 50 Area codes
E AR3 190 50 Area codes
E AR4 190 50 Area codes
E ARA 20 1 ARB 12 Time zones
.
C CALL 'TAAPHNBR' Get array
C PARM STAPRM 2 State parm
C PARM '*RTV' GETTYP 6 Get type
C PARM AR1 Array 1
C PARM AR2 Array 2
C PARM AR3 Array 3
C PARM AR4 Array 4
C PARM ARA Time zone cd
C PARM ARB Time zone ds
C****************************************************************
C* *
C* Move to single array *
C* *
C****************************************************************
C MOVEAAR1DS ARE,1 Array 1
C Z-ADD191 AX 50 Index
C MOVEAAR2DS ARE,AX Array 2
C Z-ADD381 AX Index
C MOVEAAR3DS ARE,AX Array 3
C Z-ADD571 AX Index
C MOVEAAR4DS ARE,AX Array 4
C****************************************************************
C* *
C* Get time zone description *
C* *
C****************************************************************
C Z-ADD1 QX 30 Inlz
C xxx LOKUPARA,QX 20 Lookup
C N20 'Not foun'CAT 'd' TIMZ 12 P Time zone
C 20 MOVELARB,QX TIMZ P Time zone
Command parameters *CMD
------------------
ARACDE The area code to be printed. The default is *ALL to
print all of the area codes in the specified state.
STATE The state to be printed. The default is *ALL to
print all of the states containing the specified
area code.
SEQ The sequence of the listing. The default is
*STATEAREA for area code within state. *STATECITY
may be specified to print city name within state.
Restrictions
------------
Only the major cities in the USA and Canada are provided.
Prerequisites
-------------
The following TAA Tools must be on your system:
RTVSYSVAL3 Retrieve system value 3
SNDCOMPMSG Send completion message
SNDESCMSG Send escape message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
PRTARACDE *CMD TAAPHNB QATTCMD
TAAPHNBC *PGM CLP TAAPHNBC QATTCL
TAAPHNBR *PGM RPG TAAPHNBR QATTRPG
|
Added to TAA Productivity tools January 1, 1998