• Subject: Re: ##EMailNumber 01-WNY-5014817 TEST (D) Question
  • From: Dave Shaw <dshaw1@xxxxxxxxxxx>
  • Date: Thu, 01 Jul 1999 11:32:05 -0400

-----Original Message-----
From: jmoreno@militarycars.com <jmoreno@militarycars.com>

>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 ?

I thought *LOVAL for a date was 00010101, i.e. 1 January 0001.  There was no
"year 0000", so I wouldn't expect it to be supported as a valid date.  I
would say that the indicator is being set correctly in all four instances.

---
Dave Shaw, General Nutrition, Greenville, SC
To subscribe to the MAPICS-l mailing list send email to
MAPICS-L-SUB@midrange.com
The opinions expressed may not be my employer's unless I'm sufficiently
persuasive...


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* 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          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


This thread ...


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

This mailing list archive is Copyright 1997-2019 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].