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] Extraction string before special character (slash)

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Extraction string before special character (slash)
 Login/Join
 
Member
posted
Hello,
I 'm looking forward to extract the string before special character (slash)
Example : adF/France SAS
222/ kidle

  • adF/France SAS
  • 222/ kidle

    I would like only =>
    adf
    222

    WF V8.2

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


    WebFocus V8.2.03M
  •  
    Posts: 12 | Registered: April 09, 2019Report This Post
    Guru
    posted Hide Post
    -SET &PARAM = 'adF/France SAS';
    -SET &FIRSTTOKEN = TOKEN(&PARAM.QUOTEDSTRING,'/',1);
    -TYPE &FIRSTTOKEN  


    Test: WF 8.2
    Prod: WF 8.2
    DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
     
    Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
    Virtuoso
    posted Hide Post
    Hi Guilaine

    Welcome to Focal Point I think you will find it an excellent forum for getting answers to your development questions..

    Frans example shows how to do this based on the value being in a parameter. It can also be done when the values are in a database field by using the DEFINE of the new field and using the TOKEN function and referencing the field with the slash.


    DEFINE FILE whatever
    NOSLASH/A10=TOKEN(SLASH_FIELD,'/',1);
    END


    Thank you for using Focal Point!

    Chuck Wolff - Focal Point Moderator
    WebFOCUS 7x and 8x, Windows, Linux All output Formats
     
    Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
    Gold member
    posted Hide Post
    Try the function GETTOK ;

    GETTOK(source_string, inlen, token_number, 'delim', outlen, output)


    WebFOCUS 8
    Windows, All Outputs
     
    Posts: 70 | Registered: May 26, 2017Report This Post
    Expert
    posted Hide Post
    Hi Guilaine,

    I would strongly suggest you check out the documentation on Functions.


    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
    Member
    posted Hide Post
    Thank you everybody. with Fonction TOKEN : It's Good. Smiler


    WebFocus V8.2.03M
     
    Posts: 12 | Registered: April 09, 2019Report 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] Extraction string before special character (slash)

    Copyright © 1996-2020 Information Builders