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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
MVS 7.1.1 sort
 Login/Join
 
Platinum Member
posted
I need to sort the data in the following way:

1ABL099
ABC1099

I do not want to do it the hard way of placing either a 0 or 1 in front of each character then sorting.

Does anyone have another idea?

Thanks,


dksib
DC Tech Services Inc
WF 8.2.1M
 
Posts: 117 | Location: US | Registered: February 09, 2004Report This Post
<RickW>
posted
How about defining a new field by converting the alpha to hex and sorting by the hex field. UFMT function does that but not sure if that's on the mainframe.
 
Report This Post
Guru
posted Hide Post
Hi David... In your example is it the numbers before letters that you are trying to do? Or, is it ABL before ABC?

For sorting in MVS and VM the sequence is a-z, A-Z, 0-9 for alphanumeric fields;
0-9 for numeric fields. In UNIX® and Windows NT® the sequence is 0-9, A-Z, a-z for
alphanumeric fields; 0-9 for numeric.

It's basically the difference between EBCDIC and ASCII.

You don't have much choice. Either create a new field to sort on or use BY fldname ROWS value over value.


ttfn, kp


Access to most releases from R52x, on multiple platforms.
 
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003Report This Post
Master
posted Hide Post
Hi David,

Try sorting using SyncSort, after creating your file in FOCUS.

SyncSort can convert your text from EBCDIC to ASCII, before sorting.

You will need to use the 'AC' data format, in your sort card.

For example, the following code and data file:

 //S1  EXEC SORT
 //SORT10.SYSIN   DD *
   SORT FIELDS=(1,07,AC,A)
 /*
 //SORT10.SORTIN  DD *
 1ABL099
 ABC1099
 2ABL099
 BBC1099
 /*
 //SORT10.SORTOUT DD SYSOUT=*  


Yields the following output:

  
 1ABL099
 2ABL099
 ABC1099
 BBC1099


Regards,
Dave




Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
 
Posts: 822 | Registered: April 23, 2003Report This Post
Platinum Member
posted Hide Post
A little trick... Custom sort using FML:

-* Field definition for testing purposes.
DEFINE FILE CAR
  MYFIELD/A10 = DECODE COUNTRY (
      'ENGLAND'   'ABC1099'
      'FRANCE'    '1ABL099'
      'ITALY'     'ZQWERTY'
      'JAPAN'     'ASDFG'
      'W GERMANY' '0ASDF'
    ELSE 'XXX') ;
END

-* Report.
TABLE FILE CAR
  SUM SALES

-* Custom sort.
  FOR MYFIELD NOPRINT
    '0' TO '9999999999' WHEN EXISTS OVER
    'A' TO 'ZZZZZZZZZZ' WHEN EXISTS

  BY MYFIELD
END


Regards,
Mikel


WebFOCUS 8.1.05, 8.2.01
 
Posts: 173 | Location: Madrid, Spain | Registered: May 09, 2003Report This Post
Gold member
posted Hide Post
Hello:

I have a problem that may be along these same lines:

I have a report initially displayed by part number. The part number displays sorted by:
a-z
A-Z
0-9

I added column sorts so the user can sort any column, including the part number field if they want to go back to the report sorted by part number. But using the column sorts, orders the report:
0-9
A-Z
a-z

and doesn't match the original display. I'm not sure why, since the report just reruns itself using the opposite of what was ran previously (HIGHEST or LOWEST). This way, re-clicking a column will sort the column in opposite order.

How can I get the original display to equal the column sorts or vice versa?
Will using the tips above accomplish this as well?

Thanks,
Tim
 
Posts: 57 | Registered: February 24, 2004Report This Post
Platinum Member
posted Hide Post
The original report appears to be a sort using an EBCDIC character set most likely from an IBM mainframe. The data is first sorted and then downloaded and converted to an ASCII character set. Resorting is now being done on the ASCII character set. Numbers are first with ASCII and are last with EBCDIC.


FOCUS 7.6 MVS PDF,HTML,EXCEL
 
Posts: 115 | Location: Chicago, IL | Registered: May 28, 2004Report This Post
Gold member
posted Hide Post
ET:

Thank you for the response. This is exactly what happened. I added a sort on Part Number to my HOLD file, so it gets sorted before I do my report. This gives me a uniform sort now and didn't seem to affect my performance at all.

Thanks,
Tim
 
Posts: 57 | Registered: February 24, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders