× 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 also can use a QSH command:
Here is an example:
       DCL        VAR(&COMMAND) TYPE(*CHAR) LEN(256) +                  
                  VALUE('db2 "Insert Into Hauser.TestQSH Values(')      
       DCL        VAR(&CMDEND) TYPE(*CHAR) LEN(10) VALUE(')"')          
       DCL        VAR(&Quote)  TYPE(*CHAR) LEN(1) VALUE('''')           
       DCL        VAR(&Comma)  TYPE(*CHAR) LEN(2) VALUE(', ')           
       DCL        VAR(&NAME)   TYPE(*CHAR) LEN(10) VALUE('Birgitta')    
       DCL        VAR(&NUMBER) TYPE(*CHAR) LEN(5) VALUE('12345')        
       DCL        VAR(&MYDATE) TYPE(*CHAR) LEN(10) VALUE('2006-10-17')

       QSH        CMD('db2 "Insert Into Hauser.TestQSH +

                            Values(''Birgitta'', 12345, Default)"')

 

       CHGVAR     VAR(&COMMAND) +                 
                  VALUE(&Command *TCAT &Quote *TCAT &Name  *TCAT &Quote  +

                                 *TCAT &Comma *CAT  &Number *TCAT &Comma  +

                                 *CAT  &Quote *TCAT &MyDate *TCAT &Quote +

                                 *TCAT &CmdEnd)

 

       QSH        CMD(&Command)


Mit freundlichen Grüßen
i.A. Birgitta Hauser

LUNZER + PARTNER GMBH
Consulting | Software | Service
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

--------------------------------------------------------
Handelsregister: Aschaffenburg HRB 4720
Gerichtsstand und Erfüllungsort Alzenau
Ust-IdNr.: DE132093146
Geschäftsführer: Rudolf Gerbert
---------------------------------------------------------

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Nandi, Rabindranath
(Cognizant)
Sent: Wednesday, October 18, 2006 11:35
To: midrange-l@xxxxxxxxxxxx
Subject: Running SQL command in a CLLE program 


Hi,



Is there a way to execute SQL statements in a CLLE programs, other than
the following?

1)      QMQRY

2)      RUNSQLSTM

3)      Calling Embedded SQLRPG program in the CLLE program



If it's not possible then please let me know



Regards,

Rabin.





This e-mail and any files transmitted with it are for the sole use of the
intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by reply
e-mail and destroy all copies of the original message.
Any unauthorised review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on this
e-mail is strictly
prohibited and may be unlawful.

  Visit us at http://www.cognizant.com

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.