Dilip
ddlgen extracts SQL/DDL from existing database.
How you want to use that SQL/DDL output totally depends on what you want to do.
How do you want a new database created ?
SAP/Sybase provides dump/load mechanism if you want to restore/clone a database completely.
That will restore everything (metadata, data) from image backed up. You still need to create empty shell of just the database. ddlgen allows you to extract that from the source. You can edit it if/as needed and then use it. This is typically the case for refreshes.
If you need just new database (size scaled down or up) with empty objects exactly like some existing database then also ddlgen can help.
See the manual entry for ddlgen in Utility guide that runs into tens of pages with lots of examples.
Again ddlgen is a tool for reverse engineering metadata and some logic from an ASE instance.
Use it in way that suits your requirements.
Also note that it is available both on UNIX and windows. This allows you to write wrapper scripts to extract what you want.
HTH
Avinash