title: How to TEST(D) DATE if have format yyyy/mm/dd in RPGLE?
body: <p>How to test char date in format yyyy/mm/dd ?</p>
  <p>I try to use :</p>
  <pre><code>*YMD      TEST(D)       DATE            80
  </code></pre>
  <p>I want to test this 2021/15/30 date because I want to make sure the date is validated but seems like it doesn't work even if I test the right Date like 2021/06/01. What should I do?</p>
  <p>I also try this :</p>
  <pre><code>          Eval    DT = %CHAR(%DATE(DATE:*YMD/))    
  *YMD      TEST(DE)       DT           
            IF NOT %ERROR()
  
            Move    DT      DATE
            Write   Currec
  
            Endif
  </code></pre>
  <p>I enter 2021/06/01 as input but got this error instead :</p>
  <p><a href="https://i.stack.imgur.com/6upr5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6upr5.png" alt="error" /></a></p>
  <p>What should I do?</p>