Focal Point
[CLOSED] Global Variable in DBMS SQL flow in Datamigrator

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1577059096

December 03, 2018, 11:53 AM
Ronibi
[CLOSED] Global Variable in DBMS SQL flow in Datamigrator
Hai

using DMC gen 833, release 81M
Because of a rather complicated query, I am using a DBMS SQL flow.
As part of the query I coded this DB2 Common Table Expression:

DAG
(DAG_KEY)
AS
(SELECT DAG_KEY
FROM GWSDDBA5.GWTB403
WHERE DAT = '2010-09-09')

This is accepted and works fine. But when I replace the date field with a global variable

DAG
(DAG_KEY)
AS
(SELECT DAG_KEY
FROM GWSDDBA5.GWTB403
WHERE DAT = '&&WV_VRWRKDAT_DT.EVAL')`

I get an error message saying: Cannot parse DBMS SQL

Why is that?

I also tried

&&WV_VRWRKDAT_DT
'&&WV_VRWRKDAT_DT'
&&WV_VRWRKDAT_DT.EVAL

but nothing works

regards
Ron

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS AppStudio 8.2.04
WebFocus Datamanagement Console 8.1M
DMC
December 03, 2018, 12:00 PM
BabakNYC
Can you add a line in the very top of the code that says -SET &ECHO=ALL;

so we can see what code is being sent to DB2?


WebFOCUS 8206, Unix, Windows
December 03, 2018, 12:50 PM
Ronibi
Is suppose you mean adding it in the Text View.
I already get the error when saving the query, so without running.

But let me prepare some testdata, then change the code in text View, run and come back to you. Will be somewhere tomorrow (different timezone Smiler)

Regards


WebFOCUS AppStudio 8.2.04
WebFocus Datamanagement Console 8.1M
DMC
December 03, 2018, 12:58 PM
BabakNYC
It'd be also helpful to know the exact error and how you populate the value for &&WV_VRWRKDAT_DT and what's the format of DAT in DB2.


WebFOCUS 8206, Unix, Windows
December 03, 2018, 04:44 PM
Clif
Support for global variables in a DBMS SQL Flow was added to 7.7.08M (aka 8203m) gen 1349. Please apply the latest maintenance.


N/A