Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Building SQL from an END SCRIPT

Status
Not open for further replies.

dgeorge4

MIS
Mar 20, 2003
1
US
Greetings all.

I hope you all can help me. Using PowerDesigner (PDM) to generate scripts (DDL Statements). I figured out how to get the Label/Comment commands to generate by editing the DBMS:

LABEL on COLUMN LIB/TABLE.Column1
'Label Here';

and

COMMENT on COLUMN LIB/TABLE.Column1
'Comment Here';

The problem is, that one LABEL and one COMMENT SQL command are create per Column. As I was Reverse Engineering from ISeries Navigator, I noticed that the LABEL and COMMENT SQL commands were compacted into one statement per table!


COMMENT on COLUMN LIB/TABLE (
"Column1 Heading" is 'Comment1 Here',
"Column2 Heading" is 'Comment2 Here'
.
.
.
"ColumnX Heading" is 'CommentX Here');

LABEL on COLUMN LIB/TABLE (
"Column1 Heading" is 'Label1 Here',
"Column2 Heading" is 'Label2 Here'
.
.
.
"ColumnX Heading" is 'LabelX Here'););

Which of course is Much Quicker.

I am looking for ways to add to the DBMS (Using a Template?) Maybe define a VB Script to OUTPUT the correct statement for LABEL and COMMENT, then, invoke the script during script generation using the END SCRIPT Box for Table Generation, and the calling the Script per Table (Properties), Using the End Script Tab.

...Any Suggestions???

Thanks,

dgeorge4
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top