Understanding the SQR Command Line

You can use the SQR command line to specify flags and to pass arguments to modify your program at runtime.

You can enter command-line flags such as -Bnn, -KEEP, or -S in the command line to modify some aspect of program processing or output. Command-line arguments are typically answers to requests (done in the SQR program by ASK or INPUT commands) for user input.

The following code example and table describe the syntax of the SQR command line:

SQR [program] [connectivity] [flags ...] [args ...] [@file ...]

Argument

Description

program

The name of the program. The default file type or extension is .sqr. If the parameter is entered as a question mark (?) or omitted, SQR prompts you for the program name. On UNIX/Linux-based systems, if your shell uses the question mark as a wildcard character, you must precede it with a backslash (\).

connectivity

Oracle: Use [Username]/[Password[@Data­base]] as your username and password for the database. You can also specify the connection string for the database (for example, @B:ORASERVER).

The information that SQR needs to connect to the database. If the parameter is entered as a question mark or omitted, SQR prompts you for it. The information you enter depends on the database you are using:

DB2: Use Ssname and SQLid for the subsystem name and SQL authorization ID.

Informix: Use Database as the name of the database.

ODBC: Use Data_Source_Name/[Username]/[Password] as the name of the ODBC driver when you set up the driver and your username and password for the database.

flags

Any of the flags that are listed in the SQR Language Reference. Begin command-line flags with a hyphen. When a flag has an argument, enter the argument directly following the flag with no intervening space.

See SQR Command-Line Flags.

args...

Arguments that are used by SQR while the program is running. Arguments that are listed here are used by the ASK and INPUT commands rather than prompting the user. Arguments must be entered in the command line in the same sequence that they are expected by the program: first all ASK arguments in order and then INPUT arguments in order.

@file...

File containing program arguments, one argument per line. Arguments listed in the file are processed one at a time. You can specify the command-line arguments program, connectivity, and args in this file.