SQL\400/Introduction

SQL/400 is a proprietary dialect of SQL for the IBM AS/400, which was later rebranded as iSeries and finally as SystemI, business eServer Computer Platform. It comes in several flavors, or ways that SQL can be run.

All the AS/400 languages that support Static Embedded SQL also support Dynamic Embedded SQL.
 * Interactive SQL/400 which can be run from the Command line. Invoke STRSQL {Start SQL/400} and get at what looks like another command line, where we can key in SQL statements for immediate execution, and/or use the F4 Prompt function to navigate IBM DB2/400 data base, which is a version of UDB, IBM's Universal Data Base to get at the 400'ds files (tables) and their fields (columns), for incorporation in the SQL statement. Interactive SQL/400 is often used to identify statements needed to perform various programming actions.  When exiting an Interactive SQL/400 session, we have the option of saving a log of our activity, from which our successful SQL/400 statements may be copied into one of the other flavors of SQL/400.
 * SQL Query Manager is used to design and store SQL queries used to extract information, generate reports, and create procedures. Query Manager is an interface to SQL in which end users, unfamiliar with SQL, the programming language, can be prompted through what is needed to create inquiries and reports that are more sophisticated than what can be created by other tools, and can be rerun as needed.
 * Static Embedded SQL involves SQL statements hard coded inside another high level language program, such as RPG/400, Cobol/400, C/400, and REXX.  This is done because there are some areas where SQL is more powerful than other languages, but there are some things they can do that SQL can not.  See Comparative Computer Languages.  So the AS/400 programmer can pick and choose the Computer Language that is best suited to the needed function, with programs in different languages calling code in other languages a variety of ways.
 * Dynamic Embedded SQL
 * Other SQL/400 Applications. Suppose you connect to the AS/400 using a Personal Computer which has many PC Applications, such as Microsoft Excel.  You can put SQL statements inside an Excel cell which will access the AS/400 data base.  When you open the Excel, it immediately shows you the latest data from the data base.  You can then change the statements to change what data is selected for the Excel.

Languages that support Embedded SQL

 * C/400
 * Cobol/400
 * Fortran/400
 * PL/1
 * RPG (many different versions of RPG on the 400)
 * REXX