Reputation: 619
I occasionally use iseries navigators "generate sql" to convert out DDS objects into sql code. Is there a way to automate this? or perhaps a green screen equivalent command? what I'm really after is a way to translate a keyed logical file into a set of sql indexes.
Upvotes: 1
Views: 956
Reputation: 23793
You want to use the Generate Data Definition Language (QSQGNDDL) API...
http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_71/apis/qsqgnddl.htm
There's at least two published utilities that use this API.
http://www.ibmsystemsmag.com/ibmi/developer/general/Generating-DDL-Source-Using-a-CL-Command/
http://www.itjungle.com/mgo/mgo060502-story01.html
Upvotes: 1