Need EBCDIC sort order in Sybase

Need EBCDIC sort order in Sybase

Post by Jean Poir » Wed, 11 Sep 1996 04:00:00



Hi, =

My software feeds Sybase tables from files generated by IBM mainframes;
i.e. the files are in EBCDIC and sorted according to EBCDIC sort order.
I need to be able to retreive data in the same order; so my question is:
 =

Is there a way in Sybase to get the queries I send to the server to
return to me the data in EBCDIC order? =

Regards, =

Jean
 =

******************************************************************
 Jean Poir=E9, eng.
 Croesus, Portfolio Management System =

 Unigiciel Inc.             Tel.: 514-662-6101
 1 Place Laval, Bureau 410  Fax.: 514-662-3629
 Laval (QUEBEC)
 CANADA

******************************************************************

 
 
 

Need EBCDIC sort order in Sybase

Post by Randy Jord » Thu, 12 Sep 1996 04:00:00


Quote:> My software feeds Sybase tables from files generated by IBM mainframes;
> i.e. the files are in EBCDIC and sorted according to EBCDIC sort order.
> I need to be able to retreive data in the same order; so my question is:

How did you get EBCDIC loaded into a ASCII database? But if you did load
it as varbinary data, setting the database to the default 'binary'
sort order should produce the desired results.

We too load IBM tapes, but first we 'dd' them off, then convert the
36 bit numeric data to 32 bit numeric with 'c' translations. Then load
ASCII data.

RJ

------------------------------------------------------------------------
Randy Jordan                                 Senior Systems Analyst
                                             SRI International
(408) 735-1175                               (415) 859-4625

                                             http://mis.sri.com/rjordan/
------------------------------------------------------------------------

 
 
 

Need EBCDIC sort order in Sybase

Post by Jean Poir » Fri, 13 Sep 1996 04:00:00



> =
> > My software feeds Sybase tables from files generated by IBM mainframes;=
> > i.e. the files are in EBCDIC and sorted according to EBCDIC sort order.=
> > I need to be able to retreive data in the same order; so my question is=
:
> =
> How did you get EBCDIC loaded into a ASCII database? But if you did load
> it as varbinary data, setting the database to the default 'binary'
> sort order should produce the desired results.
> =
> We too load IBM tapes, but first we 'dd' them off, then convert the
> 36 bit numeric data to 32 bit numeric with 'c' translations. Then load
> ASCII data.
> =
> RJ
> =
> =

Maybe I was not clear enough in my first message: Here are the details:

What my program does is read files generated by IBM mainframes using the
UFF format. The file contains, for example, the transactions of the day
for a brokerage firm. My program has to read the file record by record,
find if the account for a given transaction is in the database and if so
create a new record in a Sybase table in ASCII.(I don't keep EBCDIC data
in the Sybase database).

My problem resides in the fact that since the file I read was generated
in EBCDIC, the data inside is sorted using EBCDIC order (lowercase
letters then uppercase letters and then digits). This is different than
the ASCII sort order( digits are first). I am not able to make a query
that would return the rows in the same order that they are in the EBCDIC
file. =

What I really want to know is if there is a way to change the Sybase
setup ( maybe by changing the default language or by adding a
localisation sort file (xxx.srt) to the current language) so that when I
request data from the server, it returns it to me sorted the same way
the file I read (i.e. lowercase-uppercase-digits).

Regards, =

******************************************************************
 Jean Poir=E9, eng.
 Croesus, Portfolio Management System =

 Unigiciel Inc.             Tel.: 514-662-6101
 1 Place Laval, Bureau 410  Fax.: 514-662-3629
 Laval (QUEBEC)
 CANADA

******************************************************************

 
 
 

Need EBCDIC sort order in Sybase

Post by Peter Walke » Fri, 13 Sep 1996 04:00:00



> > My software feeds Sybase tables from files generated by IBM mainframes;
> > i.e. the files are in EBCDIC and sorted according to EBCDIC sort order.
> > I need to be able to retreive data in the same order; so my question is:

> How did you get EBCDIC loaded into a ASCII database? But if you did load
> it as varbinary data, setting the database to the default 'binary'
> sort order should produce the desired results.

I think the idea is that the characters themselves have been translated
to ASCII before the table was loaded. The problem is that if you do a
"select * from t1 order by charfield" then you will get the data back in
the Sybase (ASCII) sort order. If you did the same thing on the IBM then
you would get the data back in EBCDIC order.

If there is a simple solution then I would like to hear about it as well.

Cheers,

Pete.

 
 
 

Need EBCDIC sort order in Sybase

Post by patterson_bil.. » Sat, 14 Sep 1996 04:00:00


There are far more utilities/languages for mainframes than for
client/server, and in many cases I know of (SAS, Syncsort, PL/1, etc),
you can specify an ASCII sort rather than an EBCDIC sort.  Why not sort
in ASCII order on the mainframe?  Just an idea. . .
Billie

 
 
 

1. sort order errors: EBCDIC data from DB2

I'm trying to build a clustered index on a table that has been loaded
using bcp with a file extracted from a DB2 table on MVS. I'm using the
"with sorted data" option and discovered that my data wasn't sorted quite
good enuf. After sifting through my 5 million rows for the offending 144,
I determined that the problem was that in EBCDIC A < 1, while in ASCII A > 1.

The System/370 guru next door says there's a way to "modify the collating
sequence" (?!#%...transmission possibly garbled here) when generating the file
in a COBOL module....aaarrgghhhhhhhhh

What I'd like to know is if anyone out there has dealt with this problem and
knows the trick that will keep this poor Unix programmer off the mainframe.
Your charity will be greatly appreciated. Sybase doc promises great rewards
from "with sorted data" if it really is.

Thanks in advance,
--
chris cross

2. help for compiling libpq sample program

3. Converting a database from dictionary case insensitive sort order to binary sort order

4. SP Union SP?

5. Dbase for stamps?

6. SQL Server 2000: Full-Text Search Chat

7. Oracle sort order on HP-UX versur Windows sort order

8. EBCDIC Sorting

9. differences in sort orders sybase - oracle