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



Hi Donald,

have you tried to call this procedure from iSeries Navigator?

For SQL CHAR and VARCHAR are different data types and expressions are
handled as VARHCAR!
If you want to use expressions you have to CAST them to CHAR, i.e.

CALL MyLib/MyProc (Cast('MyText' as CHAR(10))


Mit freundlichen Grüßen
 
i.A. Birgitta Hauser
 
LUNZER + PARTNER GMBH
Unternehmensberatung
Carl-Zeiss-Straße 1
63755 Alzenau
 
Tel:         + 49 6023 951-255
Fax:        + 49 6023 951-111
Internet.  www.lp-gmbh.com
              www.rpg-schulung.de
 

-----Ursprüngliche Nachricht-----
Von: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von Fisher, Don
Gesendet: Donnerstag, 10. November 2005 21:24
An: 'Midrange Systems Technical Discussion'
Betreff: RE: Accessing Service Programs from .NET

We have V5R2 and no, I'm not certain about the OPM connection.  I just know
I haven't been able to make the service program work.  Perhaps I should
include additional information about that. 

I used the following to create the stored procedure:
CREATE PROCEDURE MYLIB/APROCEDURE
  (IN Parm1 CHAR (10),
   IN Parm2 CHAR (1), 
   OUT Parm3 CHAR (10),
   OUT Parm4 CHAR (7),
   OUT Parm5 CHAR (100))
RESULT SETS 1 LANGUAGE RPGLE 
SPECIFIC APROCEDURE 
NOT DETERMINISTIC NO SQL 
EXTERNAL NAME MYLIB/SVCPGM
PARAMETER STYLE GENERAL                            

To test this, I created an SQLRPGLE program with the following SQL
statement:
CALL MYLIB/APROCEDURE 
  (:Parm1, :Parm2, :Parm3, :Parm4, 
   :Parm5)

When I execute the program, I get the following message:
"External program SVCPGM in MYLIB not found."

I discovered something in the archives about SQL interpreting literals as
VARCHAR, but all my parameters are fields with the same attributes as
defined in the CREATE PROCEDURE statement.

Donald R. Fisher, III
Project Manager
Roomstore Furniture Company
(804) 784-7600 extension 2124
DFisher@xxxxxxxxxxxxx


<clip>
Are you sure about the stored procedure/OPM connection?  One of our
developers here recently did some work for a VB (Don't know if it is .NET)
application and I'm sure it was done in ILE.  In fact, I'm pretty sure SQL
wanted to know the name of the service program and procedure.  Maybe it's
release specific.  What release are you on?  We are at V5R3.
<clip>

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.