CRTSQLRPGI QSYS Create SQL ILE RPG Object

C *ENTRY PLIST
C PARM P$FILNM
C PARM P$LIBNM
C PARM P$FLDNM
C PARM P$KEYFLD
C PARM P$KEYVAL
C PARM P$RTNVAL
*
C eval W$SQLCmd = 'Values ( Select '+ P$FLDNM
C + ' from ' + P$FILNM
C + ' Where ' + P$KEYFLD + '=?'
C + ') into ?'
*
C/exec SQL
C+ Prepare MYSTMT from :W$SQLCmd
C/End-Exec
*
C/exec SQL
C+ execute MYSTMT Using :P$KEYVAL, :P$RTNVAL
C/End-Exec
*
* If an error occurs during retrieval
C If SQLStt='00000'
c P$RtnVal dsply
c else
c SQLStt dsply
c Endif
*
C eval *INLR = *ON
C RETURN

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of rob@xxxxxxxxx
Sent: Friday, November 13, 2009 10:44 AM
To: RPG programming on the IBM i / System i
Subject: RE: Looking for BASIC example of using embedded SQL
forretrievingfieldvalue

Which of these two commands are you using?
CRTSQLRPG QSYS Create SQL RPG Program
CRTSQLRPGI QSYS Create SQL ILE RPG Object


Rob Berendt

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