Jump to content

Hi all, When executing a fex I want to see at some point all...


Manoj Chaurasia

Recommended Posts

Hi all,

When executing a fex I want to see at some point all variables with their values.

This can be easily done with:

 

- &

 

The problem with this is that variables defaulted as -DEFAULTH are not shown. See small example below:

 

-TYPE ----- Variable is not listed

-DEFAULTH &AA = lemon;

- &AA SAVEPRINT

-RUN

-TYPE ----- Variable is not listed (was defaulted as DEFAULTH)

-SET &AA = banana;

- &AA SAVEPRINT

-RUN

-TYPE ----- Variable is listed

-DEFAULT &BB = pear;

- &BB SAVEPRINT

-RUN

-TYPE ----- Variable is listed (was defaulted as DEFAULT)

-SET &BB = apple;

- &BB SAVEPRINT

-RUN

 

Does anyone know how to list all variables, including the -DEFAULTH ones

Thanks

-Fred-

Link to comment
Share on other sites

@MartinY

Thanks for your reply, and yes, that is what I do now too, but sometimes its quite time consuming if (in my case) there are dozens of those -DEFAULTH variables.

@Waz

OK, understood, but still it would be very handy to see all variables at once and not to -TYPE them one-by-one. Im sure it will not be too difficult to show these variables too with something like:

 

- & SAVEPRINTH

 

But it is what it is.

Thanks and regards

-Fred-

Link to comment
Share on other sites

Hi Fred

I looked around for a way to get this to work - perhaps by changing parameter prompting to happen all the time for example. I think it will involve messing about with the WFDESCRIBE parts of WebFOCUSs brains, but then I think thats on the client side and this is executing on the WFRS. So I dont know.

Sounds like a good NFR to me. Maybe add an extra environment SET command or just an extra parm to the - & SAVEPRINT that says to show all the parms. Sort of like SET versus SET ALL only for & variables.

Try running it by techsupport - maybe they know of something you could do. Theres also the chance that a specific trace in the right place might be able to get you what you want.

I vote for a New Feature Request. If you should be on a webinar with the Walters, theyd probably know if this is doable.

Link to comment
Share on other sites

Hi Fred,

I am currently developing a Framework for my client that I called LynX.

This Framework includes several Functions that handles more easily WebFOCUS/DBMS Error (Tracking) and Debugging.

One of them is a Debugging Function which allows to list the Variables including the capricious DEFAULTH Variables.

Take a look

FOCEXEC sample:

 

 

 

RESULT

 

 

 

Sample Result.jpg9491089 134 KB

 

As you can see DEFAULTH Variables &A01, &A02 and &A04 are well listed with the good values.

The 3 lines below are generated each time the Function is called:

-INCLUDE lynx/~listvar.fex

-SET &ECHO = OFF;

-INCLUDE C:ibisrv82wfsedatempts000015hdg$var.fex

 

Do not care about them.

 

SYNTAX:

 

 

1) &lynx.EVAL - Activate LynX Framework (Must be the first line of your FEX (Do an ECHO = ALL too))

2) var <at1>,<at2> - Set Function Attributs like - parm SAVEPRINT Command. But not exactly the same.

3) &v.EVAL - Call Function (v means variable)

 

The function var has 2 Attributs:

<at1> : | * | G | x (x=String)

<at2> : G (with *) | x (with G) (x=String)

 

 

var Function Attributs Accepted:

1) var : Help

2) var * : All Variables (Global/Local) - DEFAULTH included

3) var : All Variables (Global/Local) - DEFAULTH included

4) var A : All Local Variables Starting by "A" - DEFAULTH included

5) var *,G : All Global Variables - DEFAULTH included

6) var G,A : All Global Variables Starting by "A" - DEFAULTH included

 

P.S. If you omits this line then &v.EVAL will take it as var *

 

*** IMPORTANT

 

The Framework is only compatible with Windows OS.

If you have UNIX then SM me. There is some minor modifications to made. I can help you to make it works. My client is using Windows Server. So, I was not able to create a UNIX version.

The Framework contains only that Function.

The Framework works for all WebFOCUS 8.2 and higher Versions

The Function works for all Focexec source. (Application Server and Repository)

The Function take care of DEFAULT, DEFAULTS and PROMPT Variables too.

Functions and Attributes are case sensitive.

The Variables are really sorted compare to the - & SAVEPRINT command

You can call the Function many times as you want within the FEX.

When you are done with your debugging, do not forget to delete or comment &lynx.EVAL line.

NEWS: I am working on Version 2. EX: Show only FEX Variables. To follow.

 

 

IMPLEMENTATION

 

 

 

Download Zip File attached : lynx.zip.txt

myibi do not accept .zip extension. Rename it to lynx.zip

 

Create Application lynx on the WF Server (EX: C:ibiappslynx)

Do not need to add it to Server APP PATH

Copy the 4 FEX from the Zip File into lynx Application.

Add this line into Server/User Profile (EX: edasprof.prf or username.prf)

-INCLUDE lynx/~lynx.fex

 

Here we go

 

P.S. Let me know if you encounter any issues. Its surely not 100% bug free.

Enjoy,

Michel Pageau

lynx.zip.txt (3.9 KB)

Link to comment
Share on other sites

Fred,

I guess as these variables are hidden, you wouldnt expect to see them. This is what the manual says. Do you have to use this rather than just -DEFAULT

Ian

-DEFAULTH commands set default values for hidden variables.

You can initialize a variable and prevent it from being used for WebFOCUS parameter prompting by using the -DEFAULTH command. Variables initialized with -DEFAULTH, are not returned in the XML describe information used for parameter prompting. Since these variables are not displayed by the parameter prompting features and are not displayed by the - command, they are hidden from the user.

Link to comment
Share on other sites

Ian is exactly right the H in -DEFAULTH means hidden to the users. From a developer point of view I can see why you want to see them. But there should not be a facility for an end user to see the names and values. That is why they are not returned by the WFDescribe facility. Users will not uncover by themselves the idea of we just added &BetaInfo=Y to the URL and we get a report with lots more information unless you tell them about the hidden switch.
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...