×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to clear global variables in code ?

How to clear global variables in code ?

How to clear global variables in code ?

(OP)
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 ?

RE: How to clear global variables in code ?

Try 'LET CLEAR *'

RE: How to clear global variables in code ?

Hi Wayster,

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

Peter.

RE: How to clear global variables in code ?

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.

RE: How to clear global variables in code ?

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close