473,795 Members | 2,391 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Where can I find the source of structured type?

Greetings,

I was able to create the structured type:

CREATE TYPE address_t AS
( street char(30),
city char(15),
state char(10),
postcode smallint )
MODE DB2SQL;
Where can I find the source of the above?

I could not locate its source from any of these system tables:
syscat.datatype s, syscat.transfor ms and sysibm.user_def ined_types.

This is on W2K, DB2 V8.2

Thanks!

Nov 12 '05 #1
4 1947
ne*****@hotmail .com wrote:
Greetings,

I was able to create the structured type:

CREATE TYPE address_t AS
( street char(30),
city char(15),
state char(10),
postcode smallint )
MODE DB2SQL;
Where can I find the source of the above?

I could not locate its source from any of these system tables:
syscat.datatype s, syscat.transfor ms and sysibm.user_def ined_types.

This is on W2K, DB2 V8.2

Thanks!

Can you clarify what you mean by "source"?
If you are looking for "CREATE TYPE..." you will be disappointed.
Teh two views that hold the information are SYSCAT.DATATYPE S and
SYSCAT.HIERARCH IES.
You shouldn't look at SYSIBM.* tables. They are not documented so
developers like me don't have to worry about breaking customers like you
every time you migrate an app to a new realease.

Have you tried db2look. It's teh standard tool that reverse engineers
SQL from the catalogs. IIRC structired types are supported.

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #2
Hi Serge,

By source,I meant the 'CREATE TYPE' statement.

As you mentioned, I search syscat.hierarch ies which has no entries.
DATATYPES has entry for the type defined but no details of 'CREATE
TYPE'.

db2look only returns table DDL, not the structure type, something like
this:

CREATE TABLE "myschema"."A1" (F1 address_t, F2 integer) in userspace1;

I expect the 'CREATE TYPE' ddl to be kept somewhere at least for
maintenance purpose, say what if we want to resize the 'street' col in
future? Where can we dig out the structured type DDL?

Thks!
Serge Rielau wrote:
ne*****@hotmail .com wrote:
Greetings,

I was able to create the structured type:

CREATE TYPE address_t AS
( street char(30),
city char(15),
state char(10),
postcode smallint )
MODE DB2SQL;
Where can I find the source of the above?

I could not locate its source from any of these system tables:
syscat.datatype s, syscat.transfor ms and sysibm.user_def ined_types.

This is on W2K, DB2 V8.2

Thanks!
Can you clarify what you mean by "source"?
If you are looking for "CREATE TYPE..." you will be disappointed.
Teh two views that hold the information are SYSCAT.DATATYPE S and
SYSCAT.HIERARCH IES.
You shouldn't look at SYSIBM.* tables. They are not documented so
developers like me don't have to worry about breaking customers like

you every time you migrate an app to a new realease.

Have you tried db2look. It's teh standard tool that reverse engineers SQL from the catalogs. IIRC structired types are supported.

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab


Nov 12 '05 #3
http://publib.boulder.ibm.com/infoce...e/r0002051.htm

-e
Extract DDL statements for database objects. DDL for the following
database objects are extracted when using the -e option:

* Tables
* Views
* Automatic summary tables (AST)
* Aliases
* Indexes
* Triggers
* Sequences
* User-defined distinct types
* Primary key, referential integrity, and check constraints
* User-defined structured types
* User-defined functions
* User-defined methods
* User-defined transforms
* Wrappers
* Servers
* User mappings
* Nicknames
* Type mappings
* Function templates
* Function mappings
* Index specifications
* Stored procedures
I'm quite certian I have seen structured type output from db2look....

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #4
My overlook!

Should have used 'db2look -d sample -e' instead of 'db2look -d sample
-t A1 -e'

Thanks!

Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
421
by: Steven T. Hatton | last post by:
There was recently some discussion of storing source code in databases. To some extent that is a rather common practice. CVS, for example, provides a means of storing source code in a database. In that case, the database management system is indifferent to the type of file stored. There are reasons not to store certain kinds of data in CVS, but in principle CVS doesn't care. An example of a mechanism for storing more structured...
4
1399
by: Dov Moryusef | last post by:
Hi to all, Is it possible to use replication with tables which contain structured type ? I know that it’s impossible to use import/export fonctions with strutured type but I don’t know about replication. Thanks for yours answers Dov
3
1226
by: KatB | last post by:
Hi, is it possible to use a datagrid (read only) that has an xml source that is NOT database-type structured? For example: <assembly> <work_order no="12345"> <station name="one"> <boards> <board sn="111" start="10/23/03 11:30:12am"/> <board sn="112" start="10/23/03 11:35:14am"/> <board sn="113" start="10/23/03 11:40:16am"/>
5
2057
by: ThunderMusic | last post by:
Hi, I'd need to find (or develop) a control of a map (worldwide if possible) where a user can click and drag to select an area by distance from the click point or using a square area (user's choice)... This control would return the postal/zip codes of the selected rectangle or the clicked point postal/zip code and the wanted distance range. Is it something that can be done in a web control? it's absolutely something easy (well, fairly...
1
1705
by: peter | last post by:
Hi, I want to test using structured UDT, so I was wondering if there is some sample that give me quick understanding of what is possible for generating structured using the method specification with java.. Note, I have used structured UDTs and have generated java UDFs. I am looking at this area to address an issue I have with variable structured data currently stored in varchar for bit data field and materialising the values for...
4
1812
by: rhino | last post by:
I've been looking at the information on Structured Types in the certifcation guide and have previously read it in the DB2 manuals. As neat as Structured Types are, I'm very curious to know if they are being heavily used in the real world? Or are they just a "nice to have" feature that no one actually uses? I'm also curious to know if anyone is finding them dramatically better than regular tables? If so, WHY are they finding the...
1
1289
by: twowaystosayiloveyou | last post by:
I am using VS2005 to build an ASP.net2.0 web site. After buidling from VS2005, where is the generated object files and temporary files? I cannot find anywhere. --?
8
3276
by: mlwerth | last post by:
Dear Access Group: This is the most basic and most embarrassing of questions, but I cannot find where to change the data type of a text field that I have in Access 2003 to a number field. I've searched high and low through help databases and on the internet. The directions say to : Open the table in Design view Click the Data Type column of the field you want to change, click the
5
2341
by: George2 | last post by:
Hello everyone, I am learning set_se_translator, and there are some good resources about how to translate structured exception into C++ exception, like, http://www.codeproject.com/KB/cpp/seexception.aspx 1.
0
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10438
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10164
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10001
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9042
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.