Focal Point
[CLOSED NFR] Data Server VS MRE Domain?

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

April 23, 2013, 03:26 PM
Doug
[CLOSED NFR] Data Server VS MRE Domain?
UNRESOLVED. I was hoping for a workaround.

I have the following two fexes on the data server. The execution of PROC1 executes, via "-INCLUDE", proc2 (as one would expect). The question is: What Am I missinger here, how do we perform this same functionality when both procedures reside in an MRE Domain Standard Reports Folder?

-TYPE *** PROC1.FEX ***
-SET &FEXNAME = 'PROC2' ;
-SET &RUNTHIS = '-INCLUDE ' | &FEXNAME ;
-TYPE *** &|RUNTHIS = &RUNTHIS ***
&RUNTHIS.EVAL
-RUN
-TYPE *** DONE WITH PROC1
AND
-TYPE *** RUNNING PROC2.FEX ***

Any difference using "EX" instead of "-INCLUDE"?

This message has been edited. Last edited by: Doug,




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
April 23, 2013, 04:51 PM
Rao D
When calling FEX file residing in MRE then we have to use the full qualifying path

-INCLUDE domain_href/app/fexname.fex (this is if you are calling fex from another domain

If in the same domain then

-INCLUDE app/fexname.fex


WebFOCUS - ver8201
[ReportingServers: Windows 64bit;
Client: tomcat and IIS on windows 2012
AppStudio

April 23, 2013, 05:02 PM
Doug
I guess I need to elaborate on my question. This needs to be done DYNAMICALLY, via the use of variables. The STATIC execution / inclusion is simple. But, let's be dynamic.
April 24, 2013, 04:43 AM
Dave
Doug,

You can't create DM commands ( those with dash ) with other DM commands.

Example:
-SET &A = '-SET &B = ''Hello'' ';
&A


Doesn't work because first ALL DM Commands are processed, then all parameters are resolved.

What can be done is:
-GOTO LABEL_&FEXNAME;

-LABEL_PROC1
-INCLUDE app/PROC1.FEX
-GOTO LABEL_END

-LABEL_PROC2
-INCLUDE app/PROC2.FEX
-GOTO LABEL_END

-LABEL_END


This will effectively include BOTH procedures, but only execute one of them.

G'luck


_____________________
WF: 8.0.0.9 > going 8.2.0.5
April 24, 2013, 09:06 AM
Doug
Unfortunately, I agree that it cannot be done. You're solution is OK for STATIC / Known named procedures. But, at the point of execution, these names are unknown. So, it is with great sadness that I'll CLOSE this post as unresolved. Perhaps we'll migrate those MRE procs to the data server so that the APP SERVER option can work.
April 24, 2013, 10:06 AM
Dave
Don't give up so easily...


I don't have a a working example...
...but I'm pretty sure it is possible.


FILEDEF HOLDFILE DISK <your_location_of_preference>/RUNFILE.FEX

TABLE FILE <dummy>
PRINT COMPUTE RUNTHIS/A50 = 'EX &FEXNAME' AS ''
FOOTER
"-RUN;"
WHERE RECORDLIMIT EQ 1
ON TABLE SAVE AS HOLDFILE FORMAT ALPHA
END

EX <your_location_of_preference>/RUNFILE.ftm


Summary:
Create a procedure 'on_the_fly' that runs your desired &FEXNAME and then EX that 'on_the_fly' procedure.



Check also:
[SOLVED] How to call the hold file created in other procedure?
http://forums.informationbuild...371015303#2371015303

You might what to use a permanent holdfile ( APP HOLD ) or perhaps FOCCACHE



We don't use this kind of ####.... Sweating perhaps some MacGyver/wizard can get this to work?

Greets,Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
April 24, 2013, 02:13 PM
Doug
Thanks Dave, I Love The Possitive...
quote:
Don't give up so easily...
I'll check it out. We don't like / want to "use this kind of ####.... " either. But, a guy's gotta do what a guy's gotta do, right?