Focal Point
report caster can't see the server variables value set inside a called FEX

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

November 09, 2007, 10:40 AM
johney
report caster can't see the server variables value set inside a called FEX
Hi All,

I have an FEX file which for selecting the server settings dynamicaly.This will be included in any main fex programs to set the css path, report caster path, databse connection etc.

Sample code of my common.fex is as below,

-IF &FID_ENV EQ 'xxxxxxx.yyy.com' THEN GOTO DEV_CONN
-ELSE IF &FID_ENV EQ 'yyyyyy.yyy.com' THEN GOTO UAT_CONN

-DEV_CONN
-SET &SRVR='mydevserver';
-SET &SRVR_FULL_PATH='mydevserver/ibi/7.1.1/ibi/WebFOCUS711/basedir/';
-SET &SRVR_PATH='http://mydevserver.xxx.com:23000';
-SET &CSS='http://mydevserver.xxx.com:23000/approot/frec_code/frecsty.css';
-SET &DATABASE ='dev1';
-GOTO DONE_SRVR

-UAT_CONN
-SET &SRVR='myuatserver';
-
-

Now my issue comes here ,

If I run an FEX called main.fex which has the call to this common.fex directly from EDASERVE environment I am getting all the values and doing great, whereas if I schedule the same main.fex report in the report caster it is giving the error &FID_ENV is not set.

My main.fex will have following code related to this.

-INCLUDE common
-*dynamically construnct SQLS , BY clauses etc -here, then the dynamic values from common.fex will be used for next statement as &DATABASE,

ENGINE SQLORA SET DEFAULT_CONNECTION &DATABASE
SQL SQLORA PREPARE SQLOUT FOR
&SQLQRY1_FINAL
END
TABLE FILE SQLOUT
PRINT *
&BYVAL
ON TABLE HOLD AS HOLD1 FORMAT ALPHA
END

Any idea, why the report caster can't see the varaible of &FID_ENV?

Thanks and regards,
Johney.


Version 7.6.11
Webfocus installed in AIX 5.3,
desktop PC: Windows-XP based
Output: Excel, HTML, PDF
November 12, 2007, 12:23 AM
johney
Thanks TexasStingray ,

Is there any alternative for this ?

Regards,
Johney.


Version 7.6.11
Webfocus installed in AIX 5.3,
desktop PC: Windows-XP based
Output: Excel, HTML, PDF
November 12, 2007, 10:11 AM
GinnyJakes
Johney,

Just a couple of ideas:

Can you pass a dummy variable from RC? On the task tab, go to Advanced and add the variable.

Also can you put a -DEFAULT in your common.fex?


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
November 18, 2007, 07:32 AM
johney
Thanks Ginny,

I also thought the same logic, but I have one issue here as ,

I am not calling common.fex directly , it is just an INCLUDE in my main fex which is actualy getting called from report caster.How do I pass the values of the variable passed from caster to an INCLUDE call from main to common?

Any idea ?

Regards,
Johney.


Version 7.6.11
Webfocus installed in AIX 5.3,
desktop PC: Windows-XP based
Output: Excel, HTML, PDF
November 19, 2007, 11:33 AM
cburtt
Try moving the parameters into &&vars.
These last for the whole session and are accessable to all INCLUDEd code.

1) Via the 'Advanced' button on the 'Task' tab, RCaster passes "FORD" to MAIN.fex as the value of parameter MAKE.

2) MAIN.fex contains:
-SET &&CAR_MAKE = &MAKE;
-INCLUDE COMMON

3) COMMON.fex contains:
-TYPE RCaster says "&&CAR_MAKE".

You will output "RCaster says "FORD".


WIN/2K running WF 7.6.4
Development via DevStudio 7.6.4, MRE, TextEditor.
Data is Oracle, MS-SQL.