Document revision date: 19 July 1999
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]

DEC Text Processing Utility Reference Manual


Previous Contents Index

DECTPU performs the action you specify on all completion messages at the severity level you designate and on all messages of greater severity.

keyword

The keyword associated with a DECTPU completion message. DECTPU uses the keyword to determine the severity level of the associated completion message and performs the action you specify on all completion messages of that severity level or greater.

Description

With the SET (MESSAGE_ACTION_LEVEL) procedure, you can set the action that is taken when DECTPU returns a completion status of the specified severity.

The action you specify using SET (MESSAGE_ACTION_LEVEL) is taken for all completion messages of the specified severity or greater severity.

Signaled Errors

TPU$_TOOFEW ERROR SET (MESSAGE_ACTION_LEVEL) requires two parameters.
TPU$_TOOMANY ERROR You specified more than two parameters.
TPU$_INVPARAM ERROR One or more of the specified parameters have the wrong type.
TPU$_BADKEY ERROR You specified an invalid keyword.
TPU$_ILLSEVERITY WARNING Illegal severity specified; DECTPU used the severity "error."

Examples

The following example directs DECTPU to display informational, warning, and error messages in reverse video for 1/2 second, then in ordinary video:
#1

SET (MESSAGE_ACTION_TYPE, REVERSE); 
SET (MESSAGE_ACTION_LEVEL, 3); 
 
      

The following example directs DECTPU to ring the terminal's bell whenever a completion status occurs with a severity equal to or greater than the severity of TPU$_SUCCESS:

#2

SET (MESSAGE_ACTION_TYPE, BELL); 
SET (MESSAGE_ACTION_LEVEL, TPU$_SUCCESS); 
 
      


SET (MESSAGE_ACTION_TYPE)


Format

SET (MESSAGE_ACTION_TYPE, {NONE |BELL |REVERSE})


Parameters

MESSAGE_ACTION_TYPE

A keyword that indicates the action to be taken when DECTPU generates a completion status of the severity you specify.

NONE

A keyword that directs DECTPU to take no action. This is the default.

BELL

A keyword that directs DECTPU to ring the terminal's bell when a completion status of the specified severity is returned.

REVERSE

A keyword that directs DECTPU to display the completion status in reverse video for 1/2 second, then display the status in ordinary video.

Description

With the SET (MESSAGE_ACTION_TYPE) procedure, you can set the severity at which the action is taken. The action you specify using SET (MESSAGE_ACTION_TYPE) is taken for all completion messages of the specified severity or greater severity.

Signaled Errors

TPU$_TOOFEW ERROR SET (MESSAGE_ACTION_TYPE) requires two parameters.
TPU$_TOOMANY ERROR You specified more than two parameters.
TPU$_INVPARAM ERROR One or more of the specified parameters have the wrong type.
TPU$_BADKEY ERROR You specified an invalid keyword.

Example

The following example directs DECTPU to display informational, warning, and error messages in reverse video for 1/2 second, then in ordinary video:

SET (MESSAGE_ACTION_TYPE, REVERSE); 
SET (MESSAGE_ACTION_LEVEL, 3); 
 
      


SET (MESSAGE_FLAGS)


Format

SET (MESSAGE_FLAGS, integer)


Parameters

MESSAGE_FLAGS

A keyword that indicates that the SET built-in procedure is being used to specify which parts of messages are displayed.

integer

A bit-encoded value for the message code.

Description

The SET (MESSAGE_FLAGS) procedure specifies which items of a message DECTPU displays. Table 2-11 shows the message codes.

Table 2-11 Message Codes
Bit Value Meaning
0 1
0
Include text of message.
Do not include text of message.
1 1
0
Include message identifier.
Do not include message identifier.
2 1
0
Include severity level indicator.
Do not include severity level indicator.
3 1
0
Include facility name.
Do not include facility name.

If you do not set a value for the message flags, the default message flags for your process are used. Setting the message flags to 0 does not turn off the message text; it causes DECTPU to use the default message flags for your process.

In addition to setting the message flags from within DECTPU, you can set them at the DCL level with the SET MESSAGE command. The DCL SET MESSAGE command is the only way you can turn off all message text. See the OpenVMS DCL Dictionary for information on the DCL SET MESSAGE command.

Table 2-12 shows the predefined constants available for use with SET (MESSAGE_FLAGS).

Table 2-12 Message Flag Values for SET (MESSAGE_FLAGS)
Bit Constant Meaning
0 TPU$K_MESSAGE_TEXT Include text of message.
1 TPU$K_MESSAGE_ID Include message identifier.
2 TPU$K_MESSAGE_SEVERITY Include severity level indicator.
3 TPU$K_MESSAGE_FACILITY Include facility name.

Signaled Errors

TPU$_FLAGTRUNC WARNING Message flag values must be less than or equal to 15.
TPU$_INVPARAM ERROR One or more of the specified parameters have the wrong type.
TPU$_TOOFEW ERROR SET (MESSAGE_FLAGS) requires at least two parameters.
TPU$_TOOMANY ERROR SET (MESSAGE_FLAGS) accepts no more than two parameters.

Examples

The following example causes the message identifier to be the only item included in DECTPU messages. The integer 2 sets bit 1.
#1

SET (MESSAGE_FLAGS, 2) 
 
      

In the following example, the SET (MESSAGE_FLAGS) statement directs DECTPU to include only the message severity level in messages identified by keywords or integers. Because TPU$_TOOFEW is an error-level message, the MESSAGE statement above causes DECTPU to display "%E" in the message buffer. DECTPU does not display the text associated with the TPU$_TOOFEW keyword because the statement does not contain an integer or constant directing DECTPU to display the text.

#2

SET (MESSAGE_FLAGS, TPU$K_MESSAGE_SEVERITY); 
MESSAGE (TPU$_TOOFEW); 
 
      

For more information on using constants to specify message format, see the description of the MESSAGE_TEXT built-in procedure.


SET (MODIFIABLE)


Format

SET (MODIFIABLE, buffer, {ON |OFF |1 |0})


Parameters

MODIFIABLE

The ability to modify a buffer.

buffer

The buffer that will either be unmodifiable or able to be edited.

ON, 1

Makes the buffer modifiable.

OFF, 0

Makes the buffer unmodifiable, allowing only deletion of the buffer and setting of marks and ranges. Any attempt to change the buffer results in a warning message.

Description

With the SET (MODIFIABLE) procedure, you can set whether the buffer is modifiable or not. When a buffer is not modifiable, any attempt to insert, delete, or otherwise modify the contents of the buffer results in a warning message. This affects only the text within the buffer. You can still delete the buffer and you can still create or delete marks and ranges in the text within the buffer.

Newly created buffers are modifiable by default if a template buffer was not used on the call to the CREATE_BUFFER procedure. The modifiability status is taken from the template buffer if one was specified.

You cannot make the messages buffer unmodifiable.

Signaled Errors

TPU$_TOOFEW ERROR The SET (MODIFIABLE) built-in requires three parameters.
TPU$_TOOMANY ERROR You specified more than three parameters.
TPU$_INVPARAM ERROR One or more of the specified parameters have the wrong type.
TPU$_MSGBUFSET ERROR You cannot force the message buffer to be nonmodifiable.
TPU$_BADKEY ERROR Only the ON and OFF keywords are valid.

Example

The following example makes the current buffer unmodifiable. Any attempt to change the buffer fails with a warning message.

SET (MODIFIABLE, CURRENT_BUFFER, OFF) 
 
      


SET (MODIFIED)


Format

SET (MODIFIED, buffer, {ON |OFF |1 |0})


Parameters

MODIFIED

A keyword that directs DECTPU to turn on or turn off the indicator designating a buffer as modified.

buffer

The buffer whose indicator you want to control.

ON, 1

A keyword that directs DECTPU to mark a buffer as modified.

OFF, 0

A keyword that directs DECTPU to mark a buffer as unmodified.

Description

The SET (MODIFIED) procedure turns on or turns off the flag that indicates that the specified buffer has been modified. Use SET (MODIFIED) with caution. When you turn off the flag indicating that the buffer is modified, you could exit from an application layered on DECTPU without writing out the contents of a modified buffer. Be sure your extension or layered application handles this possibility.

Signaled Errors

TPU$_BADKEY WARNING You specified an invalid keyword as a parameter.
TPU$_INVPARAM ERROR One of the parameters was specified with data of the wrong type.
TPU$_NORETURNVALUE ERROR SET (MODIFIED) cannot return a value.
TPU$_TOOFEW ERROR Too few arguments passed to the SET (MODIFIED) built-in.
TPU$_TOOMANY ERROR Too many arguments passed to the SET (MODIFIED) built-in.

Example

The following example marks the current buffer as modified:

SET (MODIFIED, CURRENT_BUFFER, ON); 
 
      


SET (MOUSE)


Format

[[ {ON|OFF} := ]] SET (MOUSE, {ON |OFF |1 |0})


Parameters

MOUSE

Indicates that you are using SET to enable or disable DECTPU's mouse support. The default mouse setting depends on the terminal you are using. If the DECTPU statement GET_INFO (SCREEN, "dec_crt2") returns true on your terminal, mouse support is turned on by default; otherwise, mouse support is turned off by default.

ON, 1

Causes DECTPU to recognize mouse buttons when they are pressed, and lets you bind programs or procedures to mouse buttons. Enables the LOCATE_MOUSE and POSITION (MOUSE) built-in procedures.

OFF, 0

Disables DECTPU mouse support. Pressing a mouse button when the mouse is set to OFF has no effect.

Return Value


Optionally, returns the previous setting.

Description

With the SET (MOUSE) procedure, you can turn mouse support on or off. Because DECTPU mouse support disables the terminal emulator's cut and paste feature in non-DECwindows DECTPU, you must turn off DECTPU mouse support to use the non-DECTPU cut and paste capability while DECTPU is running.

The optional return value specifies whether DECTPU mouse support was enabled or disabled before the current SET (MOUSE) statement was executed. Thus, you can enable or disable mouse support and then reset the support to its previous setting without having to make a separate call.

Signaled Errors

TPU$_BADKEY WARNING The keyword must be either ON or OFF.
TPU$_MOUSEINV WARNING You tried to enable mouse support on an incompatible terminal.
TPU$_TOOFEW ERROR SET (MOUSE) requires two parameters.
TPU$_TOOMANY ERROR You specified more than two parameters.
TPU$_INVPARAM ERROR One or more of the specified parameters have the wrong type.

SET (MOVE_VERTICAL_CONTEXT)


Format

SET (MOVE_VERTICAL_CONTEXT, buffer, integer)


Parameters

MOVE_VERTICAL_CONTEXT

A keyword that indicates that the SET built-in procedure is being used to set the target column where the cursor should remain during MOVE_VERTICAL operations.

buffer

The buffer where cursor motion in the horizontal dimension will be restricted when the cursor moves vertically.

integer

An encoded integer that represents the column where the cursor will be restricted. This value is not a simple column number. It should be specified only with the value returned from the GET_INFO (buffer_variable, "move_vertical_context") built-in procedure.

Description

The SET (MOVE_VERTICAL_CONTEXT) procedure sets the specified buffer's target column for MOVE_VERTICAL operations when the COLUMN_MOVE_VERTICAL setting is on. This attempts to restrict the cursor to a column (in the horizontal dimension) during MOVE_VERTICAL operations.

When the COLUMN_MOVE_VERTICAL setting is on, DECTPU tries to keep the cursor in a single column during MOVE_VERTICAL operations. DECTPU saves the current vertical "context", which is more than just the column number, in order to provide this cursor behavior. The POSITION built-in procedure, however, can interfere with cursor positioning by resetting the column to the one that DECTPU tries to position to during subsequent MOVE_VERTICAL operations.

To avoid this problem, applications should save the current vertical context, use the MOVE_VERTICAL and POSITION built-in procedures, and then restore the vertical context. Applications save the vertical context by getting the value from the GET_INFO (buffer_variable, "move_vertical_context") built-in procedure. Applications restore the saved vertical context by using the SET (MOVE_VERTICAL_CONTEXT) built-in procedure and specifying the saved value for the integer parameter.

Signaled Errors

TPU$_TOOFEW ERROR SET (MOVE_VERTICAL_CONTEXT) requires three parameters.
TPU$_TOOMANY ERROR You specified more than three parameters.
TPU$_INVPARAM ERROR One or more of the specified parameters have the wrong type.

Example

The following example saves the value of the current buffer's vertical context before DECTPU positions the editing point to another buffer. After repositioning to the first buffer, the code sets the buffer's context back to its previous value.

saved_context := GET_INFO (CURRENT_BUFFER, "move vertical_context"); 
saved_location := MARK (FREE_CURSOR); 
POSITION (message_buffer); 
COPY_TEXT ("Unless you save the context before you use POSITION,"); 
COPY_TEXT ("you cannot restore the context after POSITION changes it."); 
POSITION (saved_location); 
SET (MOVE_VERTICAL_CONTEXT, CURRENT_BUFFER, saved_context); 
 
      


SET (NO_WRITE)


Format

SET (NO_WRITE, buffer [[{, ON |, OFF |, 1 |, 0}]])


Parameters

NO_WRITE

Specifies that DECTPU should not create an output file from the contents of a buffer after executing a QUIT or EXIT statement even if the buffer contents have been modified. By default, a buffer is written out if it has been modified.

buffer

The buffer whose contents you do not want written out.

ON, 1

Causes the buffer you name not to be written out.

OFF, 0

Lets you change a buffer from the no-write state to the default state. By default, any modified buffers are written out after execution of a QUIT or EXIT statement.

Description

With the SET (NO_WRITE) procedure, you can set whether an output file is written or not written.

Signaled Errors

TPU$_TOOFEW ERROR SET (NO_WRITE) requires three parameters.
TPU$_TOOMANY ERROR You specified more than three parameters.
TPU$_INVPARAM ERROR One or more of the specified parameters have the wrong type.
TPU$_BADKEY ERROR You specified an invalid keyword.

Examples

The following example causes my_buffer not to be saved in a file after execution of a QUIT or EXIT statement:
#1

SET (NO_WRITE, my_buffer) 

The following example turns off the no-write state of my_buffer. The contents of the buffer are written out after execution of a QUIT or EXIT statement if the buffer has been modified.

#2

SET (NO_WRITE, my_buffer, OFF) 
 
      


SET (OUTPUT_FILE)


Format

SET (OUTPUT_FILE, buffer, string)


Parameters

OUTPUT_FILE

A keyword that indicates that SET is to control creation of an output file for the contents of a buffer after execution of a QUIT or EXIT statement.

buffer

The buffer whose contents are written to the specified file.

string

The file specification for the file being written out. The default output file is the input file name and the highest existing version number for that file plus 1.

Description

The SET (OUTPUT_FILE) procedure specifies a file to be written out for the contents of the buffer. DECTPU does not write out the contents of a buffer after execution of a QUIT or EXIT statement if the buffer has not been modified.

If a buffer is set to NO_WRITE, a file is not written out after execution of a QUIT or EXIT statement even though you specified a file specification for the contents of the buffer with SET (OUTPUT_FILE).

Signaled Errors

TPU$_TOOFEW ERROR SET (OUTPUT_FILE) requires three parameters.
TPU$_TOOMANY ERROR You specified more than three parameters.
TPU$_INVPARAM ERROR One or more of the specified parameters have the wrong type.
TPU$_BADKEY ERROR You specified an invalid keyword.

Example

The following example causes the output file for paste_buffer to be NEWFILE.TXT:

SET (OUTPUT_FILE, paste_buffer, "NEWFILE.TXT") 
 
      


SET (OVERSTRIKE)


Format

SET (OVERSTRIKE, buffer)


Parameters

OVERSTRIKE

A keyword that specifies that SET is to control the mode of text entry. OVERSTRIKE means that the characters that you add to the buffer replace the characters in the buffer starting at the editing point and continuing for the length of the text that you enter. The default mode of text entry is INSERT.

See also the description of the SET (INSERT) built-in procedure. For information on how to control overstrike behavior in tabs, see SET (PAD_OVERSTRUCK_TABS).

buffer

The buffer whose mode of text entry you want to set.

Description

The SET (OVERSTRIKE) procedure sets the mode of text entry to OVERSTRIKE.

Signaled Errors

TPU$_TOOFEW ERROR SET (OVERSTRIKE) requires two parameters.
TPU$_TOOMANY ERROR You specified more than two parameters.
TPU$_INVPARAM ERROR One or more of the specified parameters have the wrong type.
TPU$_BADKEY ERROR You specified an invalid keyword.

Example

The following example sets the mode for text entry in my_buffer to overstrike. Characters that you enter replace characters already in the buffer, starting at the editing point and continuing for the length of the text that you enter.

SET (OVERSTRIKE, my_buffer) 
 
      


Previous Next Contents Index

  [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]  
  privacy and legal statement  
6020PRO_030.HTML