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     [CLOSED] SETTING DEFAULT TO NULL

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] SETTING DEFAULT TO NULL
 Login/Join
 
Gold member
posted
How do I set -DEFAULT to a null, when I do the following -DEFAULT &FromWO1 = '' it prefixes the paramater with a leading space

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


WebFOCUS 7.7.1
Windows 2000
Output: Excel and PDF
 
Posts: 82 | Registered: October 04, 2007Report This Post
Virtuoso
posted Hide Post
In Dialog manager there is no such thing as a null value. The variable is either present or not, and if it is it contains at least a space or 0 (which to DM is the same).
Depending on how you do your prefixing, there may be a solution for this. But since you did not say how you do your prefixing, I can only guess. Suppose it is also in DM then you could use strong concat for instance. Example:
-DEFAULT &FromWO1 = ''
-SET &XYZZY = &FromWO1 || '444';
-TYPE &XYZZY


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Master
posted Hide Post
If this is strictly Dialog Manager, you are stuck, but for use in TABLE, MODIFY, DEFINE FILE, or a COMPUTE statement I will usually use MISSING. For example:
-DEFAULT &FromWO1 = MISSING
-*
DEFINE FILE CAR
  SALEDT/YYMD WITH MODEL MISSING ON=
    IF COUNTY EQ 'JAPAN' THEN &FromWO1 ELSE DATECVT(&YYMD,'I8YYMD','YYMD');
END


This sets SALEDT to Null/Missing when country is JAPAN.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Expert
posted Hide Post
As GamP says, there is no NULL in Dialog Manager.

If you need to know if the &Var is set or not, then don't default it, and test for its existence with &Var.EXISTS .


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
Master
posted Hide Post
or the old 'go around' method.

-DEFAULT &VAR = &VAR;

-IF &VAR NE 'some test here' THEN GOTO DOONETHING ELSE GOTO DOSOMEOTHERTHIGN;

-DOONETHING 
-TYPE Hello from block 1.
-GOTO DOEXIT

-DOSOMEOTHERTHIGN
-TYPE Hello from block 1.
-DOEXIT

-DOEXIT


-DEFAULT &VAR = &VAR; sets the value to something so it can be evaluated - not the same as NULL, but mayeb the best you can get. Have you tried comparing &VAR to FOC_NONE? Not sure if this work (probably not).

-IF (&VAR EQ FOC_NONE) GOTO HERE ELSE GOTO THERE;


-ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Report 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     [CLOSED] SETTING DEFAULT TO NULL

Copyright © 1996-2020 Information Builders