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] Checking values from SQLOUT

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Checking values from SQLOUT
 Login/Join
 
Member
posted
Hi,

I have a sample fex which is generated from a sql script.

I am then holding this in a hold file from SQLOUT.

I have 4 labels in the report which needs to be called based on the data values of the hold file which also involves a NULL checking

TABLE FILE SQLOUT
---
ON TABLE HOLD AS XYZ
END

-IF XYZ.FIELD1 EQ '' THEN GOTO LABEL1 ELSE GOTO LABEL2;
-IF XYZ.FILED1 EQ '1234' THEN GOTO LABEL3 ELSE GOTO LABEL4;
-RUN

-LAEBL1
TABLE FILE XYZ
...

END


-LABEL2
TABLE FILE XYZ
...

END

-LABEL3
TABLE FILE XYZ
...

END
-LABEL4
TABLE FILE XYZ
...

END

but irrespective of any value, the default -LABEL1 is called.

This message has been edited. Last edited by: <Kathryn Henning>,
 
Posts: 9 | Registered: January 05, 2012Report This Post
Expert
posted Hide Post
You're missing a "-RUN" so the "-IF" is happening BEFORE your table file request... Change that and let us know what happens.

But, then again DM doesn't know about the value of the fields from a TABLE FILE request unless you -READ them...

Add a "-SET &ECHO = ALL ;" to the top of you fex to see what's happening.




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
To amplify on Doug's remarks ...

As it stands, "XYZ.FIELD1" in your -IF directives is treated as a literal, so of course all of the equality conditions are false.

You can use -READFILE to transfer the columns (of the first row) into corresponding amper vars, which can then be used in the -IF's:

TABLE FILE SQLOUT
---
ON TABLE HOLD AS XYZ
END 
-RUN
-READFILE XYZ
-IF (&FIELD1 EQ '') THEN ...


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report 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] Checking values from SQLOUT

Copyright © 1996-2020 Information Builders