%define DATABASE = "*LOCAL"

%define DTW_HTML_TABLE="YES"

%HTML(HelloWorld1) {  
Hello World From HelloWorld1
%}

%HTML(HelloWorld2) {<html>
<head><title>Web Macro Example</title></head>
<body bgcolor="#FFFFFF" text="#000000" link="#6600CC" 
      alink="#6600CC" vlink="#666699"><P>Hello World From HelloWorld2</BODY>
</HTML>
%}


%FUNCTION(DTW_SQL) sql1 () {  
 select * from QIWS.QCUSTCDT
%}

%HTML(sqltest1) {

<h2>Here is the generated default table</h2> 

@sql1()  

%}

%MESSAGE {
  100: "No entries found that matched selection criteria.": continue
%}

%FUNCTION(DTW_SQL) sql2 () {
  select * from QIWS.qcustcdt where CUSNUM=$(cusno)
%}

%HTML(sqltest2) {

<h2>Here is the generated default table</h2> 
@sql2()  

%}

%HTML(startmail) {
<html>
<body>
<h1>Net.Data E-Mail Example</h1>
<form method="post" action="sendemail">
<p>To:<br><input name="recipient"><p>
Subject:<br><input name="subject"><p> 
Message:<br><textarea name=message rows=20 cols=40>
</textarea><p>
<input type="submit" value="Send E-mail"><br>
</form>
</body>
</html>
%}
 
%HTML(sendemail) {
<html>
<body>
<h1>Net.Data E-Mail Example</h1>
@DTW_SENDMAIL("Net.Data E-mail Service <125.1.1.40>", recipient, message, subject)
<p>E-mail has been sent out.
</body>
</html>
%}

Still have questions? We can help. Submit a case to Technical Support.

Last Modified On: December 10, 2016