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.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Passing Variables from a procedure to a data flow

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Passing Variables from a procedure to a data flow
 Login/Join
 
Member
posted
I created a simple data flow called df_mytest_fm_to_sql to move data from source to target. I am able to execute this flow without any problem. I added the following filter to select columns node in the data flow.
T1.FirstName = &&TESTVAR

I created a simple procedure called setdbvar and it has the following code
EX CMASAP REQ_NAME=df_mytest_fm_to_sql, CM_ASYNC=OFF, PARMS="&&TESTVAR=Jim";

When I execute the procedure, I am getting an error which says - (FOC295) A VALUE IS MISSING FOR: &&TESTVAR

My goal of this test is to pass the value "Jim" to the &&TESTVAR variable and I would like the procedure to run the data flow using CMASAP.

Any help here is appreciated.


iSM 616
iDM 7705
iDQC 802
WF 77
Windows 2008 Server
 
Posts: 29 | Registered: May 01, 2007Report This Post
Virtuoso
posted Hide Post
AK,
You have a procedure (focexec) called 'setdbvar'.
In this procedure you have the command EX CMASAP. CMASAP is also a focexec.
If you write:
  
-SET &&TESTVAR='Jimm';

before your EX CMASAP it will receive the value of this global parameter.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Member
posted Hide Post
Daniel, thanks for replying back.

I did try this option -
-SET &&MYVAR2 = 'Jim';
EX CMASAP REQ_NAME=df_mytest_fm_to_sql, CM_ASYNC=OFF, PARMS="&&TESTVAR=&&MYVAR2";

and I am getting the same error.

The filter in the iDM data flow is
T1.FirstName = &&TESTVAR


iSM 616
iDM 7705
iDQC 802
WF 77
Windows 2008 Server
 
Posts: 29 | Registered: May 01, 2007Report This Post
Virtuoso
posted Hide Post
From the manual,

Syntax: How to Supply a Variable Value With Another Procedure
EX[EC] procedure name=value where:

procedure

Is the name of the procedure that will contain the name/value values.


name

Is the variable name.


value

Is the value you are giving to the variable.


EX SLRPT CITY=STAMFORD, CODE1=B10, CODE2=B20

So you should be able to
EX CMASAP REQ_NAME=df_mytest_fm_to_sql, CM_ASYNC=OFF, TESTVAR=Jim


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Platinum Member
posted Hide Post
Try this:

-DEFAULT &&TESTVAR='&&TESTVAR'

EX CMASAP REQ_NAME=df_mytest_fm_to_sql, CM_ASYNC=OFF, PARMS="&&TESTVAR=Jim";


Data Migrator 5.3, 7.1, 7.6
WebFOCUS 7.1, 7.6, 7.7
SQL Server, Oracle, DB2
Windows
 
Posts: 126 | Registered: January 18, 2007Report This Post
Virtuoso
posted Hide Post
I don't think you can set -DEFAULT values in this way. It still has to get the value of &&TESTVAR from somewhere.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Platinum Member
posted Hide Post
I've done this before and it works for me. I copied this straight from a flow I have running right now:

-DEFAULT &&LOAD_YYM='&&LOAD_YYM'

-BUILD_CSV

EX CMASAP REQ_NAME=PF_IRF_CLAIM_CSV_BUILD, CM_ASYNC=OFF, PARMS="&&LOAD_YYM=&LOAD_YYM"
-RUN


Data Migrator 5.3, 7.1, 7.6
WebFOCUS 7.1, 7.6, 7.7
SQL Server, Oracle, DB2
Windows
 
Posts: 126 | Registered: January 18, 2007Report This Post
Virtuoso
posted Hide Post
You've got two different variables in there - &&LOAD_YYM and &LOAD_YYM. One is global, the other is local. In your code, where would it get the value for &LOAD_YYM?


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Expert
posted Hide Post
The other way to pass the amper variable is to use the pipe character.

EX CMASAP REQ_NAME=df_mytest_fm_to_sql, CM_ASYNC=OFF, PARMS="&|&|TESTVAR=Jim";


This stops the test for the variable and removes the pipes when it is evalulated.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
The value for &LOAD_YYM is determined higher up in the procedure. I didn't include all that code because I didn't think it was relevant to what AK was looking for. When the process executes, it comes out looking something like this:

-DEFAULT &&LOAD_YYM='&&LOAD_YYM'

-BUILD_CSV

EX CMASAP REQ_NAME=PF_IRF_CLAIM_CSV_BUILD, CM_ASYNC=OFF, PARMS="&&LOAD_YYM=200710"


Data Migrator 5.3, 7.1, 7.6
WebFOCUS 7.1, 7.6, 7.7
SQL Server, Oracle, DB2
Windows
 
Posts: 126 | Registered: January 18, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Passing Variables from a procedure to a data flow

Copyright © 1996-2020 Information Builders