Difference between revisions of "SQLRPGLE"

From MidrangeWiki
Jump to: navigation, search
m
Line 2: Line 2:
 
[[Category:SQL]]
 
[[Category:SQL]]
 
= RPG IV with Embedded SQL =
 
= RPG IV with Embedded SQL =
 +
== Introduction to RPG IV with Embedded SQL==
 +
SQL is a powerful tool in any programmer's skill set.  It is possible to leverage this tool from within RPG (& other languages).  The source member type for these programs is SQLRPGLE.
 +
Here is an example of an embedded SQL statement:
 +
<pre>
 +
    C/EXEC SQL
 +
    C+ SELECT * FROM mylib/myfile
 +
    C/END-EXEC
 +
</pre>
 +
 
<table  style="table-layout: auto; border-width: thin; border-color: navy; border-style: ridge inset">
 
<table  style="table-layout: auto; border-width: thin; border-color: navy; border-style: ridge inset">
 
   <tr><th colspan=3 style="color: WHITE; background-color: NAVY">SQL Directives</th></tr>
 
   <tr><th colspan=3 style="color: WHITE; background-color: NAVY">SQL Directives</th></tr>

Revision as of 16:44, 29 June 2005

RPG IV with Embedded SQL

Introduction to RPG IV with Embedded SQL

SQL is a powerful tool in any programmer's skill set. It is possible to leverage this tool from within RPG (& other languages). The source member type for these programs is SQLRPGLE. Here is an example of an embedded SQL statement:

     C/EXEC SQL
     C+ SELECT * FROM mylib/myfile
     C/END-EXEC
SQL Directives
Directive Function performed
SELECT The Select directive is used to extract data from a Physical file or Table