Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Code Sharing] Saving amper variables to file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Code Sharing] Saving amper variables to file
 Login/Join
 
<FreSte>
posted
This could be a very handy technique.
For instance, when you click on a hyperlink (drilldown) with many many parameters which will generate an URL
that will exceed the maximum length for an URL.

Just write (all) ampers to a file in the FOCCACHE directory with an unique name and add this filename
to the parameters in the drilldown definition in your fex.

In the fex that is called by the hyperlink, include this fex and all parameters are set.


-Fred-



-* --- Define some temp-variables
-SET &PA_TEMP1   = 'This';
-SET &PA_TEMP2   = 'That';
-SET &PA_TEMP3   = 'Wendy's';
-SET &PA_COUNTRY = 'ENGLAND';
-SET &PA_QWERTY  = 'Netherlands';

-RUN 
-? & SAVE FOCCACHE/inc_amp.fex
-RUN


The file inc_amp.fex in the FOCCACHE directory looks like this:

-*CURRENTLY DEFINED VARIABLES:
-DEFAULT &ECHO = 'OFF ';
-SET     &EXCELSERVURL = 'SET EXCELSERVURL=http://localhost:80/ibi_apps';
-SET     &FOCEXURL = '/ibi_apps/WFServlet?IBIF_webapp=/ibi_apps&IBIC_server=EDASERVE&IBIWF_msgviewer=OFF&';
-SET     &FOCHTMLURL = '/ibi_html';
-SET     &FOCREL = M727705D;
-SET     &GOOGLEMAPSAPIKEY = ' ';
-SET     &IBIMR_domain = ' ';
-SET     &PA_COUNTRY = 'ENGLAND';
-SET     &PA_QWERTY = 'Netherlands';
-SET     &PA_TEMP1 = 'This';
-SET     &PA_TEMP2 = 'That';
-SET     &PA_TEMP3 = 'Wendy''s';
-SET     &WFDESCRIBE = XMLRUN;
 
Report This Post
Expert
posted Hide Post
Hi Fred,

How on earth did you find that?

Great method and thanks for sharing!

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Looks like it came in with V7.7 something.

Good One


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
That doesn't seem to work here, not sure why as we're on v7.7.04 as well. We use FOCCACHE all the time, so it's certainly enabled...

Adding:
WHENCE inc_amp FOCEXEC
-RUN

Results in: (FOC1892) FILE NOT FOUND : inc_amp FOCEXEC


Anyway, intriguing feature. I had been wondering whether it would be possible to obtain a list of parameters like this to aid in creating/maintaining drilldown parameter lists by simply modifying a copy of the parameter list of the current procedure.

For example, creating EXL2K output for the current report could then be done by something similar to:
HEADING
"Excel export"
...
TYPE=HEADING, LINE=1,
 FOCEXEC=&FOCFEXNAME(
-INCLUDE FOCCACHE/inc_amp.fex
    WFFMT='EXL2K'
 ),
$


Of course, the current list of params isn't formatted correctly for using directly in a STYLE declaration. It would also be convenient to be able to prune parameters from that list that aren't needed in the drilldown (or that are to be replaced with the same parameter(s) with a different value).

Any chance this could work something like this?:
-? & HOLD FOCCACHE/paramList
-RUN

TABLE FILE paramList
PRINT VALUE
BY PARAMETER
END


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Guru
posted Hide Post
This is a brilliant technique for a quick way to save/retrieve all parms. But, I am looking for a way to save all parms as fields in a .foc or some table to retrieve in future. Almost like buidling Save Selection on Portal. Please advise if theres an easy way. I have a not so elegant way to create define for each parm and PRINT/HOLD and then keep appending by -MORE as we different users run diff selection.


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
Expert
posted Hide Post
A quick search on "capture variables" gives this post from GamP from 2007.

Susannah and I also gave a presentation on this in Summit 2013 - I no longer have the PPT though Frowner

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Gold member
posted Hide Post
vaayu, is this along the lines of what you're trying to do???

-SET &JEFF1='HI';
-SET &JEFF2='THERE';
-SET &JEFF3='STRANGER';

DEFINE FILE CAR
VAR1/A10='&JEFF1.EVAL';
VAR2/A10='&JEFF2.EVAL';
VAR3/A10='&JEFF3.EVAL';
END

TABLE FILE CAR
WRITE VAR1 VAR2 VAR3
BY COUNTRY NOPRINT
WHERE RECORDLIMIT EQ 1;
ON TABLE HOLD AS 'VAR_KEEP' FORMAT FOCUS
END


TABLE FILE VAR_KEEP
PRINT
VAR1 VAR2 VAR3
ON TABLE HOLD AS HOLDIT FORMAT BINARY
END

-RUN

-DEFAULTH &VAR1=0
-DEFAULTH &VAR2=0
-DEFAULTH &VAR3=0


-READFILE HOLDIT

-RUN

-SET &JEFF1=&VAR1;
-SET &JEFF2=&VAR2;
-SET &JEFF3=&VAR3;

-TYPE &JEFF1
-TYPE &JEFF2
-TYPE &JEFF3


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 74 | Registered: December 23, 2013Report This Post
Guru
posted Hide Post
Yes, more likely, I'll have it HOLD as focus table the first time then keep appending each time when they run the report request as an INCLUDE.
Thanks for the feedback guys !

quote:
-SET &JEFF1='HI';
-SET &JEFF2='THERE';
-SET &JEFF3='STRANGER';

DEFINE FILE CAR
VAR1/A10='&JEFF1.EVAL';
VAR2/A10='&JEFF2.EVAL';
VAR3/A10='&JEFF3.EVAL';
END

TABLE FILE CAR
WRITE VAR1 VAR2 VAR3
BY COUNTRY NOPRINT
WHERE RECORDLIMIT EQ 1;
ON TABLE HOLD AS 'VAR_KEEP' FORMAT FOCUS
END


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Code Sharing] Saving amper variables to file

Copyright © 1996-2020 Information Builders