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     force character string to go the next line

Read-Only Read-Only Topic
Go
Search
Notify
Tools
force character string to go the next line
 Login/Join
 
Member
posted
Hi everybody,

I am trying to set variable to a string value which is supposed to have two lines.
Here is what I've come up with:
 -SET &WHERE1 = 'WHERE SEASON EQ ''&SEASON1'' \n-REPEAT AFTERSEAS FOR &COUNTER FROM 2 TO &SEASON0; \nOR ''&|EASON.&COUNTER''';
 

So before I actually do the TABLE FILE request in a focexec, I set &WHERE1 to some code. Then in TABLE request I use .EVAL. The problem is that there is a DM command which as far as I know should be on a new line. So I need to force that string onto the next line.

\n does not work. I get 'computational element is not recognized' error.

Is there any other way? Is it at all possible? Am I trying nonsense? I've looked everywhere for the solution. Maybe my wording is wrong when I search.

Thanks,
Evgenia
 
Posts: 24 | Registered: April 19, 2006Report This Post
Virtuoso
posted Hide Post
I do remember using ascii code with the HEXBYT function for adding line breaks in the past, but I'm not to sure what all the values were.

As another option, why not do -WRITE commands and put the code into a text file, then include it in your table request? Something like:
  
FILEDEF TOUT DISK tout.fex
-RUN
-WRITE TOUT WHERE SEASON EQ ''&SEASON1'' 
-WRITE TOUT -REPEAT AFTERSEAS FOR &COUNTER FROM 2 TO &SEASON0;
-WRITE TOUT OR ''&|EASON.&COUNTER'''
-WRITE TOUT -AFTERSEAS


Or something to that effect.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Guru
posted Hide Post
The simplest thing would be to put each line into a separate amper var.

-SET &WHERE1 = 'WHERE SEASON EQ ''&SEASON1'' ' ;
-SET &WHERE2 = '-REPEAT AFTERSEAS FOR &|COUNTER FROM 2 TO &|SEASON0';
-SET &WHERE3 = 'OR ''&|SEASON.&COUNTER'' ';

Then use the .EVAL for each variable in your TABLE request.


ttfn, kp


Access to most releases from R52x, on multiple platforms.
 
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003Report This Post
Member
posted Hide Post
That's what I did, Piipster. It is the simplest but it is definitely not the most sofisticated one.

I will try to use -WRITE, dhagen.

Thank you, guys.
 
Posts: 24 | Registered: April 19, 2006Report This Post
Expert
posted Hide Post
Evgenia, dhagen's idea would work fine
Write out your entire WHERE condition onto a 2line external file, filedef'd to your agent,
and then -INCLUDE it.
In dhagen's example, the file tout.fex has been made in the agent, so
-INCLUDE TOUT
would work like a charm.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report 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     force character string to go the next line

Copyright © 1996-2020 Information Builders