Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home

HP OpenVMS Systems Documentation

Content starts here

DECset
DIGITAL Language-Sensitive Editor/Source Code Analyzer for OpenVMS Reference Manual


Previous Contents Index


UNDO ENTER COMMENT

Reverses the effect of the last ENTER COMMENT command.

Format

UNDO ENTER COMMENT


Description

The UNDO ENTER COMMENT command deletes the comments created from pseudocode with the ENTER COMMENT command and restores the text to the pseudocode placeholders.

Related Commands

  • ENTER COMMENT

UNERASE

Restores the text deleted by the corresponding ERASE command that you most recently executed.

Format

UNERASE [erase-option]


Parameter

erase-option

The following are valid options with the UNERASE command:
  • CHARACTER
  • LINE
  • PLACEHOLDER
  • SELECTION
  • WORD

Description

The UNERASE command restores text erased by the previous ERASE CHARACTER, ERASE LINE, ERASE PLACEHOLDER, ERASE SELECTION, or ERASE WORD command. LSE inserts the restored text before the current cursor position, except for UNERASE PLACEHOLDER, which restores the text to its original position.

If you do not specify an erase option, LSE restores the text erased by the previous ERASE {CHARACTER, LINE, PLACEHOLDER, SELECTION, WORD} command, whichever was the most recent.

The UNERASE PLACEHOLDER command also restores the placeholders created by the ENTER PSEUDOCODE command and erased by the ERASE PLACEHOLDER command.

Keypad Equivalent

UNERASE

Key Keypad Mode
PF1-E2 [INSERT HERE] EVE LK201

UNERASE CHARACTER

Key Keypad Mode
PF1-keypad comma (,) [UND C] EDT LK201, EDT VT100, EVE LK201
None EVE VT100

UNERASE LINE

Key Keypad Mode
PF1-PF4 [UND L] EDT LK201, EDT VT100, EVE LK201
None EVE VT100

UNERASE PLACEHOLDER

Key Keypad Mode
PF1-Ctrl/K All

UNERASE SELECTION

Key Keypad Mode
None All

UNERASE WORD

Key Keypad Mode
PF1-keypad minus (--) [UND W] EDT LK201, EDT VT100, EVE LK201
None EVE VT100

Related Commands

  • ERASE CHARACTER
  • ERASE LINE
  • ERASE PLACEHOLDER
  • ERASE SELECTION
  • ERASE WORD

Example



LSE> UNERASE CHARACTER

      

Retrieves the contents of the deleted-character buffer.


UNEXPAND

Reverses the effect of the EXPAND command.

Format

UNEXPAND


Description

For LSE, the UNEXPAND command reverses the effect of the last EXPAND command. LSE deletes the range containing the text inserted as part of the last EXPAND command, and restores the token, placeholder, or alias that appeared at that position before the EXPAND command was entered.

Keypad Equivalent

Key Keypad Mode
PF1-Ctrl/E EDT LK201, EDT VT100
PF1-Ctrl// EVE LK201, EVE VT100

Related Commands

  • EXPAND

UNRESERVE

Cancels the reservation of a CMS element with the same name and type as the input file for your current buffer.

Format

UNRESERVE


Description

The UNRESERVE command cancels the reservation in your current CMS library for an element with the same name and type as the input file for your current buffer. After successfully canceling a reservation, LSE deletes your current buffer and its corresponding file.

DECwindows Interface Equivalent

  • Pull-down menu: File -> Unreserve

Related Commands

  • REPLACE
  • RESERVE
  • SET CMS

UNTAB

Erases blanks and tabs to the left of the cursor, which moves the cursor to the previous stop.

Format

UNTAB


Description

The UNTAB command removes blanks and tabs to the left of the cursor, which moves the cursor to the previous tab stop set by the /TAB_INCREMENT qualifier on the DEFINE LANGUAGE command, or by the SET TAB_INCREMENT command.

If no tabs or blanks immediately precede the cursor, this command has no effect. If nonblank or nontab characters are present in the column positions at or after the previous tab stop, LSE removes the blanks and tabs between those characters and the cursor, then repositions the cursor after those characters, not at the tab stop.

Keypad Equivalent

Key Keypad Mode
PF1-TAB All

Related Commands

  • ENTER TAB
  • TAB

UPPERCASE WORD

Changes the current word to uppercase.

Format

UPPERCASE WORD


Description

The UPPERCASE WORD command puts the current word in uppercase letters. If the word is in both lowercase and uppercase letters, LSE changes all letters to uppercase.

If the cursor is between words, LSE puts the following word in uppercase letters. If a selected range is active, all the words within that range are changed to uppercase. Then, the cursor moves to the start of the next word.

DECwindows Interface Equivalent

  • Pull-down menu: Edit -> Uppercase

Related Commands

  • CHANGE CASE
  • LOWERCASE WORD


VERIFY

Verifies that the specified SCA libraries are valid, and repairs any corrupted libraries.

Format

VERIFY [library-spec[,...]]

Qualifiers Defaults
/[NO]LOG /LOG
/[NO]RECOVER /NORECOVER

Qualifiers

/LOG (D)

/NOLOG

Indicates whether SCA reports the library verification or repair operation.

/RECOVER

/NORECOVER (D)

Indicates whether SCA should repair a corrupted library.

If the interrupted command is a LOAD command, SCA deletes from the library any module that had begun to load but had not completed loading. Also, SCA cannot recover modules that were waiting to be processed for loading when the interruption occurred. To load interrupted and waiting modules, enter a subsequent LOAD command and include those modules.

If the interrupted library operation is a DELETE MODULE command, the /RECOVER qualifier causes SCA to delete the incompletely deleted module. Any modules still waiting to be processed for deletion when the interruption occurred are excluded from the recovery operation; to delete them, you must respecify them in a subsequent DELETE MODULE command.


Parameter

library-spec[,...]

Specifies the SCA libraries to be verified. If you do not specify a library, SCA assumes you have specified the primary library.

Description

The VERIFY command performs the following operations to verify the validity of specific SCA libraries:
  • Checks for corrupted libraries resulting from abnormal termination of a LOAD or DELETE MODULE command
  • Optionally, repairs corrupted libraries

Example



SCA> VERIFY/RECOVER SCA$:[USER.SCA]

      

Determines whether the library SCA$:[USER.SCA] has been corrupted and repairs any damage detected.


VIEW SOURCE

Displays an overview of the buffer.

Format

VIEW SOURCE

Qualifiers Defaults
/DEBUG
/DEPTH=n /DEPTH=1

Qualifiers

/DEBUG

Provides a way to debug adjustment definitions by generating a copy of the source buffer, indented as LSE views the indentation. LSE displays the result in a system buffer named $OVERVIEW with all source lines visible. Numeric values for the indentation are also displayed with information about the adjustment applied to each line.

You cannot specify the /DEBUG qualifier with the /DEPTH qualifier.

/DEPTH=n

/DEPTH=1 (D)

Displays the top n levels of detail of the buffer. Lower levels are collapsed and represented by overview lines. If you specify /DEPTH=ALL, all the lines in the buffer are displayed; none of the lines are replaced by overview lines.

You cannot specify the /DEPTH qualifier with the /DEBUG qualifier.


Description

The VIEW SOURCE command displays the top n levels of detail of the entire buffer.

The editor determines the relative level of detail of a line by comparing the indentation of the line with the indentation of other lines. The editor's treatment of the indentation of a line is influenced by indentation-adjustment definitions. For more information, see the DEFINE ADJUSTMENT command.

Keypad Equivalent

VIEW SOURCE/DEPTH=1

Key Keypad Mode
PF1-> All

DECwindows Interface Equivalent

  • VIEW SOURCE/DEPTH=1
  • Pull-down menu: View -> Overview Source

  • VIEW SOURCE/DEPTH=ALL
  • Pull-down menu: View -> View Source

Related Commands

  • COLLAPSE
  • DEFINE ADJUSTMENT
  • DEFINE LANGUAGE/OVERVIEW_OPTIONS
  • EXPAND
  • FOCUS
  • MODIFY LANGUAGE
  • SET NOOVERVIEW
  • SET OVERVIEW

WHAT LINE

Shows the current line number and total number of lines in the buffer. Also shows what percentage of the lines in the buffer are located above the current line.

Format

WHAT LINE


Description

The WHAT LINE command shows the current line number and total number of lines in the buffer. It also shows what percentage of the lines in the buffer are located above the current line.

This command is useful if you want to know whether to insert a page break, or find out how many lines are in the buffer.

To move to a specific line by number, use the LINE command.

Related Commands

  • LINE

WRITE

Writes the contents of a buffer, or the contents of the selected range, to a file.

Format

WRITE [file-spec]

Qualifiers Defaults
/BUFFER=buffer-name
/DIALOG
/SELECT_RANGE
/VISIBLE

Qualifiers

/BUFFER=buffer-name

Indicates which buffer is to be written. The default is the current buffer.

/DIALOG

Instructs LSE to use a dialog box to prompt you for a parameter value. The command parameter is optional if you supply this qualifier. If you specify a command parameter with /DIALOG, LSE uses that parameter to set the initial state of the dialog box.

/SELECT_RANGE

Indicates that the selected range is to be written.

/VISIBLE

Indicates that the visible records in the buffer or selected range be written to a file. You must specify the file-spec parameter when you use this qualifier.

Parameter

file-spec

Specifies the file to which the buffer will be written. By default, LSE writes the data to the file associated with the buffer. This parameter is required if you specify the /SELECT_RANGE qualifier.

Description

The WRITE command places the contents of the specified buffer in the file you specify. Your editing session continues until you enter an EXIT or QUIT command. If you are editing an existing file and do not supply a new file name, LSE creates a new version of that file when you enter the WRITE command.

When you enter a WRITE command without specifying a file name, LSE also displays an informational message and prompts you for confirmation before writing the buffer under either of the following conditions:

  • If you have not modified the buffer (not made any changes during your editing session)
  • If the buffer's status is read-only

If you enter the WRITE command and the current buffer is associated with a file of the same name, LSE creates a new version of the file. If the buffer is unnamed, LSE prompts you for a name.

You can use the WRITE command and supply a file name at any time while you are in an editing session, which creates a new file containing the output up to that point in your editing session. However, using the WRITE command to write the data to a different file does not change the file association of the buffer; that is, LSE still creates a new version of the file with the same name as that associated with the buffer when you exit from that editing session, or subsequently use the WRITE command without specifying a file name. To change the file association, use the SET OUTPUT_FILE command.

If you use the WRITE command to write to a directory that you have set read-only (using the SET DIRECTORY command), LSE prompts you for confirmation before writing out the buffer.

DECwindows Interface Equivalent

  • WRITE
  • Pop-up menu: User buffer -> Save
  • Pull-down menu: File -> Save File

  • WRITE/DIALOG
  • Pull-down menu: File -> Save As...

Related Commands

  • GOTO FILE
  • READ
  • SET OUTPUT_FILE

Example



LSE> WRITE/BUFFER=$SHOW SHOW.TXT

      

Causes LSE to write the current contents of the $SHOW buffer to a file called SHOW.TXT.


Appendix A
Interfacing to DECTPU Procedures

Some LSE commands depend on procedures written in the DECTPU programming language that are present in the LSE default section file (LSE$SECTION.TPU$SECTION). These procedures must be present for LSE to function properly. For this reason, if you want to use your own DECTPU section file, you must build it using LSE$SECTION.TPU$SECTION as a base. To do this successfully, your DECTPU procedures must obey certain rules described in this appendix.

DIGITAL reserves all variable names and buffer names containing the dollar sign ($) character. You must not use names containing a dollar sign ($) in your own DECTPU code except as explained in the following sections.

A.1 DECTPU Variables and Procedures

The following three variable names have special meaning to LSE and DECTPU:

  • MESSAGE_BUFFER---The buffer to which LSE writes messages
  • SHOW_BUFFER---The buffer to receive output from the DECTPU SHOW built-in
  • INFO_WINDOW---The window to which the DECTPU SHOW built-in maps SHOW_BUFFER

Your section file must not redefine TPU$INITIALIZE, the DECTPU procedure that LSE calls to set up the editing environment. LSE$SECTION.TPU$SECTION provides its own TPU$INIT_PROCEDURE. Instead, you should redefine TPU$LOCAL_INIT to perform initialization at startup time as described later in this appendix.

LSE uses the following DECTPU variables and procedures.

TPU$LOCAL_INIT

The LSE TPU$INIT_PROCEDURE calls this procedure after it has finished LSE initialization. LSE initialization includes processing the /INITIALIZATION qualifier and reading into a buffer the input file specified on the LSEDIT command. You can supply your own TPU$LOCAL_INIT procedure to initialize your own DECTPU variables and procedures.

LSE$CREATE_SELECT_RANGE

This procedure sets LSE$SELECT_RANGE through the following process. If LSE$START_SELECT_MARK is nonzero, it sets LSE$SELECT_RANGE to the range from LSE$START_SELECT_MARK to the current position, then zeros out LSE$START_SELECT_MARK and LSE$SELECT_IN_PROGRESS. Otherwise, if the cursor is positioned to the last string for which the user searched, it sets LSE$SELECT_RANGE to be a range containing that string. Otherwise, it sets LSE$SELECT_RANGE to 0.

LSE$SET_STATUS_LINE (window)

LSE calls this procedure whenever it wants to update the status line of a window. The procedure takes one argument---the window whose status line is to be set. If you want to change the status line for LSE, see the DIGITAL Text Processing Utility Manual.

LSE$MESSAGE_WINDOW

This is a procedure that returns the window to which LSE maps MESSAGE_BUFFER.

LSE$NUMBER_OF_WINDOWS

This is a procedure that returns the number of windows mapped to the screen. Note that the number of windows may be more than two, which is the maximum for earlier versions of LSE.

LSE$MAIN_WINDOW

This procedure returns the top window displayed on the screen. It is compatible with earlier versions of LSE in which it was a variable that returned the window that was used in one-window mode. The current multiwindow implementation based on EVE creates and deletes windows as needed, making a backwards-compatible implementation of LSE$MAIN_WINDOW impossible.

LSE$TOP_WINDOW

LSE$BOTTOM_WINDOW

These procedures return the top and bottom windows currently being displayed. They are compatible with earlier versions of LSE in which they were variables that returned the windows that were used in two-window mode.

LSE$MAIN_BUFFER

After LSE startup, this procedure points to the buffer containing the input file that appeared on the LSEDIT command line. When you exit from LSE, LSE remembers the current cursor position in this buffer. It is compatible with earlier versions of LSE in which it was a variable. It has been replaced by the variable EVE$X_MAIN_BUFFER.

LSE$START_SELECT_MARK

This procedure returns the contents of the EVE$X_SELECT_POSITION variable. It is compatible with earlier versions of LSE in which it was a variable. The contents of EVE$SELECT_POSITION can be either the select marker set by the SET SELECT_MARK command, or a range created by the SELECT ALL command or by using the mouse. If there is no SELECT operation in progress, its value is the integer 0.

LSE$SELECT_IN_PROGRESS

This procedure returns 1 if there is a SELECT operation in progress. If no SELECT operation is in progress, it returns 0. The value returned is computed by the TPU expression (EVE$X_SELECT_POSITION <> 0).

LSE$SELECT_RANGE

This is the range variable in which LSE$CREATE_SELECT_RANGE returns its value. LSE commands that act on the selected range use this variable.

Sample DECTPU Procedure

The following is a DECTPU procedure that demonstrates the use of an LSE selected range from a user-defined DECTPU procedure. Note the use of the variables LSE$SELECT_IN_PROGRESS and LSE$SELECT_RANGE, and the procedure LSE$CREATE_SELECT_RANGE.



PROCEDURE sort (qual) 

    ! Description: 

    !   Sorts the lines in the selected range.  Complete lines should be 

    !   selected.  If no qualifiers are specified, the lines in the 

    !   selected range are sorted in ascending order. 

    ! 

    ! Parameter: 

    !   qual - a string beginning with "$". The remainder of the string 

    !       contains qualifiers to be passed to the SORT command.  The "$" is 

    !       a dummy character.  It is there to serve as a parameter when no 

    !       SORT qualifiers are specified, and to prevent qualifiers for 

    !       SORT from being interpreted as qualifiers on the LSE CALL 

    !       command. 

    ! 

    LOCAL sort_process,cmd,save_position,current_message; 

 

    ! If there is a selected range, write it to a temporary file. 

    IF NOT LSE$SELECT_IN_PROGRESS 

    THEN 

        MESSAGE ('No select active'); 

        RETURN; 

    ENDIF; 

    LSE$CREATE_SELECT_RANGE; 

    WRITE_FILE (LSE$SELECT_RANGE, 'sort_input.dat'); 

 

    ! Create a subprocess in which to run SORT.  Note that terminal output 

    ! from the subprocess goes to the message buffer. 

    sort_process := CREATE_PROCESS (message_buffer, 'SET NOON'); 

 

    ! Build the SORT command, picking up qualifiers that were passed in. 

    cmd := 'SORT/STABLE sort_input sort_output '+SUBSTR(qual,2,LENGTH(qual)-1); 

 

    ! Display the SORT command in the message window. 

    MESSAGE (cmd); 

 

    ! Execute the SORT command in the subprocess. 

    SEND (cmd, sort_process); 

 

    ! If no messages were written to the message buffer by SORT, 

    ! assume that the SORT operation succeeded and replaced the selected range 

    ! with the output from SORT. 

    save_position := MARK(NONE); 

    POSITION(message_buffer); 

    current_message := CURRENT_LINE; 

    POSITION (save_position); 

    IF current_message = cmd 

    THEN 

        ERASE (LSE$SELECT_RANGE); 

        READ_FILE ('sort_output.dat'); 

    ENDIF; 

 

    ! Cleanup 

    DELETE (LSE$SELECT_RANGE); 

    SEND ('DELETE sort_input.dat;,sort_output.dat;',sort_process); 

    DELETE (sort_process); 

ENDPROCEDURE 

To use the preceding procedure, define a SORT command as follows:



LSE> DEFINE COMMAND SORT "CALL SORT $"

To sort the lines in the selected range in ascending order, enter the following command:



LSE> SORT

To sort the lines in the selected range in descending order based on the text that begins in the 10th column and extends to, but does not include, the 20th column, enter the following command:



LSE> SORT/KEY=(POSITION=10, SIZE=10, DESCENDING)


Previous Next Contents Index

 

Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2012 Hewlett-Packard Development Company, L.P.