IBM HTTP Server for AS/400
Using Stored Procedures with Net.Data


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: Using Stored Procedures with Net.Data
Environment: Any supported Net.Data environment. AS/400: IBM HTTP Server for AS/400 (5769-DG1), V3R2, V3R7, V4Rx+.
SQL Development Kit (5769-ST1) required to create the RPG stored procedure shown in the example.
Date Posted: September 4, 2000

About this document:
Although you can embed any valid SQL statement within a Net.Data macro, there are times when it is useful to call stored procedures from Net.Data. This is especially the case when you have database authorization requirements that preclude QTMHHTP1 from accessing the database.

This article describes how you can call stored procedures from a Net.Data macro, and how stored procedures return result sets to Net.Data. The sample code includes an RPG example that returns two result sets to the macro.
Link to the article:
NDStoredProc.html - Web page that describes how to call stored procedures from Net.Data



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.

ResultSets.ndm Net.Data macro - Net.Data macro code to call the stored procedure and display the result sets.

ResultSets.rpg RPG source code - RPG source code to demonstrate how to return two result sets to the caller.




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

WEB400 Home Page Download Files


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

WWWSights, Publisher
Last modified September 4, 2000