× 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.



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.



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.