× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



You can control sort sequence by STRSEQ parameter, available for job and
also when you compile programs with embedded SQL.
You can create sort sequence table, which can have all kinds of special
sorting rules you want.
There are instructions for sort sequence table somewhere in Information
Center.
It should be pretty easy to create a table to sort numerics before letters.

    Alexei Pytel





                    Angela Wawrzaszek
                    <awawrzaszek@nucora       To:     
"'midrange-l@midrange.com'"
                    uburn.com>                 <midrange-l@midrange.com>
                    Sent by:                  cc:
                    midrange-l-admin@mi       Subject:     RE: sorting
                    drange.com


                    10/29/2001 02:19 PM
                    Please respond to
                    midrange-l





No the sql server we send the file to is used by 5 other companies all
pushing data to the same files.  Then their application to push it to the
web is built over that.  To have them change their logic is not an option.
Plus for the fact that to make a tiny change they charge a huge amont of
money,  I am sure they will consider a change to a database and sort
astinomical!!   There fore we will have to change it on our end as far as
trying to recode out sizes to not use numbers,  that way it will display
nicely for us and once it gets to the sql server.


Angela Wawrzaszek
Nucor Steel Auburn
IT Department


-----Original Message-----
From: David.X.Kahn@gsk.com [mailto:David.X.Kahn@gsk.com]
Sent: Monday, October 29, 2001 9:56 AM
To: midrange-l@midrange.com
Subject: RE: sorting


Angela wrote:

> But when we push it over to sql since the sort is not the same we
> now have something that is say 3" x3" (code = A1)  displaying before
> the 1" X 1" (code = AA) because of the difference in the sort.

Long shot, but would it be possible to include an extra field on the file
that goes to the SQL server and allow them to sort on that? As the text
field is only 2 positions this will resolve to unsigned binary numbers from
49601 (AA) to 59897 (Z9). Say the name of the text field is "CODE" the
following RPG/400 data structure will return the numeric value of the code.

     I I            0                     B   1   20CODEH
     I                                        3   4 CODE
     I                                    B   1   40CODEN

The initialised field CODEH is required to pad the numeric code to 4 byte
binary. 2 byte binary is not sufficient because the high order bit would be
set giving you negative numbers. The field CODEN will contain the numeric
value of CODE.

Assume the field you add to the file is SRTVAL and is zoned 5,0. Before
sending the file you make a single pass of it updating each record after
executing the statement:

     C                     Z-ADDCODEN     SRTVAL

If they sort on SRTVAL they will get the same collating sequence of CODE
that you have on the 400.

Dave...

"Achilles only had an Achilles' heel; I have a whole Achilles' body." -
Woody Allen

=======================================================
The opinions expressed in this communication are my own and do not
necessarily reflect those of my employer.

_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.







As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.