I’ve no experience with the command line version, however, you will find that the iSeries Navigator, installed with all the options, will make your task much easier. You can expand the databases to see schema, and once that is expanded you will have the option to look at the views in the schema. From there you can retrieve the DDL with only a couple of mouse clicks. There are other options as well that you might find useful…(I’m using v5r3 of the navigator, and some of the terms changed from prior versions, but if you’re not too far back the concepts will still apply)
Access to SQL and the system catalog are all you need. Codd’s 12 Rules pretty dictate that. (Consider Rule 0 plus rule 4.)
The SYSVIEWS table should supply everything you need.