Chapter Contents

Previous

Next
Window Directory

Termin Window

Termin Window

[IMAGE]

DESCRIPTION
The Termin window is used to type terminal input requested by a program, CLIST, or EXEC. By default, the debugger intercepts program input requests, opens the Termin window, and prompts you for input. As shown in Termin Window, there are three areas in the Termin window: a status and prompt line, an optional scale or ruler line, and the input field.

Status and prompt line The Termin window is controlled by the following fields located in the status and prompt line:

Read..., Exec..., or Cont... prompt
flashes to indicate that input is required. This prompt displays Read... or Exec... when the window is first opened. Read... displays to indicate that the input is requested by a program, and Exec... displays to indicate that input is requested by a CLIST or an EXEC. If you continue input, as described later in Entering terminal input, this prompt changes to Cont..., indicating that additional input is required.

Intercept:
controls the input intercept. By default, Intercept is set to Y (yes), which causes the Termin window to automatically intercept terminal input requests. Typing N (no) in this field turns off the input intercept.

Returning to line mode also turns off the intercept. Returning to full-screen mode automatically restores the previous status of the intercept.

Log:
determines whether input that is typed into the Termin window is copied to the Log window. By default, Log is set to N (no). Typing Y (yes) in this field sends a copy of the input to the Log.

Note: The Config window can be used to select a unique color for terminal input that is copied to the Log window.

EOF:
is normally set to N (no) but can be temporarily set to Y (yes) to signal an end-of-file condition when the Termin window is prompting you for input. If you intend to continue a line, specify Y only on the last display.

The EOF: prompt is also used to return a condition code to a CLIST or EXEC. See Using the Termin window with the dbinput command later in this section.

Scale:
displays a scale, or column ruler, on the second line of the Termin window. By default, this field is set to Y (yes), displaying the scale. If this field is set to N (no), the scale is not displayed and the window shrinks by one line. Setting it back to Y causes the window to grow by one line and the scale to be redisplayed.

Typing Terminal input Terminal input is typed into the input field following the : prompt, which is located directly under the scale prompt. If there is not sufficient space in the input field, you can resize the Termin window horizontally or you can continue input using the backslash (\) as the continuation character. If input is continued in this manner, the flashing Read... or Exec... prompt is replaced by a flashing Cont... prompt. Another \ character can be used to repeat the process. You can type up to 255 characters. If more than 255 characters are entered, the debugger truncates to 255.

terminal input prompt If the prompt is terminated with a \ n, then the \ n appears at the end of the prompt area as two separate characters, a \ and an n. Input prompts greater than 64 characters long are truncated. If a \ and an n had been the 64th and 65th characters, then the prompt would have been truncated after 63 characters.

Restrictions while input is pending You can move between windows and examine variables while either the flashing Read... or Cont... prompt is displayed in the Termin window; however, you cannot issue any command that continues execution. Satisfying the input request by typing input at the Termin window is the only way to return control to the program and automatically continue execution. Also, you cannot close the Termin window while the Read..., Exec..., or Cont... prompt is displayed.

Turning off the Intercept prompt If it is not possible to open the Termin window, the debugger turns off the intercept. This can occur when you have too many windows open at the same time. You can change the default setting of the Intercept:, or any other prompt, by making the selections you want in the Termin window and saving the changes to your configuration file. Changes are saved with the config save command. See Setting Up a Configuration File for more information.

Resizing the Termin window You can resize the Termin window horizontally to enable additional information to be input on a line as described earlier. However, you cannot resize the window vertically.

Using the Termin window with the dbinput command In full-screen mode, the Termin window is used to type input required by a dbinput command. In this case the : prompt is changed to display the prompt string that is specified by the STRING argument of the dbinput command. For example, Display 11.17 Termin Window Prompt String shows the Termin window as it would be displayed if the intercept were caused by the following dbinput command:

dbinput EXEC_VAR "Is a mapping of struct worddata desired? (y for yes):"

In this case, input entered in the Termin window is assigned the CLIST or EXEC variable named EXEC_VAR.

Display 11.17 Termin Window Prompt String

[IMAGE]

When you are using the Termin window in conjunction with the dbinput command, the EOF: prompt is used to return a condition code to the CLIST or EXEC that contains the dbinput command. Setting the EOF: prompt to Y causes a condition code of -13 to be returned to an EXEC or +13 to a CLIST. It also causes the stack to be flushed if the return code is being passed to a CLIST.

When too many windows are opened, the debugger might not be able to open the Termin window. If the Termin window cannot be opened, a prompt is displayed, and you can still type the input that is required by the dbinput command called from a CLIST or EXEC. Once input is typed, you can continue your debugging session.

ADDITIONAL DISCUSSION
Looking at Terminal I/O

SEE ALSO
The dbinput command for the Termout Window


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.