iSeries table description blank

We are running an iSeries at V7R1. When I run a sql query (from run sql scripts or strsql) like:

Select * from qsys2.systables

The TABLE_TEXT and LONG_COMMENT fields are blank. With SYSCOLUMNS table the COLUMN_TEXT field is populated.  

If I run the command DSPFD <TABLENAME> the “text description” does have this information.

Is there something I need to do to get the table_text field populated?
HelpDeskGeigerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave FordSoftware Developer / Database AdministratorCommented:
You'd use SQL's "LABEL ON" and "COMMENT ON" command. Give me a minute, and I'll whip up a couple examples.

HTH,
DaveSlash
0
Dave FordSoftware Developer / Database AdministratorCommented:
Something like this should do it:

create table MySchema.MyTable (
   anInteger integer         
);

LABEL ON TABLE MySchema.MyTable IS 'Some descriptive text';

COMMENT ON TABLE MySchema.MyTable IS 'Some longer descriptive text';

Open in new window


-- DaveSlash
0
HelpDeskGeigerAuthor Commented:
I should have mentioned this is for tables that already exist. I don't think they were created with sql either.
0
Dave FordSoftware Developer / Database AdministratorCommented:
"LABEL ON" and "COMMENT ON" would still work.

Give it a try. It's mind-numbingly easy to try it out.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tliottaCommented:
There is an "object" on the system that defines the file. The OS maintains the actual object descriptions for all types of objects.

In addition, there is the database catalog that is maintained by DB2. This is a SQL database that is mandated by the standard for SQL.

When you look at DSPFD, you generally see the OS description. The OS was around before SQL was available, and the object-based facilities still run everything behind the scenes. The database catalog is managed on top of the object-based facilities.

Dave's suggestions are the correct answer. The SQL LABEL ON and COMMENT ON statements essentially effect UPDATEs to the database catalog.

Tom
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
IBM System i

From novice to tech pro — start learning today.