Displays one or more variables or literals on the screen. Cursor control is supported for ANSI terminals.
SHOW[cursor_position] [CLEAR-SCREEN|CS|CLEAR-LINE|CL][any_lit|_var|_col] [EDIT edit_mask|NUMBER|MONEY|DATE][BOLD][BLINK] [UNDERLINE][REVERSE][NORMAL][BEEP][NOLINE]...
Position to begin the display.
Clears the screen and sets the cursor position to (1,1).
Clears a line from the current cursor position to the end of the line.
Variables under an edit mask. If the mask contains spaces, enclose it in single quotes. For additional information regarding edit masks, see PRINT.
Formats any_lit|_var|_col with the NUMBER‑EDIT-MASK from the current locale. (See ALTER-LOCALE.) Not legal for date variables.
Formats any_lit|_var|_col with the MONEY‑EDIT-MASK from the current locale. (See ALTER-LOCALE.) Not legal for date variables.
Formats any_lit|_var|_col with the DATE‑EDIT‑MASK from the current locale. (See ALTER-LOCALE.) Not legal for numeric variables. If DATE‑EDIT‑MASK is not specified, the date is displayed using the default format for that database (see Table 61, Default Formats by Database).
BOLD, BLINK, , UNDERLINE, and REVERSE
Changes the display of characters. Some terminals support two or more characteristics at the same time for the same text. To turn all special display characteristics off, use NORMAL.
Turns off all special display characteristics set with BOLD, BLINK, UNDERLINE, and REVERSE.
Any number of variables and screen positions can be used in a single command. Each one is processed in sequence.
Screen locations can be indicated by either fixed or relative positions in the format (A,B), where A is the line and B is the column on the screen. A and B can also be numeric variables. Relative positions depend on where the previous SHOW command ended. If the line was advanced, the screen cursor is usually immediately to the right of the previously displayed value and one line down.
Fixed or relative cursor positioning can be used only within the boundaries of the terminal screen. Scrolling off the screen using relative positioning, for example (+1,1), is not supported. Instead, use SHOW without any cursor position when you want to scroll. You cannot mix SHOW and DISPLAY while referencing relative cursor positions.
SHOW does not advance to the next line if a cursor location (...), CLEAR‑SCREEN, CLEAR-LINE, or BEEP is used. (SHOW without any of these arguments automatically advances the line.) To add a line advance, add (+1,1) to the end of the line or use an extra empty SHOW command.
Only ANSI terminals are supported for cursor control, screen blanking, line blanking, and display characteristics.
Dates can be contained in a date variable or column, or a string literal, column, or variable. When displaying a date variable or column, without an edit mask, the date is displayed according to the following rules:
For DATETIME columns and Production Reporting DATE variables, Production Reporting uses the format specified bySQR_DB_DATE_FORMAT. If not set, Production Reporting uses the first database-dependent format in Table 61, Default Formats by Database.
For DATE columns, Production Reporting uses the format specified by SQR_DB_DATE_ONLY_FORMAT. If not set, Production Reporting uses the format in Table 62, DATE Column Formats.
For TIME columns, Production Reporting uses the format specified by SQR_DB_TIME_ONLY_FORMAT. If not set, Production Reporting uses the format in Table 63, TIME Column Formats.
When displaying a date in a string literal, column, or variable using EDIT or DATE, the string must be in the format specified by SQR_DB_DATE_FORMAT, one of the database-dependent formats in Table 61, Default Formats by Database, or the database-independent format 'SYYYYMMDD[HH24[MI[SS[NNNNNN]]]].
Produces the following output:
123-45-6789
Produces the following output:
1,234,567.89
Produces the following output:
123.780000
! ! Show a number using the locale default numeric edit mask ! alter-locale number-edit-mask = '99,999,999.99' show 123456.78 number
Produces the following output:
123,456.78
! ! Show a number using the locale default money edit mask ! alter-locale money-edit-mask = '$$,$$$,$$8.99' show 123456.78 money
Produces the following output:
$123,456.78
! ! Show a date column using the locale default date edit mask ! begin-select dcol from tables end-select alter-locale date-edit-mask = 'DD-Mon-YYYY' show &dcol date
Produces the following output:
01-Jan-1999
Produces the following output:
Hello World
! ! Show two values on the same line with editing of the values ! let #taxes = 123456.78 show 'You owe ' #taxes money ' in back taxes.'
Produces the following output:
You owe $123,456.78 in back taxes.
The following program illustrates the usage of additional options of SHOW. Only terminals that support the ANSI escape characters can use the cursor control, screen blanking, line blanking and display attributes.
begin-program ! ! Produces a menu for the user to select from ! show clear-screen (3,30) bold 'Accounting Reports for XYZ Company' normal (+2,10) '1. Monthly Details of Accounts' (+1,10) '2. Monthly Summary' (+1,10) '3. Quarterly Details of Accounts' (+1,10) '4. Quarterly Summary' ! ! Show a line of text and numerics combined ! show (+2,1) 'The price is ' #price edit 999.99 'Total = ' #total edit 99999.99 ! ! Put an error message on a particular line ! show (24,1) clear-line 'Error in SQL. Please try again.' beep end-program
LET for information on copying, editing, or converting fields
The EDIT parameter of PRINT for edit mask descriptions
ALTER-LOCALE for a description of NUMBER-EDIT-MASK, MONEY-EDIT-MASK, and DATE-EDIT-MASK