开发者

Table structure for DB2 on an ancient AS/400

开发者 https://www.devze.com 2023-03-12 07:50 出处:网络
We have a VERY old 400, on the order of 10-15 years 开发者_运维问答old, and I need to migrate the data out of it so it can be retired.I have ODBC connectivity to it through a program called QTODBC tha

We have a VERY old 400, on the order of 10-15 years 开发者_运维问答old, and I need to migrate the data out of it so it can be retired. I have ODBC connectivity to it through a program called QTODBC that is reporting that the host that I'm connecting to is version 03.01.0000. I'm trying to access system tables so that I can get table structure data and I've tried various commands that all seem to be written for later versions of DB2.

What were the system tables back way back then? And how would I pull up schema names, assuming they had them with this old of a version?


Your best bet for V3R1 will be to use the DSPFFD FILE(...) OUTPUT(*OUTPUT) OUTFILE(LIB/FILE) command from a terminal session to create a file of field definitions.

There's a high chance with a system that old that the files may not even be externally described. This means that the file layout is hardcoded in each program that access the file. You can recognize this situation if you only find a few fields named F00001, K00001, etc.


You can retrieve the table structure quering QSYS2/SYSCOLUMNS tables.

Browse the QSYS2 library for tables and views about indexes and others.


describe output select * from creator_schema.tablename

This worked for me.

0

精彩评论

暂无评论...
验证码 换一张
取 消