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] SET Command # Weird Behaviour

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] SET Command # Weird Behaviour
 Login/Join
 
Guru
posted
-SET &ECHO = 'ALL';
-SET &HI=IF 212 EQ 'ALL' THEN 'ALL' ELSE IF 05 LT 06 THEN 'N/A' ELSE STRREP (05, '212', 4, ' OR ', 2, ', ', 05, 'A05');
-TYPE &HI
-EXIT

I am just having this in code. In this ELSE IF 05 LT 06 is not getting executed at all on any cause. It is going to the ELSE part everytime and causing an error.

Anyone could crack why is is that ? It shud stop at the ELSE IF itself. Something is going crazy. Roll Eyes

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


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
 
Posts: 394 | Location: Chennai | Registered: December 02, 2009Report This Post
Virtuoso
posted Hide Post
Works okay in 7.7.03. I get "N/A" as expected.

Here's the output:

Your request did not return any output to display.
... some output lines removed ...

 -SET &HI=IF 212 EQ 'ALL' THEN 'ALL' ELSE IF 05 LT 06 THEN 'N/A' ELSE STRREP (05, '212', 4, ' OR ', 2, ', ', 05, 'A05');
 -TYPE N/A
 N/A
 -EXIT



I assume 212, 05 and 06 are just "resolved" values for some &variables you have in your code, are they not?



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Expert
posted Hide Post
I assume that the values in this code are in fact variables, and this is a cut and paste of program output.

If so, then it would be better to see the code that generated it, and there the varables were coming from.


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
Guru
posted Hide Post
Here it is Waz...
 -SET &HEAD_FLD4= &v_zip_code;
-SET &HEAD_FLD_D4=STRREP (&v_zip_code.LENGTH, &v_zip_code, 4, ' OR ', 2, ', ', &v_zip_code.LENGTH, 'A&v_zip_code.LENGTH');
-SET &HEAD_FLD4=IF &HEAD_FLD4 EQ '_FOC_NULL' THEN 'ALL' ELSE STRIP(&HEAD_FLD4.LENGTH, &HEAD_FLD4, '''', 'A&HEAD_FLD4.LENGTH');
-SET &HEAD_FLD4=IF &HEAD_FLD4 EQ 'ALL' THEN 'ALL' ELSE IF &HEAD_FLD4.LENGTH LE 06 THEN &HEAD_FLD4.EVAL ELSE STRREP (&HEAD_FLD4.LENGTH, '&HEAD_FLD4.EVAL', 4, ' OR ', 2, ', ', &HEAD_FLD4.LENGTH, 'A&HEAD_FLD4.LENGTH');
-TYPE &HEAD_FLD4
-EXIT 


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
 
Posts: 394 | Location: Chennai | Registered: December 02, 2009Report This Post
Virtuoso
posted Hide Post
Ramkumar,

What is your expected output given '212' as the value for &v_zip_code.

I tested your code with that and I get the same value as an answer -> 212.

That seems consistent with
... IF &HEAD_FLD4.LENGTH LE 06 THEN &HEAD_FLD4.EVAL ...


212's length is 3 with is < 6 and therefore the answer is the parameter itself.

Which particular value of &v_zip_code is causing you trouble?

By the way, in the expression above, you can remove the .EVAL from there.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 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] SET Command # Weird Behaviour

Copyright © 1996-2020 Information Builders