Previous Topic: YRUNSQL (Start Interactive SQL Session)Next Topic: YSCNRPLSRC (Scan/Replace Source Member)


Parameters

Parameter

Definition

Value and Description

STMT

Specifies the SQL statement to be processed. This can be any SQL statement that is valid in an interactive SQL session, such as a SELECT or an UPDATE statement

  • *STRSQL: Starts an interactive SQL session, using the default values specified for the Start SQL Interactive Session (STRSQL) command.

_ sql-statement: Specifies a valid SQL statement to be processed.

IGNCAS

Specifies whether the statement should be treated as case-insensitive.

  • *NO: Considers case-sensitivity.
  • *YES Ignores case-sensitivity.

FILE

Specifies the file to be overridden. This should be a file used in the SQL statement (or used in a statement to be supplied in the interactive SQL session.) any references to the unqualified file name in the SQL statement will be overridden to use this file and the member specified in the Member prompt (MBR parameter).

  • *NONE: Specifies that no file is overridden. If the SQL statement (or a statement used in the interactive SQL session) refers to an unqualified file, the copy of the file highest in the library list is used.
  • file-name: Specifies a file that will be used to override the same-named unqualified file in the SQL statement.

The name of the file can be qualified by one of the following library-values:

  • *LIBL: Searches all libraries in the job’s library list until the first match is found.
  • *CURLIB: Searches the current library for the job. If no library is specified as the current library for the job, the QGPL library is used.
  • library-name: Specifies the name of the library to be searched.

MBR

Specifies the file member to be overridden to. This parameter is ignored if FILE (*NONE) is specified.

  • *FIRST Specifies the file in the FILE parameter is overridden to use the *FIRST member.
  • member-name Specifies the file in the FILE parameter is overridden to use the specified member.

OUTPUT

Specifies whether the output from the command is shown at the requesting work station, printed with the job’s spooled output, or directed to a database file.

  • *: Indicates the output produced by the query is formatted and, in interactive mode, sent to the work station that runs the command. If the command is run in batch mode, the output is sent to the default printer used by query management.
  • *PRINT: Indicates the output produced by the query is formatted and sent to the default printer used by query management.
  • *OUTFILE: Indicates the output produced by the query is written to the database file specified in the Output File prompt (OUTFILE parameter).

OUTFILE

Specifies the database file to receive the query output. If the file specified does not exist, the system creates it in the specified library as a table in a collection. If the file is created by this function, the authority for users without specific authority is *EXCLUDE.

  • database-file-name: Specifies the name of the database file that receives the output of the command.

The name of the database file can be qualified by one of the following library values:

  • *LIBL: Searches all libraries in the job’s library list until the first match is found.
  • *CURLIB: Searches the current library for the job. If no library is specified as the current library for the job, the QGPL library is used.
  • library-name: Specifies the name of the library to be searched.

OUTMBR

Specifies the name of the database file member to which the output is directed.

  • *FIRST: Indicates that the first member in the file receives the output. If no members exist in the file, the system creates a member with the name of the file specified in the Output File prompt (OUTFILE parameter).
  • member-name: Specifies the name of the file member that receives the output. If the name does not exist, the system creates it.

The possible actions to take values are:

  • *REPLACE: Clears the file before new records are inserted.
  • *ADD: Adds new records after any existing record.