select distinct day (cast(cast(to_date(201706,'yyyymm')+1 months as char(8))||'01' as date) - 1 day) from sysibm.SYSDUMMY1