The SEND command is used to connect to the database, to execute the query and to format the result set.
If a working list is available, then the contents of the working list is returned else a database select is done.
Syntax:
Command | Keyword | Value | Developer notes |
|---|---|---|---|
SEND | DRIVER | value | Conditional. Database driver name. |
DATABASE | value | Conditional. Database name. | |
USER | value | Conditional. Database server user login. | |
PASSWORD | value | Conditional. Database server user password. | |
RESULTSET | *UPDATABLE | Optional. Result et concurrency mode. | |
*READONLY | Default. | ||
NUMBERFORMAT | Optional. See NUMBERFORMAT. | ||
ARCHIVE | Optional. See ARCHIVE. | ||
ENCODING | Optional. See ENCODING. | ||
STATUS | value | Optional: HTTP status number. | |
MESSAGE | value | Optional: HTTP status message. | |
UAPATH | value | Optional. User agent save response path. | |
UAFILE | value | Optional. User agent save response file. | |
UACACHE | value | Optional. Cache-Control max-age. | |
UADISPOSITION | value | Optional. Content-Disposition filename. | |
CHARSET | *YES | Optional. Include charset attribute. | |
*NO | Do not include charset attribute. | ||
*TEXT | Default. Include charset attribute if content is text. |
The driver keyword value is a symbolic name used to locate the service's property entry:
driver.db2=com.ibm.as400.access.AS400JDBCDriver
The database keyword value is a symbolic name used to locate the service's property entry:
database.query=jdbc:as400://DBHOST/LIBRARY;naming=sql;errors=full;date format=iso;translate binary=true
Example
SEND #WRLST(field,field,field)
SEND DRIVER(DB2) DATABASE(QUERY) USER(user) PASSWORD(password)
