Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to clear global variables in code ?

Status
Not open for further replies.

Wayster

Technical User
Feb 2, 2004
3
GB
Hi

I am running several fex's in sequence, each requiring some 'date' information that I create at the start of the first fex using SET commands and & variables

eg
-SET &&ST_YR_WK = EDIT (&START_YR_WK,'9999');

PROBLEM
I don't want the global variables to be accidentally used when running other unrelated fex's during the same session. Is there some way to 'clear' or 'reset' the defined global variations using code ?
 
Hi Wayster,

I usually reset all such varialbles, whether local (&) or
global (&&), by:
-SET &&ST_YR_WK =;
-SET .....
-RUN

Peter.
 
LET CLEAR * should do it but I don't think it's necessary. Since WebFOCUS is nonpersistant, the next report the runs is an entire new session to WebFOCUS. Even if you are using the dasboard are the user is still signed on to the same brower session, it's an entirely new connection to WebFOCUS. The only time global variables are even relevent in WebFOCUS is when you set them in the profile or when a fex EXecs another fex.
 
LET CLEAR * only will clear LET command aliases and not && variables. There is no way to clear && variable. But, do to the non persistence of WebFOCUS, after a report is rendered a fresh connection is made and all && variable are cleared as long as you have a private connection set up which is usually the case.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top