IBM HTTP Server for AS/400
Handling errors in Net.Data macros


Terms of Use
  1. You may freely download this file or set of files for use within your site or at your client sites.
  2. You must keep all of the original copyrights and other notifications with all copies of the file(s) that you download from this site.
  3. You may use any of the code or techniques described in your own programs.
  4. You may not develop any article, publication, Web page or other document that is based entirely or substantially on any of the information or code that you download.
  5. You may link directly to www.web400.com from any of your Web sites. Please do not link directly to internal pages on this site.
  6. Use of any materials, files, descriptions, code, procedures, etc., that you obtain from this Web site is AT YOUR OWN RISK. DO NOT USE any of the materials, files, descriptions, code, procedures, etc., if you are uncertain what the effect might be, and if you do not have adequate backup and recovery to correct any possible problems.
  7. I do not offer "free" support for any of the material available on this site. Consulting services are available by request for a fee.


File name: Handling errors in Net.Data macros
Environment: Any supported Net.Data environment. AS/400: IBM HTTP Server for AS/400 (5769-DG1), V3R2, V3R7, V4Rx+.
Date Posted: April 12, 2001

About this document:
Although Net.Data lets you quickly develop macros to access and display data from your AS/400 system, the default error handling in Net.Data is not very useful. By adding just a little code to your macros, you can get much more information about run-time errors. By making use of the techniques described in this article and the accompanying source code, you can create more robust macros that will provide a complete snapshot of your environment when an error occurs.
Link to the article:
NDError.html - Web page that describes how to work with Net.Data error handling.



Download Files:
Note: for the following files, you can view them in the browser by clicking the link. To save the file, right-click and select the "Save Target As..." option.

Table1.ndm Net.Data macro - A simple Net.Data macro that contains no error handling.

Table2.ndm Net.Data macro - A revised version of the macro that uses a message block for the SQLSTATE error.

Table3.ndm Net.Data macro - Another version of the macro that uses the ErrorMsg_Block.ndm include file and defines a block-specific message handler.

ErrorMsg_Block.ndm include file - The ErrorMsg_Block.ndm include file defines a global message block for a macro.

ErrorMsg_Table.ndm include file - The ErrorMsg_Table.ndm file displays the Net.Data variables and HTTP server environment variables.




Craig Pelkie
Bits & Bytes Programming, Inc.
craig@web400.com

WEB400 Home Page Download Files


Web Server, AS/400
Copyright © 2001, Bits & Bytes Programming, Inc., ALL RIGHTS RESERVED

WWWSights, Publisher
Last modified April 12, 2001