program:
DCL VALIDDATE BUILTIN;
IF VALIDDATE('2010011 ','YYYYMMDD')
THEN PUT SKIP LIST (''''||'2010011 '||''''|| ' IS VALID ');
ELSE PUT SKIP LIST (''''||'2010011 '||''''|| ' IS NOT ');
IF VALIDDATE('2010012 ','YYYYMMDD')
THEN PUT SKIP LIST (''''||'2010012 '||''''|| ' IS VALID ');
ELSE PUT SKIP LIST (''''||'2010012 '||''''|| ' IS NOT ');
IF VALIDDATE('2010013 ','YYYYMMDD')
THEN PUT SKIP LIST (''''||'2010013 '||''''|| ' IS VALID ');
ELSE PUT SKIP LIST (''''||'2010013 '||''''|| ' IS NOT ');
IF VALIDDATE('2010014 ','YYYYMMDD')
THEN PUT SKIP LIST (''''||'2010014 '||''''|| ' IS VALID ');
ELSE PUT SKIP LIST (''''||'2010014 '||''''|| ' IS NOT ');
IF VALIDDATE('2010015 ','YYYYMMDD')
THEN PUT SKIP LIST (''''||'2010015 '||''''|| ' IS VALID ');
ELSE PUT SKIP LIST (''''||'2010015 '||''''|| ' IS NOT ');
IF VALIDDATE('2010016 ','YYYYMMDD')
THEN PUT SKIP LIST (''''||'2010016 '||''''|| ' IS VALID ');
ELSE PUT SKIP LIST (''''||'2010016 '||''''|| ' IS NOT ');
IF VALIDDATE('2010019 ','YYYYMMDD')
THEN PUT SKIP LIST (''''||'2010019 '||''''|| ' IS VALID ');
ELSE PUT SKIP LIST (''''||'2010019 '||''''|| ' IS NOT ');
IF VALIDDATE('2010011 ','YYYYMMDD')
THEN PUT SKIP LIST (''''||'2010011 '||''''|| ' IS VALID ');
ELSE PUT SKIP LIST (''''||'2010011 '||''''|| ' IS NOT ');
IF VALIDDATE('2010012 ','YYYYMMDD')
THEN PUT SKIP LIST (''''||'2010012 '||''''|| ' IS VALID ');
ELSE PUT SKIP LIST (''''||'2010012 '||''''|| ' IS NOT ');
IF VALIDDATE('2010013 ','YYYYMMDD')
THEN PUT SKIP LIST (''''||'2010013 '||''''|| ' IS VALID ');
ELSE PUT SKIP LIST (''''||'2010013 '||''''|| ' IS NOT ');
IF VALIDDATE('2010014 ','YYYYMMDD')
THEN PUT SKIP LIST (''''||'2010014 '||''''|| ' IS VALID ');
ELSE PUT SKIP LIST (''''||'2010014 '||''''|| ' IS NOT ');
IF VALIDDATE('2010015 ','YYYYMMDD')
THEN PUT SKIP LIST (''''||'2010015 '||''''|| ' IS VALID ');
ELSE PUT SKIP LIST (''''||'2010015 '||''''|| ' IS NOT ');
IF VALIDDATE('2010016 ','YYYYMMDD')
THEN PUT SKIP LIST (''''||'2010016 '||''''|| ' IS VALID ');
ELSE PUT SKIP LIST (''''||'2010016 '||''''|| ' IS NOT ');
IF VALIDDATE('2010019 ','YYYYMMDD')
THEN PUT SKIP LIST (''''||'2010019 '||''''|| ' IS VALID ');
ELSE PUT SKIP LIST (''''||'2010019 '||''''|| ' IS NOT ');
results: ???????
'2010011 ' IS VALID
'2010012 ' IS VALID
'2010013 ' IS VALID
'2010014 ' IS NOT
'2010015 ' IS NOT
'2010016 ' IS NOT
'2010019 ' IS NOT