For workstation-attached systems, a set of command line options is supported for use. Option specification is identifiable by flag syntax use whereby an option name is immediately preceded by a dash character. The following command line options are supported:
Use of Command Line Options
When these options and BTEQ commands are specified on the command line, the command line options must be defined first. Examples for using the command line options include those shown in the following table:
Command Line Options | Description |
---|---|
bteq | Interactive mode: charset and I/O encoding default to ASCII. |
bteq -c ASCII < script | Batch mode using an ASCII script: charset and I/O encoding are ASCII. |
bteq -c KANJISJIS_0S | Interactive mode: charset and I/O encoding are KanjiShift-JIS. |
bteq -c UTF8 < script | Batch mode using a UTF-8 script: charset and I/O encoding are UTF8. |
bteq -ob -c UTF16 < script > out 2>&1 | Batch mode using a UTF-16 script: charset and I/O encoding are UTF16. A single BOM is written to the beginning of the "out" file. |
bteq -e UTF8 -c UTF16 < script | Batch mode using a UTF-8 script: charset is UTF16, I/O encoding is UTF8. |
bteq -e 62 -c 63 < script | Batch mode using a UTF-16 script: charset is UTF8, I/O encoding is UTF16. |
bteq -c utf16 -m | Interactive mode: charset is UTF16, I/O encoding based on locale. |
bteq -c utf8 -m | Interactive mode: charset is UTF8, I/O encoding based on locale. |
If the command line entries do not contain flag options, the input is treated as though it came from stdin/SYSIN. This is true for both Workstation as well as Mainframe BTEQ. For Mainframe BTEQ, the command line input can be passed in the JCL PARM parameter of the BTEQ STEP, and should follow following IBM/C rules for specifying the run-time options and program arguments:
When... | Format |
---|---|
Only run-time options are present | run-time options/ |
Only program arguments are present
|
One of the following:
|
Both run-time options and program arguments are present, | run-time options / program arguments |
For example:
//BTEQ00 EXEC PGM=BTQMAIN,PARM='.RUN DDNAME RUNFILE'
(a leading '/' is needed because the logon string contains '/')
//BTEQ00 EXEC PGM=BTQMAIN,PARM='/.LOGON TDP0/MYDB,MYPW'