Report-IV Commands
The following section describes Report-IV commands.
Introduction
Section titled “Introduction”The following commands can be used in sections other than the REPORT-SECTION:
- CONNECT REPORT
- INPUT MESSAGE
- RUN PUBLIC
- TERM KEY
Conventions
Section titled “Conventions”This section provides information on specifications that can be entered into a report definition. The commands and variables are arranged alphabetically, and the information for each entry is organized in the following way:
FUNCTION
A brief description of the action or purpose of each command or variable.
SYNTAX
An outline of command or variable structure, including syntax and readability options. Parameter choices are detailed directly following the command.
NOTES
Remarks and important information on command or variable syntax and the function of a command or variable in the FILE-SECTION.
EXAMPLES
Typical examples of command and variable usage.
Where there is more than one Format for a command, the beginning of each command is shown in boldface letters and the choices are separated by a blank line. In some cases different command formats are handled in separate sections, e.g., PRINT HELP and PRINT MESSAGE.
As long as the elements within a command are separated by spaces and fall within the command area of a report, no indentation is required. For readability, the syntax is represented with standard indentation to highlight clauses and options under each command.
For more examples of Report-IV commands, declarations, and variables, see the Sample Reports section.
CONNECT REPORT
Section titled “CONNECT REPORT”FUNCTION
CONNECT REPORT allows a report to be executed from within another report definition, script, method, etc.
SYNTAX
CONNECT REPORT report-name- report-name
- is a string variable, string constant or Report-IV Data Name. It contains the name of the report to be executed.
NOTES
-
All parameters of the current report (page, number, line count, etc.) are passed into report-name. This allows two reports to be merged into one common output.
-
CONNECT REPORT can be used to solve file relationship problems such as several one-to-many relationships, for example:
Customer fileKey: CUST-CODECustomer Alternate Address fileKey: CUST-CODE + ADDR-CODECustomer Contact fileKey: CUST-CODE + CONTACTFor each customer there can be several addresses and several contacts. CONNECT REPORT allows a small report of customer addresses and customer contacts to be merged into the output of the main customer report.
-
CONNECT REPORT is valid on:
I lines in the ENTRY-SECTION
T lines in the ENTRY-SECTION.
CTnnE lines in the CONTROL-SECTION.
Any command line in the REPORT-SECTION, for example, DC and CBnnC lines.
INPUT MESSAGE
Section titled “INPUT MESSAGE”FUNCTION
This command uses messages from the Dictionary-IV dictionary to prompt for and accept operator input from the terminal.
SYNTAX
I101 INPUT MESSAGE msg-code-string INTO Data Name/variable: USING "msg-dict-name": msg-code-string: type, number [,display-mode [,clear [, (col,ln): [,*1-replacement [,*2-replacement...]]]]]- type
- Use of the following valid values:
I Input.
N Non-input.
P Prompt.
Y Yes/No.
i Input, prints data from INTO Data Name or variable as default value.
n Non-input, no suffix, no carriage return needed.
x Non-input, no suffix, carriage return needed.
- number
- the number of a message in the Dictionary-IV dictionary.
- display-mode
- Use one of the following valid values:
| (blank) | Standard print mode. |
|---|---|
| B | Background. |
| C | Clear message area and exit. |
| F | Foreground. |
| R | Reverse video foreground. |
| X | Return message, do not print. |
| r | Reverse video background. |
- clear
- Use one of the following valid values:
| A | Clear line before and after. |
| B | Clear line before. |
| C | Clear line after. |
| D | Clear message area after. |
| E | Clear Screen before and after. |
| F | Clear Screen before. |
| G | Clear Screen after. |
| X | Do not clear. |
| (blank) Do not clear. |
- col,ln
- he column and line position of the display, where (0,0) specifies the top left of the Screen.
- *1-replacement
- if the message number is null, this can specify a message. If the message number is not null this contains a string value that is to be placed in a message that contains *1, *2, etc.
- msg-dict-name
- the name of an Dictionary-IV defined message dictionary.
- Data Name/variable
- a numeric data name or variable name.
NOTES
-
INPUT MESSAGE msg-code-string INTO prints the specified message from the message dictionary and stores operator response in the Data Name or variable specified by the INTO clause.
-
All parameters specified with the INPUT MESSAGE command override the values defined for the message in the message dictionary.
-
The replacement value in the msg-code-string can specify a replacement value that is to be placed in a message that contains *1, *2, etc.
-
In order to perform a replacement, the message must contain a *1. If the replacement value is ABCD, and the message is File *1 is busy, then the displayed message will be File ABCD is busy. For each substitution there is another *n entry in the message, where n is a positive integer.
-
To display a non-dictionary message using the msg-code-string options, specify a null message number, any display-mode, clear, or position options and a *n-replacement that equals the message you wish to display.
-
The TERM-KEY variable can be used to specify an input time limit.
-
INPUT MESSAGE is valid on:
I lines in the ENTRY-SECTION.
T lines in the ENTRY-SECTION.
CTnnE lines in the CONTROL-SECTION.
Any command line in the REPORT-SECTION, for example, DC and CBnnC lines.
EXAMPLES
DN INPUT-FLAG(1)I102 INPUT MESSAGE "Y,5" INTO INPUT-FLAG: USING "4SSAMPLE": IF INPUT-FLAG = "Y" THEN: LET INPUT-FLAG = "T": ELSE: IF INPUT-FLAG = "N" THEN: LET INPUT-FLAG = ""RUN PUBLIC
Section titled “RUN PUBLIC”FUNCTION
This command executes a public script.
SYNTAX
I101 RUN PUBLIC script-name [,value/name [,value/name]...]- script-name
- a string data name, variable, constant, or expression that specifies the name of a public script defined in the Dictionary-IV dictionary.
- value/name
- a data name, variable, constant, or expression to be passed into and/or returned from the public script.
NOTES
-
RUN PUBLIC executes a public script and can pass and receive values.
-
If a value or name list is specified for the RUN PUBLIC command, there must be a corresponding ENTER PUBLIC command in the public script, and the value or name list in both scripts must agree in type.
-
When the public script is terminated, execution returns to the report at the command line following the RUN PUBLIC.
-
RUN PUBLIC can be used on:
I lines in the ENTRY-SECTION.
T lines in the ENTRY-SECTION.
CTnnE lines in the CONTROL-SECTION.
DC lines in the REPORT-SECTION.
HC lines in the REPORT-SECTION
FC lines in the REPORT-SECTION.
STnnC lines in the REPORT-SECTION.
CTnnC lines in the REPORT-SECTION.
CBnnC lines in the REPORT-SECTION.
TERM-KEY
Section titled “TERM-KEY”FUNCTION
This report variable interacts with the INPUT MESSAGE and CONNECT REPORT command. TERM-KEY returns a numeric value corresponding to the key entered by the operator.
SYNTAX
TERM-KEYNOTES
-
Only termination keys and special keys return a value to TERM-KEY. Field edit keys, which are used to perform editing functions in these commands, do not affect the value of TERM-KEY.
-
In an INPUT [Thoroughbred Basic options] command, the TERM-KEY variable is not used. The value of a function key entered by the operator is returned to the Thoroughbred Basic CTL variable.
-
TERM-KEY can be used to specify the number of seconds to be allowed for an INPUT MESSAGE. Prior to anticipated input, set TERM-KEY to a negative integer value from -101 through -32867. The specified input time limit equals (TERM-KEY value +100) * (-1) seconds. A time-out occurs when the time limit is exceeded. A time-out automatically terminates the input and sets TERM-KEY to a value of -99.
-
Please refer to the following chart for terminal keyboard values.
TERMINAL KEYBOARD VALUES (TERM-KEY)
E Field Edit Keys (edit and move within a field)
T Termination Keys (terminates input to a field)
C Field Control Keys (move between fields)
S Special Purpose Keys (performs a fixed function, cannot override)
Value Special Key Type (Function) Value Special Key Type (Function)16 Function Key 16 T -05 Back Space E
15 Function Key 15 T -06 Character Delete E
14 Function Key 14 T -07 Character Insert E
13 Function Key 13 T -08 Line Insert T
12 Function Key 12 T -09 Line Delete T
11 Function Key 11 T -10 Line Erase E
10 Function Key 10 T,C (Goto Field) -11 Page Erase T
09 Function Key 09 T -12 Tab E
08 Function Key 08 T -13 Back Tab E
07 Function Key 07 T -14 Home E
06 Function Key 06 S (Help) -15 Control P (None)
05 Function Key 05 T -16 Page Down T,C(Last Field)
04 Function Key 04 S (End) -17 Page Up T,C
(First Field)
03 Function Key 03 T -18 Screen Down T
02 Function Key 02 T -19 Screen Up T
01 Function Key 01 T -20 Boundary Down T
00 Return/Enter T -21 Boundary Up T
-01 Right Arrow E -22 User Defined
-02 Left Arrow E -99 Input Time-out Occurred
-03 Down Arrow T,C (Next Field) -101 1-Second Input Time Limit
-04 Up Arrow T,C -32867 (32867-second input time limit)(Previous Field)
EXAMPLES
I110 INPUT MESSAGE "I,12" INTO U0$: USING "UTMSGS"
I112 IF TERM-KEY = 4 THEN: GOTO 901From the Report-IV Reference, version 8.9.1. Open this page in the PDF