Does this work for you? It’s kinda of sloppy and only returns 1 date, but you can tweak it I think. The key I think is you need to use sysibm.sysdummy1 in z/OS. It’s sad that z/OS lacks behind alot of features of T-SQL in SQL Server…
with cteDate as (
Select date(‘04/21/2017’) as d
from SYSIBM.sysdummy1
)
,StarDate as
(
SELECT d - DAYOFYEAR(d) DAYS + ((QUARTER(d) - 1) * 3) MONTHS - 3 MONTHS + 1 DAY as DateValue
FROM cteDate
)
Select * from StarDate
–This will return a value of 01/01/2017