This is how we used to get date from SYSIBM.SYSDUMMY1 table,
SELECT DATE(CURRENT DATE + 1 DAYS),
INTO :WS-MON-DATE-DB2,
FROM SYSIBM.SYSDUMMY1
WITH UR;
INTO :WS-MON-DATE-DB2,
FROM SYSIBM.SYSDUMMY1
WITH UR;
Now my requirement is, if suppose on the particular day i am not able to run the program as scheduled, i want to run program on later date by giving the past date through a parm to the program. But how to pass that value to this table to get the date? I tried the below code, but its giving error while binding. (-182, -171). Is there any way to achieve this?
SELECT DATE(:WS-CURRENT-DATE-DB2-H + 1 DAYS),
INTO :WS-MON-DATE-DB2,
FROM SYSIBM.SYSDUMMY1
WITH UR
INTO :WS-MON-DATE-DB2,
FROM SYSIBM.SYSDUMMY1
WITH UR