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




-----Original Message-----
From: Fisher, Don [mailto:dfisher@xxxxxxxxxxxxx]
Sent: Thursday, November 10, 2005 12:56 PM
To: 'midrange-l@xxxxxxxxxxxx'
Subject: Accessing Service Programs from .NET


>These programs need to be able to execute procedures we have embedded in
>service programs on our iSeries (V5R2) to retrieve different information
>stored on our iSeries so we won't have business logic stored in more than
>one place.  Stored procedures apparently only work with an OPM model and
>user defined functions must apparently be used in a "Select" statement.

Don,

stored procedures do work with service programs:

Create function  mkrfxil2s(                             
  InCent    decimal(2,0),                               
  InYr      decimal(2,0),                               
  InSsn     char(2),                                    
  InBrand   char(1),                                    
  InMdm     char(2),                                    
  InItmnu   char(4))                                    
returns     char(256)                                   
external name 'LIBRARY/SRVPGM(PROCEDURENAME)'
Language        RPGLE

( I think they need the library qualifier which can be a bit of a bother. )

Another problem I had with calling RPG via stored procedures is that CHAR parm 
types caused a "procedure not found" error.  had to use VARCHAR instead ( which 
is varying in rpg ).

-Steve



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.