MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Identifying whether Catalog information is in Unicode or not

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
jim haire
Beginner


Joined: 30 Dec 2002
Posts: 140
Topics: 40

PostPosted: Fri Jun 08, 2007 8:39 am    Post subject: Identifying whether Catalog information is in Unicode or not Reply with quote

I am in the middle of writing a REXX command which will identify the SQL statements in a program. I am looking at the SYSPACKSTMT as one source of this information. I provide the REXX command with the name of a program and it identifies the SQL.

In DB2 Version 8, the system catalog has been converted to Unicode. In order to read this, your SQL has to be written to convert it to EBCDIC. However, some of the rows on the SYSPACKSTMT table are already in EBCDIC while the "newer" rows are in Unicode.

My question is this:
Is there anywhere within the system catalog tables where it would indicate if the information for the program is in Unicode?

The reason I need to know this is if you try to convert it from Unicode to EBCDIC and it is not Unicode in the first place, a -330 is returned from the SQL.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12401
Topics: 75
Location: San Jose

PostPosted: Fri Jun 08, 2007 8:54 am    Post subject: Reply with quote

Jim,

Check this link which answers your question

http://www.idugdb2-l.org/adminscripts/wa.exe?A2=ind0611c&L=db2-l&T=0&I=-&P=9506

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jim haire
Beginner


Joined: 30 Dec 2002
Posts: 140
Topics: 40

PostPosted: Fri Jun 08, 2007 10:36 am    Post subject: Reply with quote

Thanks. I'll try this out and see if it helps identify which rows are Unicode.
Back to top
View user's profile Send private message
videlord
Beginner


Joined: 09 Dec 2004
Posts: 147
Topics: 19

PostPosted: Sun Jun 10, 2007 11:38 pm    Post subject: Reply with quote

No need to worry about the encode of the table in your application. You REXX can read the data no matter the table is stored in UNICODE or EBCDIC. It's the function of DB2 system. It will convert to right encode schema before return to applaiction.

Usually no changed of your REXX code if the table converted to UNICODE, only the SORT sequence will be changed.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group