%{***********************************************************%} %{ Net.Data macro ResultSets.ndm %} %{ %} %{ Demonstrate calling stored procedure that returns %} %{ multiple result sets. %} %{***********************************************************%} %{***********************************************************%} %{ Define Net.Data table variables %} %{***********************************************************%} %define{ DTW_DEFAULT_REPORT = "NO" DTW_HTML_TABLE = "YES" TABLE1 = %table TABLE2 = %table %} %{***********************************************************%} %{ SQL function to invoke multiple result set stored proc. %} %{***********************************************************%} %function(dtw_sql) myProc(in char(4) custoomer_ID, in decimal(3,0) district_id, in char(4) warehouse_id, out t1, out t2) { call resultsets %} %{***********************************************************%} %{ Macro function - uses default report processing for table %} %{***********************************************************%} %macro_function showTable(INOUT table) { %} %{***********************************************************%} %{ HTML section - invoke stored procedure, display tables %} %{***********************************************************%} %html(GETTABLES) { Net.Data macro using SQL Stored Procedure

Net.Data macro using SQL Stored Procedure

@myProc(FORM_CUSTOMER_ID, FORM_DISTRICT_ID, FORM_WAREHOUSE_ID, TABLE1, TABLE2) @dtw_assign(DTW_DEFAULT_REPORT, "YES") First result set table:

@showTable(TABLE1)
Second result set table:

@showTable(TABLE2) %} %{***********************************************************%} %{ HTML section - display page, get library name %} %{***********************************************************%} %html(Input) { Net.Data macro using Multiple Result Set Stored Procedure

Net.Data macro using Multiple Result Set Stored Procedure


This macro uses multiple result sets and the parameter passing technique.

Enter the Customer ID (example: 0001):

Enter the District ID (example: 001):

Enter the Warehouse ID (example: 0001):

%}