Try setting a default value for JobInfo9 so you can test it directly from the DataMapper interface. Also, you way want to try adding quotes around the value:
... WHERE DR1_DATUM_N08 = "{automation.jobInfo.JobInfo9}"
Have you tried using the SQL from the DB2 like so:
CAST(VARCHAR_FORMAT(CURRENT TIMESTAMP, ‘YYYYDDMM’) AS NUMERIC(8,0))
It would look like his in your query:
=SELECT *
FROM [AS400].[].[].[V_PRINT_LETTERS]
WHERE DR1_DATUM_N08 = CAST(VARCHAR_FORMAT(CURRENT TIMESTAMP, ‘YYYYDDMM’) AS NUMERIC(8,0))
ORDER BY AT2E_KDNR, AT2E_LFDNR7
I got the following sql statement running, which is a little bit slow, but it is working.
=SELECT * FROM [AS400].[].[].[V_PRINT_LETTERS_KDBM0101]
WHERE DR1_DATUM_N08 = (SELECT MAX(DR1_DATUM_N08) FROM [].[].[D80EKTO].[V_PRINT_LETTERS_KDBM0101])
ORDER BY AT2E_KDNR, AT2E_LFDNR7
I have to take a look why the parameter from jobInfo9 is not working.
That query will return the row which are = to the latest date in your DB, not the date of today. So let’s say that the last entry was on a Friday and on the next Monday you run it, it will return you all the row from last Friday. (assuming no entries are done during the weekend). Is that what you expect/desire?