× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Here is one of my simpler tables source members. I create it using the
RUNSQLSTM command:

/* start of source member */

CREATE TABLE XCACTLOG
(
ACTIONTIME TIMESTAMP NOT NULL WITH DEFAULT,
PROFILE CHAR (10) NOT NULL WITH DEFAULT,
JOB CHAR (28) NOT NULL WITH DEFAULT,
ADVID INTEGER NOT NULL WITH DEFAULT,
ACTION VARCHAR (8192) ALLOCATE(50) NOT NULL WITH DEFAULT
); -- @mh 5/2/2007 make ACTION column longer per Elvis

-- up to 50 characters file description text

LABEL ON TABLE XCACTLOG IS 'Database Administration Activity Log ';

-- up to 3 lines of column headings, 20 bytes per line (total 60 bytes)

LABEL ON COLUMN XCACTLOG
(
ACTIONTIME IS 'Time Action Executed',
PROFILE IS 'User Profile',
JOB IS 'Job Name',
ADVID IS 'Advice Identifier',
ACTION IS 'Action Taken'
);

-- up to 50 characters descriptive text per colum

LABEL ON COLUMN XCACTLOG
(
ACTIONTIME TEXT IS 'Time Action Executed',
PROFILE TEXT IS 'User Profile',
JOB TEXT IS 'Job Name',
ADVID TEXT IS 'Advice Identifier',
ACTION TEXT IS 'Action Taken'
);

/* end of source member */

There is also a COMMENT ON keyword you might investigate, but from what I've
seen there is rarely a call for its use.

Hth, Elvis

Celebrating 11-Years of SQL Performance Excellence on IBM i, i5/OS and
OS/400
www.centerfieldtechnology.com


-----Original Message-----
Subject: Create SQL Table With Labels

Greetings from the rainy First Coast.


I have been assigned to create some files, but instead of going native we
are to create them as SQL tables. I am trying to imitate what I can of the
DDS TEXT and COLHDG which I put in every DDS for a PF I create. Query is
much easier to use as a tool when those two elements are defined.

I looked on the IBM site for SQL tables and the LABEL ON option looked good.
However, my system didn't like it.

Do you have an example of an SQL table create using labels or whatever I
need to use to replicate what I can do in DDS?

Thanks,

Robert Munday




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.