SQL

A DB2 WWW Connection language construct that is equivalent to a function called with FUNCTION(DTW_SQL) in Net.Data.

It can contain SQL_REPORT and SQL_MESSAGE statements, which are also from DB2 WWW Connection. DB2 WWW Connection does not support named %SQL blocks.

Examples:

Example 1: A DB2 WWW Connection macro

%SQL{
UPDATE $(dbtbl) SET URL='$(URL)' WHERE ID=$(ID)
%SQL_MESSAGE{
100: "<b>The selected URL no longer exists in the table</b>." : continue
%}
%}
 
%HTML_INPUT{
<html>
...
%EXEC_SQL
</html>
%}
 
%HTML_REPORT{
<html>
...
</html>
%}

Example 1: An equivalent Net.Data macro

%FUNCTION(DTW_SQL) URLquery(){
UPDATE $(dbtbl) SET URL='$(URL)' WHERE ID=$(ID)
%MESSAGE{
100: "<b>The selected URL no longer exists in the table</b>." : continue
%}
%}
 
%HTML(INPUT){
<html>
...
@URLquery
</html>
%}
 
%HTML(REPORT){
<html>
...
</html>
%}


[ Top of Page | Previous Page | Next Page | Index ]