The Start Structured Query Language (STRSQL) command starts the interactive SQL program. The program starts the statement entry of the interactive SQL program which immediately shows the Enter SQL Statements display. This display allows you to build, edit, enter, and run a SQL statement in an interactive environment. Any messages during the running of the program are shown on this display.
Specifies whether SQL statements are run under commitment control.
*NONEor*NC
Specifies that commitment control is not used. Uncommitted changes in other jobs can be seen. If the SQL DROP SCHEMA statement is included in the program, *NONE or *NC must be used.
*CHG or *UR
Specifies the objects referred to in SQL ALTER, CALL, COMMENT ON, CREATE, DROP, GRANT, LABEL ON, RENAME, and REVOKE statements and the rows updated, deleted, and inserted are locked until the end of the unit of work (transaction). Uncommitted changes in other jobs can be seen.
*CS
Specifies the objects referred to in SQL ALTER, CALL, COMMENT ON, CREATE, DROP, GRANT, LABEL ON, RENAME, and REVOKE statements and the rows updated, deleted, and inserted are locked until the end of the unit of work (transaction). A row that is selected, but not updated, is locked until the next row is selected. Uncommitted changes in other jobs cannot be seen.
*ALL or *RS
Specifies the objects referred to in SQL ALTER, CALL, COMMENT ON, CREATE, DROP, GRANT, LABEL ON, RENAME, and REVOKE statements and the rows selected, updated, deleted, and inserted are locked until the end of the unit of work (transaction). Uncommitted changes in other jobs cannot be seen.
*RR
Specifies the objects referred to in SQL ALTER, CALL, COMMENT ON, CREATE, DROP, GRANT, LABEL ON, RENAME, and REVOKE statements and the rows selected, updated, deleted, and inserted are locked until the end of the unit of work (transaction). Uncommitted changes in other jobs cannot be seen. All tables referred to in SELECT, UPDATE, DELETE, and INSERT statements are locked exclusively until the end of the unit of work (transaction).
Specifies the list of libraries that are shown when you request list support from the Enter SQL Statements display (F4, F16, F17, F18). If you do not have *EXECUTE authority for a specified library, that library is not shown.
*LIBL
All libraries in the job's library list are searched until the first match is found.
*CURLIB
The job's current library is shown.
*USRLIBL
Only the libraries in the user portion of the job's library list are shown.
*ALL
All of the libraries in the system, including QSYS, are shown.
*ALLUSR
All user libraries are searched. All libraries with names that do not begin with the letter Q are searched except for the following:
Although the following Qxxx libraries are provided by IBM, they typically contain user data that changes frequently. Therefore, these libraries are considered "user libraries", and are also searched:
Note: A different library name, of the form QUSRVxRxMx, can be created by the user for each release. VxRxMx is the version, release, and modification level of the library.
Specifies what types of objects are displayed when you request list support from the Enter SQL Statements display (F16, F17, and F18) or from a prompt (F4) display.
Specifies when the display select output data is refreshed. This parameter does not apply to any SQL SELECT statements that require the creation of a temporary result.
*ALWAYS
The data is always refreshed. You cannot specify *ALWAYS for this parameter and *OPTIMIZE for the Allow copy of data (ALWCPYDTA) parameter.
*FORWARD
The data is refreshed only as the user pages forward to the end of the data for the first time. After that, it is not refreshed.
Specifies whether a copy of the data can be used when running a SELECT statement.
*YES
A copy of the data can only be used, if necessary, to run a SELECT statement.
*OPTIMIZE
The system chooses whether to use the data retrieved directly from the database or to use a copy of the data. The decision is based on which choice provides the best performance.
This value decreases the time required for the total query. Since the copy of the data must be made before returning the first row of the result table, the time to retrieve the first row may be increased.
*NO
A copy of the data is not allowed. If the clauses in the SELECT statement require a copy of the data, an error message is returned. If the SELECT statement runs successfully, current data was used.
Specifies the format used when accessing date result columns. All output date fields are returned in the format you specify. For input date strings, the value you specify is used to determine whether the date is a valid format.
Note: An input date string that uses the format *USA, *ISO, *EUR, or *JIS is always valid.
If you connect to a relational database that is on a system that is not IBM i, the format must be *USA, *ISO, *EUR, or *JIS.
*JOB
The format specified for the job at precompile time or when a new interactive SQL session is created is used.
Use the Display Job (DSPJOB) command to determine the current date format for the job.
*USA
The United States date format mm/dd/yyyy is used.
*ISO
The International Organization for Standardization (ISO) date format yyyy-mm-dd is used.
*EUR
The European date format dd.mm.yyyy is used.
*JIS
The Japanese Industrial Standard date format yyyy-mm-dd is used.
Specifies the separator to be used when accessing date result columns.
Note: This parameter applies only when *JOB, *MDY, *DMY, *YMD, or *JUL is specified for the Date format (DATFMT) parameter.
*JOB
The date separator specified for the job at precompile time, when a new interactive SQL session is created, or when Run SQL Statement (RUNSQLSTM) command is run.
Use the Display Job (DSPJOB) command to determine the current date separator value for the job.
Specifies the format used when accessing time result columns. All output time fields are returned in the format you specify. For input time strings, the value you specify is used to determine whether the time is specified in a valid format.
Note: An input time string that uses the format *USA, *ISO, *EUR, or *JIS is always valid.
If you connect to a relational database that is on a system that is not another IBM i, the time format must be *USA, *ISO, *EUR, *JIS, or *HMS with a time separator of a colon or period.
*HMS
The hh:mm:ss format is used.
*USA
The United States time format hh:mmxx is used, where xx is AM or PM.
*ISO
The International Organization for Standardization (ISO) time format hh.mm.ss is used.
*EUR
The European time format hh.mm.ss is used.
*JIS
The Japanese Industrial Standard time format hh:mm:ss is used.
Specifies the decimal point character to be used for numeric constants in SQL statements. This value is also used as the decimal point character when casting between character and numeric values.
*JOB
The representation for the decimal point is the value used by the job running the statement.
*SYSVAL
The QDECFMT system value is used as the decimal point character.
This command starts the Interactive SQL program. The program starts the statement entry of the interactive SQL program which immediately shows the Enter SQL Statements display. This display allows you to build, edit, enter, and run a SQL statement in an interactive environment.