Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SYSTABLES Ordered in ASCII Collating Sequence?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1746
Location: Bloomington, IL

PostPosted: Wed Dec 01, 2010 10:07 pm    Post subject: SYSTABLES Ordered in ASCII Collating Sequence?
Reply with quote

Apparently, when
Code:
SELECT * FROM SYSIBM.SYSTABLES
WHEN OWNER = 'authid'
ORDER BY NAME

is executed the rows are ordered in ASCII collating sequence (i.e., digits before alphas).

  1. Has anyone else noticed this?
  2. Does anyone know how long it has been the case?
  3. Can anything be done other than resorting the list? (There don't appear to be any documented features in the V9.1 SQL Reference.)
Back to top
View user's profile Send private message

GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Wed Dec 01, 2010 10:24 pm    Post subject:
Reply with quote

since V8 catalog is in Unicode
Back to top
View user's profile Send private message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 186
Location: chennai

PostPosted: Thu Dec 02, 2010 9:58 am    Post subject: Reply to: SYSTABLES Ordered in ASCII Collating Sequence?
Reply with quote

Hi Akatsukami

While executing your query in DB2 V8.1 I got the following result.
Can you say why I am getting this error please?

Code:
---------+---------+---------+---------+---------+---------+---------+---------+
  SELECT * FROM SYSIBM.SYSTABLES                                        00000199
  WHEN OWNER = 'DSRC023'                                                00000299
  ORDER BY NAME;                                                        00000399
---------+---------+---------+---------+---------+---------+---------+---------+
DSNT408I SQLCODE = -199, ERROR:  ILLEGAL USE OF KEYWORD WHEN.  TOKEN FOR WITH   
         FETCH ORDER UNION EXCEPT QUERYNO OPTIMIZE WAS EXPECTED                 
DSNT418I SQLSTATE   = 42601 SQLSTATE RETURN CODE                               
DSNT415I SQLERRP    = DSNHPARS SQL PROCEDURE DETECTING ERROR                   
DSNT416I SQLERRD    = 506  0  0  -1  75  0 SQL DIAGNOSTIC INFORMATION           
DSNT416I SQLERRD    = X'000001FA'  X'00000000'  X'00000000'  X'FFFFFFFF'       
         X'0000004B'  X'00000000' SQL DIAGNOSTIC INFORMATION                   


Thanks
Raghu
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Dec 02, 2010 10:10 am    Post subject:
Reply with quote

Hello,

Because you used copy/paste instead of cloning a query you have that runs successfully. . . icon_smile.gif

This SELECT requires a WHERE not a WHEN.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1746
Location: Bloomington, IL

PostPosted: Thu Dec 02, 2010 4:22 pm    Post subject:
Reply with quote

dick scherrer wrote:
Hello,

Because you used copy/paste instead of cloning a query you have that runs successfully. . . icon_smile.gif

This SELECT requires a WHERE not a WHEN.

You are correct icon_redface.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts EBCDIC to ASCII conversion using OCOPY mistah kurtz All Other Mainframe Topics 5 Tue Sep 06, 2016 2:26 pm
No new posts Sequence number add in SORT pshongal SYNCSORT 3 Fri Sep 02, 2016 3:32 pm
No new posts alphanumeric sequence generation sivaprasad.gadhi COBOL Programming 6 Wed Mar 30, 2016 3:03 am
No new posts alphanumeric sequence generation sivaprasad.gadhi DFSORT/ICETOOL 8 Mon Mar 21, 2016 1:09 am
No new posts How to display data in separate lines... salilnigam1970 DFSORT/ICETOOL 2 Tue Jan 26, 2016 9:49 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us