Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Global Variable in DBMS SQL flow in Datamigrator
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Global Variable in DBMS SQL flow in Datamigrator
 Login/Join
 
Gold member
posted
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.02M
WebFocus Datamanagement Console 8.1M
DMC
 
Posts: 66 | Registered: August 29, 2014Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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 8203, Unix, Windows
 
Posts: 1335 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Gold member
posted Hide Post
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.02M
WebFocus Datamanagement Console 8.1M
DMC
 
Posts: 66 | Registered: August 29, 2014Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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 8203, Unix, Windows
 
Posts: 1335 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Guru
posted Hide Post
Support for global variables in a DBMS SQL Flow was added to 7.7.08M (aka 8203m) gen 1349. Please apply the latest maintenance.
 
Posts: 369 | Location: New York City | Registered: May 03, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Global Variable in DBMS SQL flow in Datamigrator

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.