Here you will find answers to your "how-to" questions by providing examples that show techniques for untangling some of the "mysteries" of writing macros. The following examples assume that: (1) latest Net.Data code is loaded on your system; (2) Net.Data has been configured on your system; and (3) there are HTTP configuration directives to map "/cgi-bin/db2www/*" to the DB2WWW program in your CGI library.
- Producing static HTML
Examples on producing static HTML using Net.Data. Illustrates what HTML section gets processed.
- Defining, referencing, and setting variables
Examples on the usage of Net.Data variables. Includes sample code that defines variables for which the values include calls to Net.Data built-in functions.
- Simulating server-side includes
The sample code shows how you can save time and effort updating Web pages by using common HTML files.
- Conditional processing
Examples that illustrate the usage of conditional processing to generate Web pages using the IF and WHILE Net.Data constructs.
- Setting cookies
Ever wonder how cookies can be set in a Net.Data Web macro? Well, the Web macros to do this can be found here.
- Setting INI-file path variables
Examples that show you how to simplify URL paths and paths within your macro that reference programs or include files by setting the MACRO_PATH, EXEC_PATH, and INCLUDE_PATH variables in the Net.Data configuration (INI) file.
Language environment: DTW_SQL
- Using default report processing
Examples that show you how to define a function using the DTW_SQL language environment, and how data generated by a SQL SELECT statement gets displayed back to the browser using the default report block processing feature of Net.Data. (Note: The concepts illustrated in the examples are applicable to all language environments.)
- Using user-defined report processing
Maybe you want to produce your own report? The sample code will show you how to do this, and more. (Note: The concepts illustrated in the examples are applicable to all language environments.)
- Calling a SQL function from within a row block of another function
An Example that will show you how to call another SQL function from within the %ROW block of another SQL function. (Note: The concepts illustrated in the examples are applicable to all language environments.)
- Enabling system naming mode
Do you want to use the library list when searching for database files? Here's how.
- Using the START_ROW_NUM report variable
Examples that show you how you can subset a large table and increase performance. (Note: The concepts illustrated in the examples are applicable to all language environments.)
Language environment: DTW_SYSTEM
Language environment: DTW_REXX