Good News Everybody!
The new search engine is LIVE!
Please report any problems to david (at) midrange.com.
|
CRPence wrote:
If the procedure is called using the *SYSTEM naming instead of
the *SQL naming, then the default path will be the library list
[*LIBL] used to locate the unqualified callee.
CREATE PROCEDURE &LIB/REM125SP ( ) RESULT SETS 1 LANGUAGE CL SPECIFIC &LIB/REM125SP NOT DETERMINISTIC NO SQL CALLED ON NULL INPUT EXTERNAL NAME CRPRDLIBTS/REM110CL PARAMETER STYLE GENERAL;
CALL CRPRDLIBTS/STRTSTLIB(COCD);
I'm using the stored procedure to call a cl program, and I'm using *system naming. When in production, the program will be in
library prod, when testing the program will be in test. If I can
know the session user, I can determine the library to call the program from. If there is a way I can retrieve the session user in the external stored procedure, I can do the below:
IF USER = 'CRPRDQUA' THEN CALL TEST/STRTSTLIB;
ELSE CALL PROD/STRTSTLIB;
END IF;
I did attempt to do a VALUES SESSION_USER INTO USER statement but
this didn't compile, and wasn't sure if the syntax I was using
was wrong, or if it just isn't allowed in an external stored
procedure. It just seems more difficult than it should be.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2026 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.