Attributes
- url
- Required string. The database URL for the database server to
which the SQL statement is sent, such as
jdbc:as400://myISeries
(see Database URL).
- driver
- Required string. The fully qualified package name of the driver
used to connect with the database server, such as
COM.ibm.db2.jdbc.app.DB2DRIVER
. This package must be present on the client workstation (see Driver Identifier and Driver Class).
- userid
- Optional string. The user ID required to access the database, if one is required (see User ID and Password).
- password
- Optional string. The password required to access the database, if one is required (see User ID and Password).
- statement
- Required string. The SQL statement (see Statement).
- outputtype
- Required integer. The destination where the data resulting from
the SQL statement is to be directed. Valid values are:
- 0 - The data is stored in the global variable $HMLSQLUtil$. You can retrieve the data by calling methods on the variable (see Storing the data into a global variable ($HMLSQLUtil$)).
- 1 - The data is written into a file (seeWriting the data into a file ). When you use this output type, you must
also specify the following attributes:
- outfilename
- outfiletype
- overwrite
- inbrowser
- 2 - The data is displayed on the workstation monitor (see Displaying the data). When you use this output type, you
must also specify the following attribute:
- holdondisplay
- outfilename
- String (required when outputtype is 1). The complete path and name of the output file (see Writing the data into a file).
- outfiletype
- Integer (required when outputtype is 1).
The type of the output file (see Writing the data into a file).
Valid values are:
- 0 - ASCII text (*.txt)
- 1 - Comma Separated Values (*.csv)
- 3 - Microsoft Excel BIFF3 (*.xls)
- 4 - Microsoft Excel BIFF4 (*.xls)
- 5 - XML (*.xml)
- 6 - HTML (*.html)
- overwrite
- Boolean (required when outputtype is 1).
Whether to overwrite the file or append to it (see Writing the data into a file).
- Setting this attribute to true causes the specified file, if it exists, to be overwritten with the data. If the file does not exist then it is created.
- Setting this attribute to false causes data to be appended to the specified file, if it exists. If the file does not exist then it is created.
- inbrowser
- Boolean (required when outputtype is 1). Setting this attribute to true causes the macro runtime, after writing the data into the specified file, to display the file's contents in the default browser (see Writing the data into a file).
- holdondisplay
- Boolean (required when outputtype is 2). Setting this attribute to true causes the macro runtime, after displaying the data, to wait for a response from the end user before starting to process the next macro action (see Displaying the data).
- mlprops
- Optional string. This attribute contains the file settings when outfiletype is 5 (XML) or 6 (HTML). The format of
this attribute is:
where key1, key2, key3, and so on are the names of HTML or XML settings, and where value1, value2, value3, and so on are the values of the HTML or XML settings. Although you can use the Code Editor to modify the settings of this attribute manually, HCL recommends that you modify these settings by changing the corresponding settings in the SQL Wizard and saving the values to the Macro Editor (see Using the SQL Wizard).mlprops="key1@@value1 @@key2@@value2@@key3@@value3"