This book is intended for programmers who want to write applications that will use SQL to access an AS/400 database.
It is assumed that you possess an understanding of system administration, database administration, or application programming for the AS/400, as provided by the SQL Programming Concepts book and that you have some knowledge of the following:
References in this book to RPG and COBOL refer to the RPG or COBOL language in general. References to COBOL for AS/400, ILE COBOL for AS/400, ILE RPG for AS/400, or RPG III (part of RPG for AS/400) refer to specific elements of the product where they differ from each other.
This manual is a reference rather than a tutorial. It assumes you are already familiar with SQL programming. This manual also assumes that you will be writing applications solely for the AS/400.
If you need more information about using SQL statements, statement syntax, and parameters, see the SQL Programming Concepts book.
If you are planning applications that are portable to other IBM environments, it will be necessary for you to refer to books for those environments in addition to this one (such as IBM SQL Reference Version 2, SC26-8416).
The examples of SQL statements shown in this guide are based on the sample tables in Appendix A of the SQL Programming Concepts book and assume the following:
Whenever the examples vary from these assumptions, it is stated.
Throughout this book, syntax is described using the structure defined as follows:
The >>--- symbol indicates the beginning of a statement.
The ---> symbol indicates that the statement syntax is continued on the next line.
The >--- symbol indicates that a statement is continued from the previous line.
The --->< symbol indicates the end of a statement.
Diagrams of syntactical units other than complete statements start with the >--- symbol and end with the ---> symbol.
>>-required_item-----------------------------------------------><
>>-required_item---+---------------+---------------------------><
'-optional_item-'
If an optional item appears above the main path, that item has no effect on the execution of the statement and is used only for readability.
.-optional_item-.
>>-required_item---+---------------+---------------------------><
If you must choose one of the items, one item of the stack appears on the main path.
>>-required_item----+-required_choice1-+-----------------------><
'-required_choice2-'
If choosing one of the items is optional, the entire stack appears below the main path.
>>-required_item----+------------------+-----------------------><
+-optional_choice1-+
'-optional_choice2-'
If one of the items is the default, it will appear above the main path and the remaining choices will be shown below.
.-default_choice--.
>>-required_item----+-----------------+------------------------><
+-optional_choice-+
'-optional_choice-'
.-------------------.
V |
>>-required_item-------repeatable_item--+----------------------><
If the repeat arrow contains a comma, you must separate repeated items with a comma.
.-,-----------------.
V |
>>-required_item-------repeatable_item--+----------------------><
A repeat arrow above a stack indicates that you can repeat the items in the stack.