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



Is you specify NAMING(*SQL) (as you are), then you follow the SQL naming
standards of a dot between object names (library.file or schema.table)
and your search is restricted to a library with the same name as the
'executor' of the program. If you specify NAMING(*SYS), then your
seperator is a '/', and it will use the library list.


> -------- Original Message --------
> Subject: SQL Stored Procedure
> From: "Banerjee, Amitava" <Amitava.Banerjee@xxxxxxxxxx>
> Date: Tue, December 13, 2005 1:21 pm
> To: <rpg400-l@xxxxxxxxxxxx>
> 
> Hi All,
> I am having some problems while working/creating SQL procedure. 
> 
> Sample:
> 
> DROP PROCEDURE DB2BETT001;            
> CREATE PROCEDURE DB2BETT001 (         
> IN @EXTOYT CHAR (32)                  
>  )LANGUAGE SQL MODIFIES SQL DATA BEGIN
>                                       
> DELETE FROM LIBRARY01.FILE1       
> WHERE  EXTOYT = @EXTOYT;              
> END;                                  
> 
> 
> Questions:
> 1. Can the dot (.) in "delete from library01.file1" be replaced by slash 
> ('/')? Like library01/file1? What is the difference? 
> 
> 2. What we are seeing is if we hardcode the library in CREATE PROCEDURE 
> statement (CREATE PROCEDURE PROCLIB.DB@BETT001), it is compiling fine with 
> the dot, otherwise we are giving slash. Is there any link between these two 
> things? Or are we doing all wrong?
> 
> 3. If we don't want to hardcode the library in CREATE PROCEDURE statement, 
> where does the object goes? I thought (somebody told me) that it goes to the 
> top most library in the library list. But that is not happening. The object 
> is going to the user's, who ever is signed in, default library. How do we 
> control that?
> 
> 4. We are using the following command to create the objects
> RUNSQLSTM SRCFILE(PROCLIB/QSQLSRC) SRCMBR(DB2BETT001) COMMIT(*NONE) 
> NAMING(*SQL) DYNUSRPRF(*OWNER) 
> 
> Please let me know if I am missing something, doing all wrong.
> 
> Thank you
> Amitava
>  
> --------------------------------------------------------
> 
> This message (including any attachments) is only for the use of the person(s) 
> for whom it is intended. It may contain Mattel confidential, proprietary 
> and/or trade secret information. If you are not the intended recipient, you 
> should not copy, distribute or use this information for any purpose, and you 
> should delete this message and inform the sender immediately.
> 
> -- 
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.


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.