AS/400 Links Partner with Rochester Institute Contact Us
Training Catalog Free Downloads Privacy / Usage


FREE AS/400, iSeries, and System i / iSeries Downloads
HOME >> FREE AS/400, iSeries, and System i / iSeries Downloads >> Using Stored Procedures with Net.Data



Using Stored Procedures with Net.Data
Author: Craig Pelkie


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.

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.

Download Files:

Note: The following files can be viewed in the browser by clicking the link.

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.

NDStoredProc.pdf - PDF file that describes how to call stored procedures from Net.Data (Same as the html file above.)

Note: To download these files, left-click on the link and use the browser's "file/save" menu option or right-click on the link and choose "save link as".