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.
I am having an issue where I am trying to look at a variable and identify if it is not filled and is blank. If it is blank I would like to pass a section of the code as shown below.
SQL DB2 SET ISOLATION NC
-IF &TEAM_UPD EQ '' THEN GOTO NEXT_1 ELSE GOTO TEAM_START;
-TEAM_START
ENGINE DB2 SET DEFAULT_CONNECTION Y
SQL DB2
UPDATE WFUSRFLE/BUY_TBL_GL SET TEAM = '&TEAM_UPD'
WHERE UNQID = &UNQID_UPD;
END
-NEXT_1
-IF &BNAME_UPD EQ '' THEN GOTO NEXT_2 ELSE GOTO BNAME_START;
-BNAME_START
ENGINE DB2 SET DEFAULT_CONNECTION Y
SQL DB2
UPDATE WFUSRFLE/BUY_TBL_GL SET BNAME = '&BNAME_UPD'
WHERE UNQID = &UNQID_UPD;
END
This works with the exception of when I enter a 0 in &TEAM_UPD or &BNAME_UPD as it skips those update statements even though I want to update the field to 0. The reason this is happening is because the -IF statement is returning a true value for the ''=0 and skipping the update statement.
I figure I need to use a Missing/Null/Blank command instead of the '' as part of my IF statement but none of those are working and I am at a loss for how to define that correctly in the dialogue manager.
Any help is appreciated, thanks in advance for taking a look.
-LukeThis message has been edited. Last edited by: Luke Forster,
It's almost as if a zero evaluates to "false" and two single quotes also evaluates to "false"... two false boolean values tested for equality gives a "true".
Ya learn something new every day, I guess...
App Studio WebFOCUS 8.1.05M Windows, All Outputs
Posts: 594 | Location: Michigan | Registered: September 04, 2015
I added the ASIS function to the update procedure and it is now working. Thanks so much for your help, I would never have been able to figure that out by myself.
I will mark this as solved.
-Luke
SQL DB2 SET ISOLATION NC
-IF ASIS(&TEAM_UPD) EQ '' THEN GOTO NEXT_1 ELSE GOTO TEAM_START;
-TEAM_START
ENGINE DB2 SET DEFAULT_CONNECTION Y
SQL DB2
UPDATE WFUSRFLE/BUY_TBL_GL SET TEAM = '&TEAM_UPD'
WHERE UNQID = &UNQID_UPD;
END
-NEXT_1
-IF ASIS(&BNAME_UPD) EQ '' THEN GOTO NEXT_2 ELSE GOTO BNAME_START;
-BNAME_START
ENGINE DB2 SET DEFAULT_CONNECTION Y
SQL DB2
UPDATE WFUSRFLE/BUY_TBL_GL SET BNAME = '&BNAME_UPD'
WHERE UNQID = &UNQID_UPD;
END