There is a ZIP file here in the IUA/EIUA Community which is called "IDD Reporting Using IDMS/SQL". It is relevant to this post as it contains a couple of Cobol programs - one of which implements a "Gregorian Date to SQL Date Function". It would be an excellent example to use to implement an IDMS/SQL function to convert your shop's non-SQL internal database date format to something that is SQL compliant. The PPT that is in the ZIP shows numerous examples of how the IDD Dictionary Gregorian dates can be used in SQL Date Arithmetic - you could use similar syntax for your application databases (for the IDD reporting SQL Views are provided to help out). An example follows:
--
-- Tell me all the records changed in the last 90 days by Users starting with "J" !
--
select name, version, revisedby, reviseddate
from RSQLSHR.RECORDCHANGED
where ymd_sincemod < 90 and revisedby like 'J%' ;
HTH - cheers - GaryC
https://communities.ca.com/docs/DOC-15853715 or IDD Reporting Using IDMS/SQL.zip --> either link should get you to the document mentioned above!