× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: RE:TEST (D) Question, WAS: ##EMailNumber 01-WNY-5014817 TEST (D) Question
  • From: Buck Calabro <mcalabro@xxxxxxxxxxxx>
  • Date: Thu, 1 Jul 1999 11:12:47 -0400

Jorge,
I never use *CYMD so I had to hit the books.  The RPG reference manual says
that *CYMD is:

Format Name   Description          Format (Default   Valid           Length
Example       
                                   Separator)        Separators

*CYMD         Century              cyy/mm/dd         / - . , '&'       9
101/04/25     
              Year/Month/Day

 

  Valid values for the century character 'c' are:

 

               'c'           Years

              -----------------------

                0          1900-1999

                1          2000-2099

                .              .

                .              .

                .              .

                9          2800-2899


I would have thought that all these dates would be in error, but I'm
guessing that the TEST(D) must be looking at the right-most digits of the
date, so 00001231 would map to 000/12/31 which is the same as *ISO
1900-12-31.

Buck Calabro

> -----Original Message-----
> From: jmoreno@militarycars.com 
> Sent: Thursday, July 01, 1999 8:36 AM
> To:   RPG400-L@midrange.com
> Subject:      ##EMailNumber 01-WNY-5014817 TEST (D) Question
> 
> Hello all
> 
>   I have a very simple question.
> 
>  Currently running in V4R2M0. and I had these lines of code in my RPG pgm
> ...
> 
> Definition of Workfield:
> **********************************************************************
>  D                 DS
>  D RDDT0MDY                1      8S 0
> 
> A data base field is moved to the workfield and
>     the workfield is tested for a valid Date
> **********************************************************************
> 
> 
> CL0N01Factor1+++++++Opcode&ExtFactor2+++++++Result++++++++Len++D+HiLoEq
> C                                             MOVE           CMRRDT
> RDDT0MDY
>  * Test for Y2K Format YYYYMMDD <Order Date>
> C             *CYMD                TEST (D)
> RDDT0MDY               99
> C
>  *
> Results:
> **********************************************************************
> IF CMRRDT = 19991231 Indicator 99  is  *OFF (correctly)
> IF CMRRDT = 20000101 Indicator 99  is  *OFF (correctly)
> IF CMRRDT = 00001231 Indicator 99  is  *OFF (incorrectly)
> IF CMRRDT = 00000101 Indicator 99  is  *OFF (incorrectly)
> 
> Question: Has anyone seen these behaviour for *CYMD TEST (D) over a
> numeric field (8,0)  and the extended
> year = 0000 ?
> 
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.