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

you need to register your CL-Program as external procedure, too.

The call of an other stored procedure must be situated within the compound
(BEGIN / END) statement after the Declare section.
In SQL host variables are not preceded by a colon.

CREATE PROCEDURE DRLLIB/DRL005SP (
IN COCD CHAR(2) ,
IN LNAM CHAR(35),
IN FNAM CHAR(25) )


BEGIN

DECLARE WRKDAT NUMERIC (8, 0);
DECLARE WKPATH CHAR;

CALL GET005CL(COCD);

SET WRKDAT = (YEAR(CURRENT DATE)*10000) + (MONTH(CURRENT
DATE)*100) + (DAY(CURRENT DATE));

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"

-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im
Auftrag von DLee@xxxxxxxx
Gesendet: Tuesday, 02. June 2009 21:21
An: rpg400-l@xxxxxxxxxxxx
Betreff: Re: Stored Procedure library list

I have a need to set the iseries library list based on a company parm
passed to a stored procedure.

I have a cl program that can do this work, but I don't know how to call a
cl program from within my sql stored procedure.

can anybody give me some guide on this or point me in the correct
direction.

Below is part of the code, and I want to call cl program GET005CL with the
parm cocd, which is input to the procedure.

I'm not finding any code examples so could use some help.

Appreciate any help.

CREATE PROCEDURE DRLLIB/DRL005SP (
IN COCD CHAR(2) ,
IN LNAM CHAR(35),
IN FNAM CHAR(25) )

CALL GET005CL (:COCD)

BEGIN

DECLARE WRKDAT NUMERIC (8,0);
DECLARE WKPATH CHAR;
SET WRKDAT = (YEAR(CURRENT DATE)*10000) + (MONTH(CURRENT
DATE)*100) + (DAY(CURRENT DATE));





Darrell Lee
Information Technology
Extension 17127

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.