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     Line Continuation in dialog manager & FML

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Line Continuation in dialog manager & FML
 Login/Join
 
Silver Member
posted
Is there a way to use line continuation on a FML statement? I have a really long line and would like wrap it, but I cannot figure out how to insert a continuation character?
 
Posts: 31 | Location: Denver | Registered: April 11, 2005Report This Post
Expert
posted Hide Post
Matthew,

Your topic line suggests both Dialogue Manager and FML, is this correct? or is it just FML you are having problems extending the line on?

Just in case it's both -

DM - just start the continuation line with a 'hyphen' / 'dash' call it what you will.

FML - Within the styling, this isn't a problem as it's the same as basic TABLE and GRAPH

Otherwise just continue it onto the next line just making sure you have the required number of "OVER"s.

To use an old favorite example -

TABLE FILE CAR
SUM RETAIL_COST
DEALER_COST
ACROSS COUNTRY
FOR CAR
'JENSEN' OR 'ALFA ROMEO' AS 'Performance Cars'
OVER
'PEUGEOT' OR
'DATSUN'
OR 'AUDI' AS 'Old Favorites'
OVER
'BMW' OR 'TRIUMPH'
AS 'Boy Racers'
END

As you can see the lines are split across many lines and require no continuation character.

I hasten to add that I don't like this example as I prefer neat, maintainable code, but the above is just to show you can achieve many lines for a single FML control line.

Enjoy .......
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Silver Member
posted Hide Post
Thanks. I did get the FML to
work as you described. But I stil
cannot get DM to act as you
described. An example line of code
is below:
COMPUTE CP_ACT/D8CB = IF 
((MRDATE GE &C_A_A_B AND MRDATE 
LE &C_A_A_E) AND 
(DATATYPE_PARENT EQ 'ACTUALS' 
OR 'NORM_FP&|A')) OR 
((MRDATE GE &C_A_E_B AND MRDATE 
LE &C_A_E_E) AND DATATYPE_PARENT EQ 'FORECAST_FUTURE') THEN REVENUE_
AMOUNT / 1000 ELSE 0;  
As you can see it is
long and I would like to break it up. When
I break it of the middle 'or'
and add a '-' at the begginning
of the second line like this
COMPUTE CP_ACT/D8CB = IF 
((MRDATE GE &C_A_A_B AND MRDATE 
LE &C_A_A_E) AND (DATATYPE_PARENT EQ 'ACTUALS' OR 'NORM_FP&|A')) 
-OR ((MRDATE GE &C_A_E_B AND MRDATE 
LE &C_A_E_E) AND DATATYPE_PARENT EQ 'FORECAST_FUTURE') 
THEN REVENUE_AMOUNT / 1000 ELSE 0;
I get an error saying
"0 ERROR AT OR NEAR LINE
35 IN PROCEDURE Test FOCEXEC
(FOC303) CONTROL L
INE NOT RECOGNIZED IN FOCEXEC:
What am I doing wrong?

This message has been edited. Last edited by: <Mabel>,
 
Posts: 31 | Location: Denver | Registered: April 11, 2005Report This Post
Expert
posted Hide Post
Matthew,

COMPUTE is not dialogue manager.

Have you always been using a hyphen to continue COMPUTE lines? If you have then no wonder they give an error.

I am not aware of any restrictions to using the COMPUTE over a couple of lines as in -

TABLE FILE GGSALES
SUM UNITS
DOLLARS
COMPUTE DIFF/D12.2 =
DOLLARS - UNITS ; AS 'DIFFERENCE'
BY CATEGORY SUBTOTAL
BY PRODUCT
BY REGION SUBTOTAL
BY ST
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
COMPUTE is Focus, not Dialog Manager. Really two separate languages, interspersed in the fex. Any line with - in column 1 (or blank in 1 and - in 2) is interpreted as a DM statement; anything else is FOCUS.

Your FOC303 is because the line does not make sense as a DM statement. Take out the - and you're ok.

By the way, if you ever have to break an arithmetic expression (in COMPUTE or DEFINE) just before a minus sign, make sure to indent two columns on the next line, or you'll earn another FOC303.
 
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     Line Continuation in dialog manager &amp; FML

Copyright © 1996-2020 Information Builders