Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] every 3 token i want to display the data from starting of string to 3 token
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] every 3 token i want to display the data from starting of string to 3 token
 Login/Join
 
Gold member
posted
Hi

i have a scenario like, on every 3 token(space) i want to display the data from starting first position of a string to still 3 token(space) of string.
when I use GETTOK , it will extract the data from 2 token to 3 token(space) data ,

extract each token and contacting the data i can do ,(my scenario i have to 20 token )


any idea apart from contacting the data

Input Data
APPLIED METHODS IN MKTG RESEARCH
APPLIED PRODUCT/MARKET MANAGEMENT
BUSINESS TO BUSINESS MKTG STRATEGY
CHANGING ROLE OF EX SEC & ADM ASST
CORPORATE FINANCIAL MANAGEMENT


my expected output should be below
Output Data
APPLIED METHODS IN
APPLIED PRODUCT/MARKET MANAGEMENT
BUSINESS TO BUSINESS
CHANGING ROLE OF
CORPORATE FINANCIAL MANAGEMENT





DEFINE FILE COURSE
CTITLE1/A100V = GETTOK(CTITLE, 30, 3,' ', 100, CTITLE1);
CTITLE2/A100V = IF CTITLE1 EQ '' THEN CTITLE ELSE CTITLE1;

END

TABLE FILE COURSE
PRINT DST.CTITLE CTITLE2
END


i appreciate your help in advance

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8202
 
Posts: 57 | Location: India | Registered: March 24, 2014Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Note : always use the code tag when posting sample data and code
It's the last icon on the ribbon that looks like the below
</>


Don't know if I'm the only one, but your request is not clear for me.

Even based on your sample data (except for the second line, that since you only have 2 token in that row where you are looking for the third one in your DEFINE) the Output data seems to be good as per your sample code

How different, than your sample data, you want to contract the data ?

You should better give a complete sample of input data and desired output data


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2189 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Master
posted Hide Post
Sounds like your requirement is to pull the first three tokens from a space delimited string, and then display them together within a report.

DEFINE FILE COURSE
 TOKEN1/A35 = TOKEN(COURSE, ' ', 1);
 TOKEN2/A35 = TOKEN(COURSE, ' ', 2);
 TOKEN3/A35 = TOKEN(COURSE, ' ', 3);
 NEW_COURSE/A105 = TOKEN1 | TOKEN2 | TOKEN3;
END
-*
TABLE FILE COURSE
PRINT COURSE AS 'COURSE' 
      NEW_COURSE
IF RECORDLIMIT EQ 5
END  

COURSE                             NEW_COURSE 
------                             ----------
HOW TO WRITE USERS MANUAL          HOW TO WRITE 
BUSINESS TO BUSINESS MKTG STRATEGY BUSINESS TO BUSINESS 
INTERVIEWING: A STRATEGIC APPROACH INTERVIEWING: A STRATEGIC 
EXECUTIVE COMMUNICATION            EXECUTIVE COMMUNICATION 
NEGOT AND ADMIN THE LABOR CONTRACT NEGOT AND ADMIN   

This message has been edited. Last edited by: David Briars,




Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2012/Tomcat Standalone Workstation: Windows 7/IE 11 Database: Oracle 12c/Netezza Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer, & ReportCaster

 
Posts: 765 | Registered: April 23, 2003Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Sounds like this link can be useful.

http://forums.informationbuild...1057331/m/7297005086


WebFOCUS 7.X.X, 8.X.X
Windows, All Outputs
 
Posts: 81 | Registered: February 02, 2016Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] every 3 token i want to display the data from starting of string to 3 token

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.