Jump to content

Hi all, Im trying to include a procedure that resides in th...


Manoj Chaurasia

Recommended Posts

Hi all,

Im trying to include a procedure that resides in the repository and the path/name of that procedure is a combination of 2 variables, something like:

-DEFAULTH &COUNTER = 1;

-SET &REPOS_PROC = DECODE &COUNTER(

- 1 'PROC1'

- 2 'PROC2'

- 3 'PROC3'

- 4 'PROC4'

-);

 

-SET &REPOS_PATH = 'IBFS:/WFC/Repository/Playground/';

 

-INCLUDE &REPOS_PATH.EVAL&REPOS_PROC.EVAL

 

I tried a lot of different combinations but till now no luck.

Anyone knows how to get this to work

Thanks in advance

-Fred-

Link to comment
Share on other sites

fred.stevens:

 

-SET &REPOS_PATH = IBFS:/WFC/Repository/Playground/; -INCLUDE &REPOS_PATH.EVAL&REPOS_PROC.EVAL

 

 

I remember that there was issues with this since a certain version (cant remember which one)

Have you tried

-SET &FEX = 'IBFS:/WFC/Repository/Playground/&REPOS_PROC.EVAL' || '.fex';

-INCLUDE &FEX

Or you may simply missing the .fex at the end !!!

Link to comment
Share on other sites

Hi Martin,

Yes I did try those 2. With and without the .fex extension.

I also tried the following:

 

-SET &INCLUDE =-INCLUDE;

-SET &FEX = IBFS:/WFC/Repository/Playground/&REPOS_PROC.EVAL || .fex;

&INCLUDE &FEX

 

WebFOCUS returns

 

(FOC1517) UNRECOGNIZED COMMAND -INCLUDE IBFS:/WFC/REPOSITORY/PLAYGROUND/PROC1.FEX

 

If I do (with an EVAL):

 

-SET &INCLUDE =-INCLUDE;

-SET &FEX = IBFS:/WFC/Repository/Playground/&REPOS_PROC.EVAL || .fex;

&INCLUDE.EVAL &FEX

 

WebFOCUS returns a different error:

FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND: IBFS:/WFC/Repository/Playground/PROC1.fex

and if I do this:

 

-SET &FEX = IBFS:/WFC/Repository/Playground/PROC1.fex;

-INCLUDE &FEX

 

400 - Bad Request

The request could not be understood.

and just this

 

-INCLUDE IBFS:/WFC/Repository/Playground/PROC1.fex

 

everything is fine.

I think the compiler/pre-parser doesnt like special characters like & in the line thats calling an INCLUDE fex.

But thanks for your reply; appreciated.

Link to comment
Share on other sites

And this

-SET &FEX = 'IBFS:/WFC/Repository/Playground/&REPOS_PROC.EVAL' || '.fex';

-INCLUDE &FEX.EVAL

At worst, can you use this

-DEFAULTH &COUNTER = 1;

 

-IF &COUNTER EQ 1 THEN GOTO OPT1

-ELSE IF &COUNTER EQ 2 THEN GOTO OPT2

-ELSE IF &COUNTER EQ 3 THEN GOTO OPT3

-ELSE IF &COUNTER EQ 4 THEN GOTO OPT4

-ELSE GOTO XEXIT;

-OPT1

-INCLUDE IBFS:/WFC/Repository/Playground/PROC1.fex

-GOTO XEXIT

-OPT2

-INCLUDE IBFS:/WFC/Repository/Playground/PROC2.fex

-GOTO XEXIT

-OPT3

-INCLUDE IBFS:/WFC/Repository/Playground/PROC3.fex

-GOTO XEXIT

-OPT4

-INCLUDE IBFS:/WFC/Repository/Playground/PROC.4fex

-GOTO XEXIT

-XEXIT

Link to comment
Share on other sites

You cannot include a dynamically generated fex from the repository.

The reason for this is that the fexes need to be retrieved from the repository prior to execution and shipped to the reporting server. This happens in the client.

So the process of generating the fex happens after execution has started, its too late.

But there is (I hope) some good news in the future are there is a massive project to shift this collection from the repository to the reporting server and we may be able to do this again. This functionality is expected to be in WF V9.

Link to comment
Share on other sites

Yes, but how its surfaced, I do not know.

We have a case open about the lag in executing a report. Some of our fexes are thousands of lines long with includes of similar size. The issue was the parsing / scanning of the fexes that the client was doing. The smaller the fex the quicker it is.

The case may have spawned this.

I can only benefits

Link to comment
Share on other sites

Mmmm. OK.

With this setup I was trying to reduce the overlap of some code, but it is what it is.

So I have to make some changes and forget about this dynamically generated fexs idea.

@MartinY:

I had this already on the Reporting Server, but I like the idea of having all fexes in 1 place and the DECODE was just for simplifying the example. In the real situation, a parameter is passed to this fex and concatenated with the path

Thanks for the all replys.

Have a great day,

-Fred-

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...