madsql utility

The madsql utility runs an SQL statement or file of SQL statements through the operational server interface.

Before loading .unl files, be aware of any data encoding before setting options.

Before you run a utility, make sure that you have set the necessary operational server environment variables. For information about the variables, see the operational server environment variables topic.

Table 1. madsql utility options
Option Type Description Default
-conn   MAD_CONNSTR; ODBC connection string  
-dsn   ODBC dsn name  
-uid   ODBC user ID  
-pwd   ODBC user password  
-quiet   Prevents display of results from command NONE
-unload   Generates the output in .unl format and enables the display of Unicode characters NONE
-in INPUTENCODING   Specifies the encoding type (UTF8, UTF16, or LATIN1) of the input data LATIN1
-out OUTPUTENCODING   Specifies the encoding type (UTF8, UTF16, or LATIN1) of the output data LATIN1
-sqlfile sqlFile Name of a file that contains a list of SQL commands to run NONE
-sqlstmt sqlString A single SQL command to run NONE