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     [SHARING] What do you think is the proper syntax for ECHO?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SHARING] What do you think is the proper syntax for ECHO?
 Login/Join
 
Guru
posted
From what I've been told dialogue manager variables are either integer data type or alphanumeric data type.

So, what does everyone think is the proper syntax for ECHO?

1) -SET &ECHO=ALL;
2) -SET &ECHO='ALL';

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


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report This Post
Expert
posted Hide Post
They both work and I've mostly used #1 but now am using #2, preparing for the day #1 is no longer valid.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
quote:
preparing for the day #1 is no longer valid


If that day comes many reporting environments will no doubtedly stop working and not only because of &ECHO but because of the fact that Dialog Manager treats "almost" anything as an alphanumeric value (even if not quoted) unless it looks like a number or is a reserved word.

Though I prefer using:
-IF &COUNTRY EQ 'ENGLAND' THEN ....


It's perfectly valid to say:
-IF &COUNTRY EQ ENGLAND THEN ....


I might have fallen on the latter a few times Wink so hopefully that day won't come ...



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
My rule of thumb:

Always use quotes around strings!


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
<JG>
posted
It's not a string. It's an option.

There is a subtle but distinct difference.

In a DEFINE or a COMPUTE

EQ fieldname is very, very different from EQ 'fieldname'

same rules apply

If any version will disappear it will be

-SET &ECHO='ALL';

for a very simple reason

the Specified syntax is
quote:

Syntax: How to Test and Debug a Procedure
{-DEFAULT|-SET|EX} &ECHO = {ON|ALL|OFF|NONE}


and njsden

while
-IF &COUNTRY EQ ENGLAND
might work
-IF &COUNTRY EQ W GERMANY
will definitely not

This message has been edited. Last edited by: <JG>,
 
Report This Post
Virtuoso
posted Hide Post
quote:
-IF &COUNTRY EQ W GERMANY
will definitely not

Certainly!



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
quote:
It's not a string. It's an option.


I think we would need someone from the programming division to answer this, as at what stage in the interpreting of the code does the test for the contents of the &ECHO variable start. I would have thought that it would be after the eval of the string to assign the variable, but I guess we will probably never know.


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
Virtuoso
posted Hide Post
&ECHO has been around forever, but if IBI had it to do over again, I would hope ECHO would join the ranks of the SET commands. SET is used to modify the environment and -SET is used to establish values for Dialogue Manager variables. SET specifies options, -SET specifies values. ECHO should be one of the former, not one of the latter. IBI had more time to consider the relatively new DMPRECISION command, which modifies the precision of Dialogue Manager numeric values. DMPRECISION is SET, not -SET. The proper syntax for ECHO should be SET ECHO = {ON/OFF/ALL/NONE}.

This message has been edited. Last edited by: Dan Satchell,


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Silver Member
posted Hide Post
quote:
The proper syntax for ECHO should be SET ECHO = {ON/OFF/ALL/NONE}.


Dan - you echoed my thoughts exactly. Smiler


WF 8.1.05 on Windows machines
Backend: Informix, SQL and Oracle databases
 
Posts: 37 | Location: Houston, Texas | Registered: May 01, 2008Report This Post
Expert
posted Hide Post
Food for thought / consider this:
-? &E
-RUN
-SET ECHO = ALL ;
-RUN
-? &E
Who needs the ampersand?

quote:
SET is used to modify the environment and -SET is used to establish values for Dialogue Manager variables. SET specifies options, -SET specifies values. ECHO should be one of the former, not one of the latter.
Well, maybe. However, -SET &ECHO = {whatever} displays the code and is needed to evaluate the flow of the code (in View Source, etc). So, it it really environmental in nature, or DM?
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
quote:
Who needs the ampersand?


The ampersand is inferred.

Good programming practice says you should add the &.


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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SHARING] What do you think is the proper syntax for ECHO?

Copyright © 1996-2020 Information Builders