Focal Point
[Resolved] WebFOCUS 8 and -INCLUDE

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

April 10, 2013, 08:35 AM
MattC
[Resolved] WebFOCUS 8 and -INCLUDE
Anyone testing WF 8 yet?

We are in the process of testing and noticed that “–INCLUDE” no longer works in MRE. For the most part all of our reporting procedures are stored on the Reporting Server versus MRE, but I did have a couple of reports that were stored in MRE. My assumption is that since MRE is now stored in a repository, it can no longer see the includes.

Maybe there is another way to handle this now, I am not for sure. I was just curios if anyone else has run into this?

Thanks,

Matt

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


WebFOCUS 8.1.05
April 10, 2013, 08:39 AM
Tom Flynn
I would be amazed if it doesn't work.
We use the following syntax:
-MRNOEDIT -INCLUDE folder/program.fex
-MRNOEDIT -HTMLFORM folder/program.htm


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
April 10, 2013, 08:51 AM
MattC
Thanks Tom! That's interesting. I use -MRNOEDIT if I was calling a procedure on the Reporting Server, but if it existed in MRE, I would just INCLUDE it.

That seem to do the trick.

It surprised me that they would have taken that away.


WebFOCUS 8.1.05
April 10, 2013, 10:59 AM
globalwm
That's an interesting distinction Matt/Tom - thanks.

"-INCLUDE" seems to work fine for us - know I can understand why.

We have examples of both "-INCLUDE" and "-MRNOEDIT -INCLUDE" in our FOCEXEC files...


8.0.02M, Oracle 11.2 (AIX), Windows 2008R2, HTML, PDF, Excel
April 10, 2013, 05:35 PM
Waz
If -INCLUDE in MRE doesn't work in WF8, its an upgrade stopper!


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!

April 11, 2013, 02:53 AM
Dave
Same here !


_____________________
WF: 8.0.0.9 > going 8.2.0.5
April 16, 2013, 07:31 AM
MattC
-MRNOEDIT is used to include a procedure or what ever from your Reporting Server.

To get an include working in MRE, I needed to include the full path of where the include is.

 -INCLUDE IBFS:/WFC/Repository/MBA_Content/Reports/mkt_common_odscom.fex 



WebFOCUS 8.1.05
April 16, 2013, 09:50 AM
Doug
quote:
If -INCLUDE in MRE doesn't work in WF8, its an upgrade stopper!
Seriously? Is it true that "-INCLUDE" doesn't work in WF8?
April 16, 2013, 10:57 AM
MattC
No it works, but you need to include your full path.


WebFOCUS 8.1.05
April 16, 2013, 02:16 PM
Doug
Sweating That was close and unimaginable.
But, it may mean some code changes during the conversion process. Sweating
April 16, 2013, 05:41 PM
Waz
Its still a departure from the original functionality.

That means all fexes in MRE with includes will need to be changed.

Not Happy!


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!

April 17, 2013, 03:07 AM
Dave
[sarcasm]Great...[/sarcasm]

So...
besides having to recode 90% of our fexi..


It will ( like HTMLs ) no longer be possible to copy-paste fexi from one domain to another without having to adjust the paths.

Question is: Why?
Any other language will be perfectly happy ( when a path is not provided ) to reference or include another file as long as it's in the same folder.

One of the many "Why?" question I have about WF.


Roll Eyes

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


_____________________
WF: 8.0.0.9 > going 8.2.0.5
April 17, 2013, 11:09 AM
MattC
Luckily for me, I don't have a lot of stuff in MRE. Most of my stuff is on the Reporting Server. I only have 2 dashboards with HTML's and some driving paramters in the HTML that are in MRE. I did have to go in and re-link my paramters.

I initially did do a migration from 7.7 to 8, but then changed course and begun building new Content Folders using the Resource Template. I didn't care of the old MRE structure and how it named it when it loaded it into the Repository.

It's been a challenging process to learn and if you are TOP Heavy in MRE, I would suggest consulting with IBI Support to help in migration.


WebFOCUS 8.1.05
April 17, 2013, 05:34 PM
Waz
Can someone in IBI please clarify if this is the case please.


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!

April 23, 2013, 04:01 PM
AJ
Hi Waz,

This is a change in behavior.

As of 8x, all new procedures using –INCLUDEs that reference a file within the WF8 repository require full IBFS path qualification.
Procedures created prior to 8x and migrated will have a secondary reference within the repository that is not exposed to the user in order to resolve any –INCLUDEs that are not fully qualified.

-MRNOEDIT includes still access files on the reporting server, rather than in the repository. For –MRNOEDIT –INCLUDE your procedure must reside on the reporting server within an application folder that is on the Reporting Server APP PATH.


For further assistance related to installation and configurations, please contact Information Builders’ Customer Support Services and open a case. You may either call at 1-800-736-6130, or access the online system InfoResponse at http://techsupport.ibi.com. Here is a list of information to be ready when you call: http://techsupport.ibi.com/before_you_call.jsp.

Thanks,

Alan Boord (IBI)


Alan Boord
April 28, 2013, 07:42 PM
Waz
Thanks Alan, for the clarification.

I guess when we upgrade, we will know the full impact.


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!

October 10, 2013, 01:59 PM
jodye
I just posted something about this.

The fact that wf8 requires fully qualified paths for included files is unfortunate. I want to have a clone of my code in a dev domain and a prod domain... so every single include needs goto syntax so that the fully qualified path can be used. Also, I was hoping to be able to build an amper and then use that

-include &xxx

but that does not work.

Jodye


WF 8.0.0.5M
February 20, 2014, 06:07 PM
David Briars
quote:
To get an include working in MRE, I needed to include the full path of where the include is.

-INCLUDE IBFS:/WFC/Repository/MBA_Content/Reports/mkt_common_odscom.fex


@MattC: Thanks for sharing this solution.

In WFDS, when you do a properties on a 'Content' file, the 'Full Path' value contains the WebFOCUS Environment name.

So, when I coded my -INCLUDE I used the value of the 'Full Path' from properties, which gave me an error.

Then I saw your post, and realized that I needed to code the 'Full Path' value shown in properties, less the WebFOCUS Environment name.

Thanks!
February 20, 2014, 06:20 PM
David Briars
quote:
The fact that wf8 requires fully qualified paths for included files is unfortunate.

@jodye: Did you ever get a solution for this issue.

We also relied on the fact that in WF 7 -INCLUDE filename was a 'relative concept', so that when we migrated the code containing the -INCLUDE, from Dev to Test to Prod, we knew it would call from the relevant folder.

Now with an 'absolute' naming convention for -INCLUDE in WF 8, it looks like we would need to handle this some other way.
February 21, 2014, 07:49 AM
MattC
As far as managing multiple environments, I didn’t find it to be an issue in relation to having programs in the “Content” structure. In my early stages of my WF 8 upgrade, I did my migration from WF 7, I did my “modernization” of my “Content” folder structure as I didn’t like the structure it built from the old WF 7 environment and re-worked it. Keep in mind, I started on an initial version of 8, so I am not sure what improvements they have made since.

To not go into too much detail of what I did from a “modernization” standpoint (that’s its own topic), I used the Change Management to migrate my application from DEV>TEST>PQA>PROD. This helped me keep my structure intact and I didn’t have to make any changes, besides a –INCLUDE that had my connection string to the proper database environment.


WebFOCUS 8.1.05
February 21, 2014, 08:31 AM
MattC
I did find this in the Admin Console Help under Change Management Option.


8007 Help File
IBI_CM_Retain_Handles

If True, the hrefs from WebFOCUS 7 are used as handles in WebFOCUS 8 during migration from WebFOCUS 7 to WebFOCUS 8, allowing the code for -INCLUDEs and drill downs to continue to work with the WebFOCUS 7 syntax. The default value is True.


WebFOCUS 8.1.05
February 21, 2014, 11:10 AM
David Briars
Thanks for the information Matt.

All of our -INCLUDEs from the 7 to 8 migration/conversion (our current code) are working fine.

What I, and I think Jodye, are talking about how do we handle -INCLUDEing common code for new Management Reporting focexecs.

(I realize I probably need to open a new thread on this issue.)

Using the new 8 syntax (absolute pathing) seems to force us to change the path coded in the -INCLUDE, as migrate the code from dev to test to UAT to Prod.

With the old 7 syntax (reltative pathing) we knew the calling focexec, would call from its own environment/path/folder, as required.

We lean pretty heavily on the -INCLUDE construct (common code), hence our concern.
February 21, 2014, 02:36 PM
J
Looks like I am going to be creating application variables to determine where I am at in the file system so that I don't have to rewrite the paths every single time. The catch:

Can the WF8 Content area handle dynamic INCLUDES? or is it limited like the MRE in WF7 where includes have to be hard-coded?


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
February 21, 2014, 04:40 PM
David Briars
@J: Thank you for your problem summary.

We are in the same position as you. The code in our Contents area knows what environment it is operating in. But how to use that knowledge to control where the -INCLUDE pulls from?

I'll send Kathryn a PM, to ask if she can ask some IB folks to add to this thread.
February 21, 2014, 08:08 PM
<Kathryn Henning>
Hi David,

Thank you for the PM. I'll contact product management to weigh in on this issue.

Thanks and regards,

Kathryn
February 24, 2014, 10:27 AM
David Briars
Thank you Kathryn.

The relative pathing concept used for WF 7 Managed Reporting domain/folder structure, was something familiar to developers, from other types of languages (e.g., Javascript src=)/operating systems (e.g., Unix relative path is a path relative to the working directory of the user or application).

Converting to a absolute pathing only concept in WF 8 for Contents folders would be difficult at best.
June 02, 2014, 04:46 PM
J
Looks like variables work (you could setup domain variables so that you can copy reports across domains):
 
-SET &test = 'Repository/training/(your Content folders here)/test.fex';
TABLE FILE CAR
PRINT 
     CAR.ORIGIN.COUNTRY
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=DATA,
     COLUMN=N1,
     FOCEXEC=&test.fex,
$
ENDSTYLE
END
 

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


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
June 03, 2014, 02:47 PM
njsden
I created a small procedure in "My Content" with a single DEFINE structure:

DEFINE FILE CAR
CONTINENT/A10 = IF COUNTRY EQ 'JAPAN' THEN 'ASIA' ELSE 'EUROPE';
END


Invoking the procedure from another .fex in the repository using a constant value works as expected:

-INCLUDE IBFS:/WFC/Repository/Testing_Place/~njsden/car_define.fex

TABLE FILE CAR
PRINT CAR AND MODEL AND SEATS
BY CONTINENT
BY COUNTRY
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET PAGE-NUM NOPAGE
END



Attempting to use a variable -INCLUDE however doesn't work which is actually consistent with MRE 7.7.x and before.

Attempt 1:
-SET &I_DEF_FILE = 'IBFS:/WFC/Repository/Testing_Place/~njsden/car_define.fex';
-INCLUDE &I_DEF_FILE

Error: Cannot include resource specified &I_DEF_FILE

Attempt 2:
-SET &I_DEF_FILE = 'IBFS:/WFC/Repository/Testing_Place/~njsden/car_define.fex';
-INCLUDE &I_DEF_FILE.EVAL

Error: Cannot include resource specified &I_DEF_FILE.EVAL

Attempt 3:
-SET &I_DEF_FILE = '-INCLUDE IBFS:/WFC/Repository/Testing_Place/~njsden/car_define.fex';
&I_DEF_FILE.EVAL


Renders the following error which makes sense as at this point the procedure is already being executed by the Reporting Server, past the "MRE parsing":

(FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND:
 IBFS:/WFC/Repository/Testing_Place/~njsden/car_define.fex



I don't think dynamic -INCLUDE's are still supported on the MR / Repository side and who knows if they ever will be ...



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
June 03, 2014, 03:04 PM
Tom Flynn
Try Attempt 2A:
  
-SET &I_DEF_FILE = 'IBFS:/WFC/Repository/Testing_Place/~njsden/car_define.fex';
-MRNOEDIT -INCLUDE &I_DEF_FILE.EVAL






Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
June 03, 2014, 03:28 PM
J
You can reference procedures in your relative path using
 -INCLUDE ./car_define.fex 

For me I can't run this code from within the editor but I can run it from the Dev studio explorer by right clicking on the fex and selecting run. This works in Content.


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs