× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thank you Chuck.

On 5/5/2014 5:29 PM, CRPence wrote:
On 05-May-2014 16:15 -0500, Booth Martin wrote:
On 5/5/2014 3:22 PM, Buck Calabro wrote:
On 2014-05-05, at 9:41 AM, Hoteltravelfundotcom wrote:

What are some methods to do a simple web screen? It could be on
a company server.

It would show the actual shipments that have gone out till that
point in time.

It would get this data from one table on the IBM i, already
summarized. so we would show something like:

Order type Total shipments
ABC 100
DEF 200
etc.

<<SNIP>> your job will probably be to create some stored procedures
for them to consume. They love result sets. (Seriously.) <<SNIP>>

uh oh. I believe I am about to learn something important.

Stored procedure? Result sets? My bet is that those terms do not
mean what I thought they meant.

Is there a simple example somewhere that we can look at? Simple.
Something that demonstrates the process to which you are pointing?
Did I mention simple? (If you have ever looked at the examples on my
web site you realize I like simple and overly obvious examples.)

drop procedure myRSproc
; -- delete prior routine which is a SQL "stored procedure"
create procedure myRSproc (InpDate IN date)
result sets 1
language SQL specific myRSproc
not deterministic reads sql data
set option dbgview=*list,commit=*none,srtseq=*hex
,dynusrprf=*user,datfmt=*iso
begin
declare myRScursor cursor with return to client for
select Order_Type, SUM(Shipments) as Total_Shipments
from the_order_file
where Order_Date < InpDate
order by Order_Type
; -- declare the cursor that defines the result set
open myRScursor
; -- open the cursor that defines the result set
set result sets with return to client cursor myRScursor
; -- I believe at some point, this SET became optional
end
; -- create new [iteration of the] routine from above source

The client would invoke the above routine, passing a date value as an input parameter, using the client interface to the database SQL [e.g. ODBC], to effect what is essentially identical to the SQL CALL interface on the server; e.g. much like an embedded SQL request in an HLL [such as RPG; an SQLRPGLE source type] coded with something resembling the following invocation passing a host variable as the first argument:
Exec SQL CALL myRSproc(:Until_Date) ;

The invoker of the procedure would then /consume/ the result set that was produced by the SQL routine; the result set, as defined by the declared\opened SQL cursor.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.