Use special registers in DB-DECLARE, DB-OBTAIN, and DB-PROCESS calls to:
SQL
Store the value of CURRENT-DATE in a Working-Storage field.
DB-OBTAIN REC D2TAB-REC ... PM_PART_NO ... PM_COLOR (WS-COLOR) ... CURRENT DATE (WS-CURR-DATE) ... WHERE PM_PART_SHORT_DESC = 'WIDGET' ... AND PM_COLOR = 'RED'
Select rows by comparing column SHIP_DATE with the special register CURRENT DATE.
DB-PROCESS REC D2INVEN-REC ... DB-PROCESS-ID D2INV-ID ... IN_PART_NO ... IN_PART_SHORT_DESC ... IN_QTY_ONHAND ... WHERE SHIP_DATE = CURRENT DATE
Comment:
Do not use SQL function names, such as HOUR, TIMESTAMP, as column names.