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

Facebook Twitter LinkedIn IB Bloggers
Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [CLOSED] DATA MIGRATOR - Assign Synonym value to Variable
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] DATA MIGRATOR - Assign Synonym value to Variable
 Login/Join
 
Member
posted
Hi,
I want to read a source synonym field value into a variable. sourceSynonym would have multiple rows and want to assign only one of the value (conditional) to variable. How would I do this in data migrator?

Thanks
Dipjen

This message has been edited. Last edited by: Chuck Wolff,


WebFOCUS 8
Windows, All Outputs
 
Posts: 15 | Registered: July 15, 2016Reply With QuoteReport This Post
Virtuoso
posted Hide Post
 SQL
SELECT COUNTRY
FROM CAR
WHERE CAR = 'JAGUAR'
;
TABLE 
ON TABLE HOLD AS OUTLINE
END
-RUN
-READFILE OUTLINE
-? &C 


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1031 | Location: Toronto, Ontario | Registered: May 26, 2004Reply With QuoteReport This Post
Member
posted Hide Post
Hi,
thank you for replying. I got it working and now need bit more info.

I am storing returning query value in amper variable &lastreaddatetime. Its Apha value. I am trying to use this value in the data migrator flow, as select order,orderline,qty from order where moddate > &lastreaddatetime.

when i do -Type &lastreaddatetime its showing 0000192017/09/01 00:01:15 instead of 2017/09/01 00:01:15. How do I convert it to proper date.?

Thanks


WebFOCUS 8
Windows, All Outputs
 
Posts: 15 | Registered: July 15, 2016Reply With QuoteReport This Post
Guru
posted Hide Post
Dipjen

It must be a varchar field and the 000019 is the length of the field. You can do the following to get rid of the length part.

-SET &leastreaddatetime = EDIT(&leastreaddatetime,'$$$$$$9999999999999999999');


Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 407 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Member
posted Hide Post
In my process flow, i have steps as following:
steps:
[start]
2nd --> [set parameter] I default &lastreaddatetime = somevalue
3rd --> [procedure] that gets the date value from sql table and set to &lastreaddatetime amper variable
4th --> [data flow] that gets this &lastreaddatetime

so, value that i set in [set parameter] gets passed to my dataflow. But that value I changed in procedure to read from synonym is not seem to get set in step 3 in above. How do I get to get the value that is set by procedure here to pass to dataflow ?

my procedure looks like this:
 

SQL
SELECT lastreaddatetime FROM tbcontroltable WHERE CTLNAME='lastread';
TABLE 
ON TABLE HOLD AS HOLD01 FORMAT ALPHA
END
-RUN
 
-READ HOLD01  &lastreaddatetime.A24.
-TYPE TEST: &lastreaddatetime
-SET &lastreaddatetime = EDIT(&lastreaddatetime,'$$$$$$9999999999999999999');
-TYPE test1: &lastreaddatetime
-EXIT

 


WebFOCUS 8
Windows, All Outputs
 
Posts: 15 | Registered: July 15, 2016Reply With QuoteReport This Post
Guru
posted Hide Post
Dipjen

That looks correct to me. Is it working?


Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 407 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [CLOSED] DATA MIGRATOR - Assign Synonym value to Variable

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