QSQGNDDL is the API for this, and is the same API used by Navigator. i
have a command built around this that can be downloaded from my website in
the downloads section
http://tommyholden.com
Thanks,
Tommy Holden
From:
rob@xxxxxxxxx
To:
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Date:
07/28/2009 08:25 AM
Subject:
RE: CHGPF and ALTER TABLE
Sent by:
rpg400-l-bounces@xxxxxxxxxxxx
See, if this was on midrange-l, where it belongs, you would have probably
received the answer by now that you can easily retrieve the SQL used to
create the file
CREATE TABLE ROB/JERRYA
(MYFIELD CHAR (5 ) NOT NULL WITH DEFAULT,
COLUMNA CHAR (2 ) NOT NULL WITH DEFAULT)
ALTER TABLE ROB/JERRYA
ADD COLUMN BUBBA DEC (5 , 0) NOT NULL WITH DEFAULT
Then you can use iNav's Generate SQL Scripts to retrieve:
-- Generate SQL
-- Version: V6R1M0 080215
-- Generated on: 07/28/09 09:17:35
-- Relational Database: GDIHQ
-- Standards Option: DB2 i5/OS
CREATE TABLE ROB.JERRYA (
MYFIELD CHAR(5) CCSID 37 NOT NULL DEFAULT '' ,
COLUMNA CHAR(2) CCSID 37 NOT NULL DEFAULT '' ,
BUBBA DECIMAL(5, 0) NOT NULL DEFAULT 0 )
;
There's gotta be an api out there to do the same.
As part of your process you could easily incorporate this.
Rob Berendt