Tuesday, June 16, 2009

(Tutorial : SQL) Rules: Embedding SQL in RPG Code

a. All SQL statements must be coded on a C spec

b. SQL statements begin with /EXEC SQL in positions 7-15
- with the slash in position 7

c. and end with /END-EXEC in positions 7-15

d. You can enter SQL statements on the same line as /EXEC SQL
- However, /END-EXEC must be on a separate line

e. Between beginning and ending delimiters, all SQL statements
must have + in position 7

f. SQL statements cannot go past position 80

g. SQL statements cannot be included via a /COPY statement

You Might Also Want To Visit The Following Tutorial Posts:
AS/400 For Dummies
AS/400 Tutorial
SQL/400 Tutorial
Query/400 Tutorial

No comments:

Post a Comment