Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [SOLVED] Passing Variable From Flow To Flow

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Passing Variable From Flow To Flow
 Login/Join
 
Member
posted
I'd like to set a variable in a flow (call it flow_master) which then passes it to the next flow (call it flow_file), which in turn sets values in a synonym (syn_file). I have it working where flow_file sets the values and syn_file gets it and does the work. However when I try to set the value one layer up in flow_master I'm hitting a wall. I'm hoping this is a simple thing and I'm just a bit off.

I was thinking that since I set the variable to be globat in flow_master, I could access it further down the chain. Maybe this is true but I'm just doing it wrong.

Here is what I have
syn_file
TABLENAME: &&WS_TABLENAME <- What will end up here is a full path in DB2 like DTA001/IM01

flow_file

In that flow I want to accept the 'DTA001' from flow_master in a &&WS_LIBRARYNAME var and concatenate it like you see in the photo, which I'm trying to use like the below:

In the User Variable Calculator I'm trying to assign WS_TABLENAME to &&WS_LIBRARYNAME | '/IM01', essentially:
-SET &&WS_TABLENAME = &&WS_LIBRARYNAME | '/IM01';

flow_master
The text view of what I want to do there is:
-SET &&WS_LIBRARYNAME = 'DTA042';

I want to set &&WS_LIBRARYNAME in flow_master, have it picked up in flow_file and use it to assign the proper value to &&WS_TABLENAME. That will in turn have syn_file pick that up and do what it needs to do.

The only think NOT working is assigning in flow_master and it being picked up in flow_file.

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


Mass Data Migrator
 
Posts: 11 | Registered: March 22, 2018Report This Post
Guru
posted Hide Post
In flow_master where you are calling flow_file be sure that you are doing so as a stored procedure. Otherwise the flow gets started in a new (clean) agent.


N/A
 
Posts: 397 | Location: New York City | Registered: May 03, 2007Report This Post
Member
posted Hide Post
Thanks, I'll do that. Otherwise how I've named my variables, have them set as global, and what I'm expecting should work?


Mass Data Migrator
 
Posts: 11 | Registered: March 22, 2018Report This Post
Member
posted Hide Post
quote:
Originally posted by Michael Henry:
Thanks, I'll do that. Otherwise how I've named my variables, have them set as global, and what I'm expecting should work?


The answer is "No". I'm about ready to scream and give up.

Is there documentation that shows how variables work being passed around? I set my flow_master to run as a stored proc and set a paramenters as in the image. In my case I did:
WS_TABLELIBRARY='DTA042'

In flow_file I have:
-SET &&WS_TABLENAME = '&WS_TABLELIBRARY' | '/IM01';

And it's not working. I've tried:
-SET &&WS_TABLENAME = '&&WS_TABLELIBRARY' | '/IM01';
-SET &&WS_TABLENAME = 'WS_TABLELIBRARY' | '/IM01';

I try method after method after method and most of my failures come down to not knowing how to set and pass variables around.

Is there any documentation which goes into the scripting/programming aspect of the product and can show my idiot self how to do these things? I've tried so many things I've got myself in circles.

This message has been edited. Last edited by: Michael Henry,


Mass Data Migrator
 
Posts: 11 | Registered: March 22, 2018Report This Post
Member
posted Hide Post
I have found a user guide with many examples. Hopefully I am able to follow them and get what I'm looking for.

Thanks for the helps so far, though, it has moved me along.


Mass Data Migrator
 
Posts: 11 | Registered: March 22, 2018Report This Post
Virtuoso
posted Hide Post
When you call a flow that is not being called as a stored proc, the following should be the parameters to pass globals.
 &|&|WS_TABLELIBRARY=&&WS_TABLELIBRARY 

Note the pipes.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [SOLVED] Passing Variable From Flow To Flow

Copyright © 1996-2020 Information Builders