TAA Tools
CHKLEAP         CHECK LEAP YEAR                        TAADATJ

The  Check Leap  Year  command  allows the  input  of  a 4  digit  year
between 1600  and 4000.   It returns a  Y/N value for  whether the year
is a leap year.

A typical command would be:

        DCL         &RTNVAL *CHAR LEN(1)
         .
         .
        CHKLEAP     YEAR(&YEAR) RTNVAL(&RTNVAL)
        IF          (&RTNVAL *EQ 'Y') DO /* It is a leap year */

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

   YEAR          A  4  byte  character  variable  that  must  contain a
                 value between 1600 and 4000.

   RTNVAL        A required return variable.   It must be specified  as
                 *CHAR LEN(1).   It will contain a value of  Y or N for
                 whether the year specified is a leap year.

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

Only the Gregorian calendar years are supported.

Since  the command provides a  return variable, it may  only be used in
a CL program.

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

The following TAA Tools must be on your system:

         SNDESCMSG     Send escape message

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

None, the tool is ready to use.

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

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

   CHKLEAP       *CMD                       TAADATJ       QATTCMD
   TAADATJC      *PGM           CLP         TAADATJC      QATTCL
					

Added to TAA Productivity tools April 1, 1995


Home Page Up to Top