I have a COBOL-DB2 program which is reading a file containing date. Lets say TODATE.
TODATE is moved to SQLDATE
One of the query from program is like
FROM BILDET A
WHERE A.COMPANY = 1
AND A.ATRNTYPE IN('MN','TI','PO')
AND A.ACTIVFROM > :SQL-TODATE
AND A.TRANDATE <= :SQL-TODATE
For some reasons, I need to remove this query from program. And will be executed seperately through JCL.
Is there anyway to pass this SQLDATE (i.e. TODATE) to this SQL query, rather than hardcoding it?