The dyn_sql program

The dyn_sql.ec program is the Informix® ESQL/C demonstration program that uses dynamic SQL. The program prompts the user to enter a SELECT statement for the stores7 demonstration database and then uses a system-descriptor area to execute the SELECT dynamically.

By default, the program opens the stores7 database. If the demonstration database was given a name other than stores7, however, you can specify the database name on the command line. The following command runs the dyn_sql executable on the mystores7 database:
dyn_sql mystores7