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] selecting a character in a field

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] selecting a character in a field
 Login/Join
 
Member
posted
I am rather new to WebFocus, and I am sure there is a easy way to do this, but I am having a problem figuring this out. I only want to report a field when the second character in the field equals the letter "B".

My thought would be to create a define statemnet that reports the second letter of the field - but can't figure out how to get the define statement to only report the second position. Then I figure in my where clause I would just select the define statement when it equals B.

Thanks for your help.

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


7.64, Windows, Excel
 
Posts: 6 | Registered: September 24, 2008Report This Post
Expert
posted Hide Post
You can use the EDIT MASK feature:
DEFINE FILE CAR
COUNTRY2/A1=EDIT(COUNTRY,'$9');
END
TABLE FILE CAR
PRINT 
SALES
BY COUNTRY
WHERE COUNTRY2 EQ 'N'
END


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Member
posted Hide Post
Wow - that was easy. I thought Edit could only be used with Compute. Thank You!


7.64, Windows, Excel
 
Posts: 6 | Registered: September 24, 2008Report This Post
Virtuoso
posted Hide Post
Roxanna,

Paraphrasing Cyrano de Bergerac, here are a few variations:

If you are already using the WHERE command (as opposed to IF) you can do away with the DEFINE and write:
  
TABLE FILE CAR
PRINT 
SALES
BY COUNTRY
WHERE EDIT(COUNTRY,'$9') EQ 'N'
END


You can also use a mask in the WHERE command:
  
TABLE FILE CAR
PRINT 
SALES
BY COUNTRY
WHERE COUNTRY LIKE '_N%'
END


or, with the good old IF
  
TABLE FILE CAR
PRINT 
SALES
BY COUNTRY
IF COUNTRY EQ '$N$*'
END


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
Cyrano writing to Roxanna.
My God, this Forum is not for geeks only.
So many thanks, my day is enlightenned
F and C
PS : "C'était donc vous" from Roxanna to Dying Cyrano is admirable.


Focus Mainframe 7.6.11
Dev Studio 7.6.11 and !!!
PC Focus, Focus for OS/2, FFW Six, MSO
 
Posts: 134 | Registered: November 06, 2007Report This Post
Virtuoso
posted Hide Post
yes, but before that:
"et le samedi 26, une heure avant diner
monsieur de bergerac est mort, assassine"

[sorry no acents on my english keyboard]


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
  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] selecting a character in a field

Copyright © 1996-2020 Information Builders