× 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.


  • Subject: Re: Stored Procedure
  • From: Buck Calabro/commsoft<mcalabro@xxxxxxxxxxxx>
  • Date: Mon, 5 Apr 1999 13:22:05 -0400

On 04/05/99 01:08:36 AM SAA wrote:

>         Can any one send me the steps involved in writing stored
>procedures on AS/400  DB/400, I have experience of stored procedures on
>Sybase

Do you want to use RPG?  Just compile your program as usual, do a CREATE 
PROCEDURE to add it to the catalog and CALL it from either SQL or another 
AS/400 program.  About the only things you'll need to know are how to 
declare the variables in RPG to match the SQL datatype:

RPG     SQL
4B 0    Small Int
9B 0    Int
7P 2    Decimal(7,2)
1A      Char(1)

Paul Conte wrote several articles on using RPG as a stored procedure in the 
April and May 1996 issues of News/400 magazine.  I don't know if they have 
the articles posted on their web site, but you may be able to order 
reprints: http://www.news400.com

Buck Calabro
Billing Concepts Inc, Albany, NY
mailto:mcalabro@commsoft.net
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.