CHKMAILFLD CHECK E-MAIL FIELD TAAEMLB |
The Check E-Mail Field command checks a field in all records in a
file for a valid E mail address. A listing is output. The
local-portion of an address is ensured to have proper syntax. The
domain-portion is either syntax checked or checked using APIs to
determine if the domain name exists. To check if the domain name
actually exists, your system must have access to a domain name
server.
For an address like:
JSmith@abc.com'
the 'JSmith' portion is the local-portion and 'abc.com' is the
domain-portion.
To check the domain-portion, your system must have access to a domain
name server. See the section on 'Domain name server' for the
CHKMAILADR tool. The checking occurs using several APIs which access
a domain name server. Responses from these APIs can be very slow and
especially if the domain does not exist.
The local-portion is always syntax checked, but does not ensure that
the user exists at the domain.
Special values exist on CHKMAILFLD to allow checking of the SMTP file
used to hold E mail addresses as supported by WRKSMTP.
Typical commands would be:
CHKMAILFLD FILE(xxx) FIELD(yyy)
The field to be checked must be a character type. The file would be
read and each field would be checked to ensure that local-portion and
the domain-portion meet the syntax check rules. For the rules, see
the 'Syntax checking rules' section of the CHKMAILADR tool.
To check the E-mail addresses stored in the SMTP file used by the
system, enter:
CHKMAILFLD FILE(*SMTP) FIELD(*SMTP)
To check the domain-portion of addresses in a field, enter:
CHKMAILFLD FILE(xxx) FIELD(yyy) CHKDMN(*SYNTAX)
The local-portion of the addresses would be syntax checked. The
domain-portion would be checked using APIs to access a domain name
server. Responses from these APIs can be very slow and especially if
the domain does not exist.
CHKMAILFLD escape messages you can monitor for
---------------------------------------------
None. Escape messages from based on functions will be re-sent.
Command parameters *CMD
------------------
FILE The qualified name of the file to be checked. The
library value defaults to *LIBL. *CURLIB or a
specific library may also be used.
The special value *SMTP may be entered to check the
QATMSMTPA file in QUSRSYS.
FIELD The field containing the E-mail address. It must be
a character field that does not exceed 1024 bytes.
If FILE(*SMTP) is specified, the FIELD value must be blank.
CHKDMN The type of checking to be performed on the
domain-portion of the E-mail address. The
local-portion of the E-mail address is always syntax
checked.
*SYNTAX is the default to syntax check the
domain-portion of each E-mail address. See the
CHKMAILADR tool discussion of 'Syntax checking
rules'.
*INTERNET may be specified to use domain name
servers to check the domain-portion of the E-Mail
address. The domain-portion is not syntax checked.
Specifying *INTERNET requires your system to be
configured with and have access to one or more
domain name servers. (see the CHKMAILADR
documentation section on 'Domain name server').
APIs are used, but the responses can be very slow
and especially if the domain does not exist.
LISTTYPE The type of listing to be output. Any records with
errors will be flagged.
*ERRORS is the default meaning to list only those
records which have errors.
*ALL may be specified to list all records.
BYPBLANK A *YES/*NO value for whether to bypass any checking
for addresses which are blank.
*YES is the default meaning blank values are
bypassed.
*NO may be specified to mean a blank value will be
flagged as an error.
BYPVAL A list of up to 50 values that will be bypassed (not
checked). Each value may be 90 bytes in length.
*NONE is the default meaning all address values will
be checked.
MBR The member of the file to be checked.
*FIRST is the default. A specific name may be
entered.
OUTPUT How to output the results. * is the default to
display the spooled file if the command is entered
interactively. The spooled file is deleted after it
is displayed.
If the command is entered in batch or *PRINT is
specified, the spooled file is output and retained.
Restrictions
------------
Specifying CHKDMN(*INTERNET) requires your system to
be configured with and have access to one or more
domain name servers. See the CHKMAILADR section on
'Domain name server'.
Prerequisites
-------------
The following TAA Tools must be on your system:
CHKMAILADR Check E-Mail address
CHKOBJ3 Check object 3
EDTVAR Edit variable
FILEFDBCK File feedback
HLRMVMSG HLL Remove message
RSNLSTMSG Resend last message
RTVFLDA Retrieve field attributes
RTVSYSVAL3 Retrieve system value 3
SNDCOMPMSG Send completion message
SNDESCINF Send escape information
SNDESCMSG Send escape message
SNDSTSCNT Send status count
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
CHKMAILFLD *CMD TAAEMLB QATTCMD
TAAEMLBC *PGM CLP TAAEMLBC QATTCL
TAAEMLBC2 *PGM CLP TAAEMLBC2 QATTCL
TAAEMLBR *PGM RPG TAAEMLBR QATTRPG
|
Added to TAA Productivity tools July 15, 2006