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     Need to Extract a text string that varies, from a variable string

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Need to Extract a text string that varies, from a variable string
 Login/Join
 
Silver Member
posted
I work at a bank and telephone calls and emails are sent to work queues awaiting some technician to take ownership of the Help Desk ticket. Now for the problem-- I have a database filed named "Work Description" and within this field I'm only concerned with extracting the "TO" queue information. For example the following work description "from WIP Dispatched to Queue DFW - PACE.", I'm only interested in extracting "DFW - PACE" nothing else and within work description "from WIP C E No to Queue DFW - Staffware Suppt." I'm only interested in extracting "DFW - Staffware Suppt". Thus I'm only interested in anything that follows "to Queue " and excludes the ending period(".").

I've been trying various verbs (i.e. Gettok, Posit etc...) with no success. Is there any one out there that can lead me in the correct direction? Thanks a million!
 
Posts: 31 | Registered: November 17, 2005Report This Post
Expert
posted Hide Post
Dennis, POSIT will very definitely work, in combination with SUBSTR function.
POSIT , where the string you're searching for is 'to Queue', would give you the integer 21, the position of the 't' in your example.
and then SUBSTR will extract the substring of the inbound string starting with postion 30, or the value of POSIT + 9 (the length of 'to Queue ')




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
Virtuoso
posted Hide Post
You would probably have to use POSIT to get the position of the period as well as it can be in a variable spot depending on length of the queue name. Then calculate the sublength (end - (start+9)) and use it in SUBSTR
SUBSTR(inlength, parent, start, end, sublength, outfield)


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Virtuoso
posted Hide Post
Susannah and Darin are correct in one approach, but there are always multiple choices:
inField/A100 = 'from WIP Dispatched to Queue DFW - PACE.';
shortString/A100 = GETTOK(STRREP(100,inField,9,'to Queue ',1,'%',100,'A100'),ARGLEN(100,inField,'I3')-9,-1,'%',100,'A100');


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report 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     Need to Extract a text string that varies, from a variable string

Copyright © 1996-2020 Information Builders