Focal Point
[SOLVED] Global variables EDASPROF

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

October 31, 2018, 05:58 AM
Ronibi
[SOLVED] Global variables EDASPROF
Hai,

working with Datamigrator 81M.
I added two global variables to edasprof-file:
&&GWOWNER, &&GWCONN.
-SET &&GWOWNER='GWSDDBA5';
-SET &&CONN='DBSD';

Then I added these to an access file of a synonym:
TABLENAME=&&GWOWNER.GWTB363
CONNECTION=&&CONN

When I do a refresh of the synonym i get an error. It says:
(FOC1677) undeclared server "&&CONN" referenced for DB2 Interface

When I just add the values in the access file
TABLENAME=GWSDDBA5.GWTB363
CONNECTION=DBSD
everything works fine.

Do those global variables not work with Refresh?

Regards
Ron

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


WebFOCUS AppStudio 8.2.04
WebFocus Datamanagement Console 8.1M
DMC
October 31, 2018, 07:53 AM
MartinY
I don't remember 100% but I think that you need to define the variable in the master also.
Something such as (not sure for the second variable, I already made it for one, not two) :
FILENAME=GWTB363, SUFFIX=<your connection type>     ,
 VARIABLE NAME=&&GWOWNER, $
 VARIABLE NAME=&&CONN, $
  SEGMENT=GWTB363, SEGTYPE=S0, $

Cannot find the doc on it to validate


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
October 31, 2018, 08:58 AM
Ronibi
Hai Martin

sounds rather overdone to me, adding it in two places ..... Frowner


WebFOCUS AppStudio 8.2.04
WebFocus Datamanagement Console 8.1M
DMC
October 31, 2018, 09:08 AM
BabakNYC
I didn't know you can use &&Variables in an access file. I thought variables are resolved during the run of a fex. Has that ever worked?


WebFOCUS 8206, Unix, Windows
October 31, 2018, 09:28 AM
Ronibi
I added the variables to TABLENAME and CONNECTION in the properties of the synonym.
Also see course 976, Datamigrator Advamced Techniques - Student Guide V7.7.07, chapter 'Iterating through multiple tables'.

Does this only work when running a fex, and not when refreshing a synonym? Does this mean that when I want to refresh a synonym i have to fill in the DB2 schema and connection for a table??

regards
Ron


WebFOCUS AppStudio 8.2.04
WebFocus Datamanagement Console 8.1M
DMC
October 31, 2018, 09:44 AM
BabakNYC
I think if you want to override the default connection attributes you ought to use ENGINE DB2 SET commands like the ones they list below:
https://webfocusinfocenter.inf...3.htm#dummy358908300


WebFOCUS 8206, Unix, Windows
October 31, 2018, 10:02 AM
Tony A
quote:
I didn't know you can use &&Variables in an access file. I thought variables are resolved during the run of a fex. Has that ever worked?

Yes, and it still does.

@Ron, I use exactly as you and Martin have outlined (add -SET to EDASPROF, VARIABLE keyword in .MAS plus variable in .ACX) and it works perfectly.

Refresh leaves the variable(s) in place in the MAS/ACX files.


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
October 31, 2018, 10:11 AM
Ronibi
Hai Tony

why do I than get the FOC1677??

I only added the variables in ACX ..


WebFOCUS AppStudio 8.2.04
WebFocus Datamanagement Console 8.1M
DMC
October 31, 2018, 10:14 AM
Tony A
Hi Ron,

Did you add them to the .mas as outlined by Martin above?

If not then do that.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
October 31, 2018, 10:32 AM
Ronibi
Tony,

that works
thnx to you all

Regards
Ron


WebFOCUS AppStudio 8.2.04
WebFocus Datamanagement Console 8.1M
DMC