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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Delete an && variable from memory

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Delete an && variable from memory
 Login/Join
 
Member
posted
Is it possible to completely remove an &&variable from memory? Setting it to '' or just ; appears to still leave the variable in memory.

-SET &&TEST='123';
? &&
-RUN

-SET &&TEST=;
? &&

This message has been edited. Last edited by: Kerry,
 
Posts: 9 | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
When testing to see if the && variable is cleared, try -TYPE &&TEST


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: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
=; seems to work for me.

This code

-SET &ECHO=ALL;

-TYPE *** BEFORE
-SET &&TTEST='123';
-? &&TT


-TYPE *** AFTER
-SET &&TTEST=;
-? &&TT
has this result:

-TYPE *** BEFORE
 *** BEFORE
 -SET &&TTEST='123';
 CURRENTLY DEFINED & VARIABLES STARTING WITH '&TT':
 &&TTEST       = 123
 -? &&TT
 -TYPE *** AFTER
 *** AFTER
 -SET &&TTEST=;
 CURRENTLY DEFINED & VARIABLES STARTING WITH '&TT':
 -? &&TT


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
Yes, it does get set to blank, but it still exists. I want to be able to just delete it similar to a how a filedef clear clears out filedefs.
 
Posts: 9 | Registered: May 24, 2004Report This Post
Member
posted Hide Post
With a ? && it shows up as a blank.
 
Posts: 9 | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
The -? &.. does not show that the variable has been cleared.

Please try what I posted earlier.

e.g.
-SET &ECHO=ALL;

-SET &&TEST = '123' ;

-TYPE &&TEST

-SET &&TEST=;

-TYPE &&TEST


Results
-SET &&TEST = '123' ;

-TYPE 123

123

-SET &&TEST=;

0 ERROR AT OR NEAR LINE      0  IN PROCEDURE __WCFEX FOCEXEC * 

(FOC295) A VALUE IS MISSING FOR: &&TEST


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: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
I think it may depend on the release you're using?
I ran this against 77.01 and this is the result:
 -SET &&TEST='123';
 ? &&
 -RUN
 &&APPLOCK     APP_NOT_LOCKED
 &&APP_PERMIT  ALL
 &&EDAAPP      APP-ENABLED
 &&EDACONF     D:\ibi\srv77\wfs
 &&OSTYPE      WINNT
 &&SRVTYPE     PTH
 &&TEST        123
 -SET &&TEST=;
 ? &&
 &&APPLOCK     APP_NOT_LOCKED
 &&APP_PERMIT  ALL
 &&EDAAPP      APP-ENABLED
 &&EDACONF     D:\ibi\srv77\wfs
 &&OSTYPE      WINNT
 &&SRVTYPE     PTH

Maybe this is different in a lower release... I don't have access to a lower release at the moment...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Expert
posted Hide Post
Who knows if this is still valid?

Tech Support Solution: How do you clear single global variable?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
This "removes" all the global variables:

  
-? &
LET CLEAR *
-RUN
-TYPE *****************************
-? &
-EXIT


The -SET &&VARIABLENAME=; did "NOT" get reset to nothing.


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
quote:
LET CLEAR


That is bizarre.

Why would LET CLEAR clear all global variables.

At least is been documented in Symptom/Problem/Solution


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: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
The LET CLEAR is what I was looking for. Thanks!
Can you clear certain ones or is it all or none?

I also noticed that setting the && var to ; left the value to what it was above and appears to not change the value at all. Could be a version difference I suppose.

? REL
-SET &&TEST='123';
? &&
-RUN
-TYPE ***************************
-SET &&TEST=;
? &&

Generated this:
EDA767 Release INSTALLATION_DATE = 4/27/2010 13:12:07
&&TEST 123
***************************
&&TEST 123
 
Posts: 9 | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
As mentioned, it clears all global variables.


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: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Silver Member
posted Hide Post
Hi,

one possibility to clear a variable is the following:

-SET &&TEST = IF 1 EQ 2 THEN '';

Regards,
Markus


WF 7.6.6 (MRE,BID, DevStudio, partly RC) on Windows 2003 /Apache/Tomcat
Output: HTML,Excel,PDF,PPT
Adapters: SQL Server, DB2, Oracle
 
Posts: 38 | Location: Austria, Linz | Registered: June 19, 2009Report This Post
Expert
posted Hide Post
Setting a variable to '' does not clear it, just sets it to nothing.

Also you should always have an ELSE with an IF THEN, even if you know it will not be used, its good programming practice.


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: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
This is what I get:

LET CLEAR *
-RUN
-TYPE ***********************************************************
-SET &&TEST=123;
? &&
-RUN
-TYPE ***********************************************************
-SET &&TEST=;
? &&
-RUN
-TYPE ***********************************************************
-SET &&TEST = IF 1 EQ 2 THEN '';
? &&
-RUN
-TYPE ***********************************************************
-SET &&TEST ='';
? &&
-RUN

Yields the following:

EDA767 Release * Current Software:
EDA767 Release RELEASE = R720767D
EDA767 Release GEN_NUM = 307
EDA767 Release SOURCE_DATE = 09/17/2008 19:13:58
EDA767 Release BUILD_DATE = 09/17/2008 21:44:14
EDA767 Release INSTALLATION_DATE = 4/27/2010 13:12:07
***********************************************************
&&TEST 123
***********************************************************
&&TEST 123
***********************************************************
&&TEST 123
***********************************************************
&&TEST 123
&&TEST

Strange how &&TEST shows up twice on the last run and it ignores setting it to a ; and it ignores the if 1 EQ 2 test also.
 
Posts: 9 | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
I've seen multiple values before, many of them, and it seems to be something to do with setting the value multiple times.

But it only show in a -? & or -? &&

I noticed that you are using ? &&, you must be running this from the command line.


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: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
Yes, we have created our own "adhoc" window as follows:

 

    <form name="AdHoc" action="/ibi_apps/WFServlet" method="GET">
      <textarea name="IBIF_adhocfex" value="" rows="23" cols="73" align="left"></textarea>
      <br><br>
      <input type="reset" name="Reset" value="Clear Form">
      <input type="submit" name="Submit" value="Run ADHOC REQUEST">
    </form>


 
 
Posts: 9 | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
Are you aware that IBIF_adhocfex can be turned off at the security level ?

Some installations see this as a security risk, and lock it down.


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: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
Yes. We only allow certain people to see it. It is only available on our internal network.
 
Posts: 9 | Registered: May 24, 2004Report This Post
Member
posted Hide Post
Closed - Solved
 
Posts: 9 | Registered: May 24, 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     [SOLVED] Delete an && variable from memory

Copyright © 1996-2020 Information Builders