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] sorting 101. table file cars does not sort correctly?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] sorting 101. table file cars does not sort correctly?
 Login/Join
 
Member
posted
Focus 101 sorting. Here is my code
TABLE FILE CAR
PRINT COUNTRY CAR MODEL BODYTYPE LENGTH
BY LENGTH
BY BODYTYPE
END

This is a simple program, but on the seventh and eighth line, why does SEDAN appear before COUPE? 'C' comes before 'S'.

PAGE 1
LENGTH BODYTYPE COUNTRY CAR MODEL BODYTYPE LENGTH
163 SEDAN JAPAN DATSUN B210 2 DOOR AUTO SEDAN 163
163 COUPE ITALY ALFA ROMEO 2000 GT VELOCE COUPE 163
165 HARDTOP ENGLAND TRIUMPH TR7 HARDTOP 165
165 SEDAN JAPAN TOYOTA COROLLA 4 DOOR DIX AUTO SEDAN 165
170 ROADSTER ITALY ALFA ROMEO 2000 SPIDER VELOCE ROADSTER 170
176 SEDAN W GERMANY BMW 2002 2 DOOR SEDAN 176
W GERMANY BMW 2002 2 DOOR AUTO SEDAN 176
177 SEDAN ITALY ALFA ROMEO 2000 4 DOOR BERLINA SEDAN 177
177 COUPE ITALY MASERATI DORA 2 DOOR COUPE 177
182 SEDAN FRANCE PEUGEOT 504 4 DOOR SEDAN 182
187 SEDAN W GERMANY AUDI 100 LS 2 DOOR AUTO SEDAN 187

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


WebFocus 8201M
Windows
Excel
 
Posts: 3 | Registered: December 19, 2017Report This Post
Virtuoso
posted Hide Post
Hi Jrbrown00

First of all welcome to Focal Point, it is a great forum to get answers to your development questions...

The only thing I can figure is that the CAR database is hierarchical and the LENGTH field is in a child segment of the BODYTYPE field. When I changed your report to SEATS instead of LENGTH it sorted as you would expect and that field is in the same segment as BODYTYPE. If I used any of the other fields under the SPECS segment it does sort weird.

Anyone else have an explantion for this?


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
Platinum Member
posted Hide Post
Not sure that's it Chuck. Sorting worked just fine when I use FUEL_CAP, RPM, MPG, or BHP from the SPECS, but not for Length or Width. This is interesting behavior. Perhaps in the background length and width are indexed differently?


JC
WebFOCUS Dev Studio / App Studio
8.2.01
Windows 7
 
Posts: 146 | Registered: November 09, 2015Report This Post
Virtuoso
posted Hide Post
CAR is a multi-Seg FOCUS file. I don't know for sure but could it have something to do with the fact that BODYTYPE is in a higher segment than LENGTH in the master file?


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Expert
posted Hide Post
Try this:

TABLE FILE CAR
PRINT COUNTRY CAR MODEL BODYTYPE LENGTH/P8.2
BY LENGTH 
BY BODYTYPE
END


You will be surprised Smiler


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
Very interesting the value for length is larger because of the decimal value and therefore is sorting correctly...


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
Platinum Member
posted Hide Post
quote:
LENGTH/P8.2


LOL, I was going to try that, but thought nah and decided to move onto something else.


JC
WebFOCUS Dev Studio / App Studio
8.2.01
Windows 7
 
Posts: 146 | Registered: November 09, 2015Report This Post
Expert
posted Hide Post
quote:
nah

I'm a stickler for punishment.


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
  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] sorting 101. table file cars does not sort correctly?

Copyright © 1996-2020 Information Builders