IBM Books

Reference

DTW_EXIT


AIX HP-UX Linux OS/2 OS/390 OS/400 SCO SUN Win NT
X X X X X X X X X

Purpose

Specifies to leave the macro immediately. Net.Data sends any Web pages that are generated prior to DTW_EXIT() being called to the Web browser .

Format

@DTW_EXIT()

Return Codes

Table 32. DTW_EXIT Return Codes

Return Code Explanation
1003 The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function.

Usage Notes

  1. Use DTW_EXIT() to immediately stop the processing of a macro. Using this technique saves the time Net.Data would use to process the entire file.
  2. Ensure that the entire macro is syntactically correct before adding the DTW_EXIT() function. Using DTW_EXIT() causes Net.Data to stop processing the macro when it encounters the call to this function, which can prevent you from catching errors that occur after the DTW_EXIT() function has been processed.

Examples

Example 1: Exiting a macro

%HTML(cache_example) {
 
<html>
 <head>
 <title>This is the page title</title>
 </head>
 <body>
 <center>
 <h3>This is the Main Heading</h3>
 <!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!>
 <! Joe Smith sees a very short page                   !>
 <!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!>
 %IF (customer == "Joe Smith")
 
@DTW_EXIT()
 
%ENDIF
 
...
 
</body>
 </html>
 %}


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