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] How to make alpha items appear in a list before numeric items

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] How to make alpha items appear in a list before numeric items
 Login/Join
 
Gold member
posted
I have a list of items, that are both alpha and numeric. By default the alpha items appear last in the list. How can I have them appear before the numeric items.

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


WebFOCUS 7.6.2, MS Windows Server/______, Excel, PDF, HTML
 
Posts: 91 | Registered: May 15, 2008Report This Post
Expert
posted Hide Post
You can set a variable (&AlfNum = IF ... THEN ... ELSE ...) or field (AlfNum/A1 = IF ... THEN ... ELSE ...) to check for alpha / numberic and sort (NOPRINT) on that first.

What's your source (TABLE or DM)? Can you provide a sample?
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Guru
posted Hide Post
Have you tried changing the sequencing to Descending order?
/* BY feild DESC
*/


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Report This Post
Virtuoso
posted Hide Post
So you want your reports' sort sequence to resemble EBCDIC collation sequence.

It should be sufficient to group the values according to the first character, and allow ASCII order to take it from there. Just DEFINE:
 myInit/A1 = EDIT(myField,'9');
 mySort/A1= IF myInit GE '0' AND myInit LE '9' THEN 'A'
       ELSE IF myInit GE 'A' AND myInit LE 'Z' THEN '0'
       ELSE IF myInit GE 'a' AND myInit LE 'z' THEN '0'
       ELSE myInit;
and sort your report
BY mySort NOPRINT
BY myField


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
I would use Doug's idea. In this example, I isolate the first character of MODEL and determine if it's alpha or numeric:

DEFINE FILE CAR
MODEL1/A1 = SUBSTR(20, MODEL, 1, 1, 1, 'A1');
ALPHA_NUM/A1 = IF CHKFMT(1, MODEL1, '9', 'I6') EQ 0 THEN 'N' ELSE 'A';
END

TABLE FILE CAR
SUM
SALES
BY ALPHA_NUM NOPRINT
BY MODEL
END


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
If you want to have this sort sequence permanently on your system, this can be achieved by following this document


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Gold member
posted Hide Post
Doug and Francis's solution worked perfect. Thanks to all of you. This forum is really great and you guys ROCK!!!!!


WebFOCUS 7.6.2, MS Windows Server/______, Excel, PDF, HTML
 
Posts: 91 | Registered: May 15, 2008Report This Post
Gold member
posted Hide Post
Thanks for the docs Alan, didn't know that could be done.


WebFOCUS 7.6.2, MS Windows Server/______, Excel, PDF, HTML
 
Posts: 91 | Registered: May 15, 2008Report 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] How to make alpha items appear in a list before numeric items

Copyright © 1996-2020 Information Builders