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     [SOLVED] Break code in many lines

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Break code in many lines
 Login/Join
 
Platinum Member
posted
How can I break my code in many lines ? If I put all in one line, it will be so long.
Ex :
 
-SET &PARAM = IF ..... THEN ..... ELSE IF .... THEN... ELSE...;
I want to break it like:
-SET &PARAM = IF ..... THEN......
 ELSE IF .... THEN... 
 ELSE...;
Thanks in advance 

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


WebFOCUS 7.7.03
Windows, All Outputs
 
Posts: 125 | Registered: June 17, 2013Report This Post
Expert
posted Hide Post
With Dialog Manager, you can extend the line over multiple lines by starting the line with a -.

e.g.

-SET &PARAM = IF ..... THEN......
- ELSE IF .... THEN... 
- ELSE...;


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
Platinum Member
posted Hide Post
Dialog manager statements can span multiple lines, but all lines have to start with a "-"

Here is an example ..

-SET &V_POL = IF &V_POL EQ ' ' THEN 'zzzzzz'
-ELSE IF &V_POL.LENGTH EQ 1 THEN EDIT(&V_POL,'000009')
-ELSE IF &V_POL.LENGTH EQ 2 THEN EDIT(&V_POL,'000099')
-ELSE IF &V_POL.LENGTH EQ 3 THEN EDIT(&V_POL,'000999')
-ELSE IF &V_POL.LENGTH EQ 4 THEN EDIT(&V_POL,'009999')
-ELSE IF &V_POL.LENGTH EQ 5 THEN EDIT(&V_POL,'099999')
-ELSE EDIT(&V_POL,'999999');

Hope this helps.


WebFocus 8.201M, Windows, App Studio
 
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008Report This Post
Master
posted Hide Post
...except for

-PROMPT


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Master
posted Hide Post
A further tip: As someone pointed out in a recent discussion, as long as the dash is in the leftmost position, the text can be indented, except for the -SET itself.

So the following is acceptable:
-SET &SKYCOLOUR=IF &IS_SUNNY THEN 'BLUE'
-ELSE IF &IS_RAINING THEN 'GREY'
-        ELSE 'PARTLY CLOUDY';


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Virtuoso
posted Hide Post
Also,on the subsequent lines, it is advisable to leave a space after the -
-SET &SKYCOLOUR=IF &IS_SUNNY THEN 'BLUE'
- ELSE IF &IS_RAINING THEN 'GREY'
-        ELSE 'PARTLY CLOUDY';


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Platinum Member
posted Hide Post
Thanks. It works. I don't know why it didn't work at the first time I did it. Maybe I did something wrong.


WebFOCUS 7.7.03
Windows, All Outputs
 
Posts: 125 | Registered: June 17, 2013Report 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     [SOLVED] Break code in many lines

Copyright © 1996-2020 Information Builders