Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]Delete a global variable
Go
New
Search
Notify
Tools
Reply
  
[SOLVED]Delete a global variable
 Login/Join
 
Member
posted
Hi,

I need your help because i have a pb when i want to delete a global variable.

In fact, i have a program, in which one i call an other one with an include.

i use global variable because if i dont do that i cant use my macro variables with the 2 programs.

my pb ==> i want to delete my global variable when my program is done, but it doesnt work.

It's like if the global are killed only in one programm

this a short version of my code :

Main Program :
  
-SET &&VPDATNAI='OUI';
-SET &&LIMIT=1;

-INCLUDE OTHER_PROGRAM


OTHER_PROGRAM
  
-SET &&LIMIT=;
-SET &&VPDATNAI=;
-? **


And this is the result :
CURRENTLY DEFINED & VARIABLES:
&&LIMIT and &&VPDATNAI are killed, i don't see them anymore

BUT, now if i do that :
Main Program :
  
-? &&
-EXIT


This is the result :
CURRENTLY DEFINED & VARIABLES:
&&LIMIT = 1
but &&VPDATNAI is killed!!!

Could you please tell me where is the pb?

Thks a lot and good day

Cédric

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


WebFocus 8.2, Windows
 
Posts: 13 | Registered: August 09, 2019Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Kykyn

I could not reproduce your problem in WF 8.2.06. The global variables are both killed by the -INCLUDE program and does not show up in the calling program anymore.

I just used your example as posted so your code must have an additional -SET for &&LIMIT somewhere else.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1723 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
What is the result when you are running this ?

-*-* Fex 11111.fex
-TYPE -*******************************************
-TYPE -** first fex
-TYPE -*******************************************
-SET &&VPDATNAI='OUI';
-SET &&LIMIT=1;

-TYPE Sent values to second fex
-TYPE VPDATNAI: &&VPDATNAI<--
-TYPE LIMIT: &&LIMIT<--

-TYPE -*******************************************
-TYPE -** second fex call
-TYPE -*******************************************
-INCLUDE IBFS:/WFC/Repository/IT/22222.fex

-TYPE Received values from second fex
-TYPE VPDATNAI: &&VPDATNAI<--
-TYPE LIMIT: &&LIMIT<--
-TYPE -*******************************************
-TYPE -** end first fex
-TYPE -*******************************************


-*-* Fex 22222.fex
-TYPE -*******************************************
-TYPE -** second fex
-TYPE -*******************************************
-TYPE Received values from first fex
-TYPE VPDATNAI: &&VPDATNAI<--
-TYPE LIMIT: &&LIMIT<--

-SET &&VPDATNAI='';
-SET &&LIMIT='';

-TYPE Sent values back to first fex
-TYPE VPDATNAI: &&VPDATNAI<--
-TYPE LIMIT: &&LIMIT<--
-TYPE -*******************************************
-TYPE -** end second fex
-TYPE -*******************************************


My result is the following
 -*******************************************
 -** first fex
 -*******************************************
 Sent values to second fex
 VPDATNAI: OUI<--
 LIMIT: 1<--
 -*******************************************
 -** second fex call
 -*******************************************
 -*******************************************
 -** second fex
 -*******************************************
 Received values from first fex
 VPDATNAI: OUI<--
 LIMIT: 1<--
 Sent values back to first fex
 VPDATNAI:  <--
 LIMIT:  <--
 -*******************************************
 -** end second fex
 -*******************************************
 Received values from second fex
 VPDATNAI:  <--
 LIMIT:  <--
 -*******************************************
 -** end first fex
 -*******************************************

Also, please update your signature to let us know which version of WF you are running


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2260 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Member
posted Hide Post
HI,

Thks a lot for your help
In fact the pb is that i use an -EXIT in the 2nd FEX, and so the global variables are not killed as i would.
So i m going to try to modify my fex to fix this pb.

One more time thks a lot!
Cédric


WebFocus 8.2, Windows
 
Posts: 13 | Registered: August 09, 2019Reply With QuoteReport This Post
Virtuoso
posted Hide Post
kykyn

-EXIT is not a good idea in any fex unless you are in debugging mode.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1723 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]Delete a global variable

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.