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

4.12 File and Buffer Manipulation Commands

CHANGE DIRECTION SET INSERT
CHANGE TEXT_ENTRY_MODE SET LEFT_MARGIN
CLOSE BUFFER SET MODIFY
CUT SET NOMODIFY
DELETE BUFFER SET NOOUTPUT_FILE
GOTO BUFFER SET NOSOURCE_DIRECTORY
GOTO FILE SET OUTPUT_FILE
GOTO SOURCE SET OVERSTRIKE
INCLUDE SET READ_ONLY
NEXT BUFFER SET REVERSE
PASTE SET RIGHT_MARGIN
PREVIOUS BUFFER SET SOURCE_DIRECTORY
READ SET TAB_INCREMENT
RECOVER BUFFER SET WRAP
SET DEFAULT_DIRECTORY SET WRITE
SET DIRECTORY SHOW BUFFER
SET FORWARD WRITE
SET INDENTATION  

4.13 Program Design Commands

COLLAPSE EXTRACT KEYWORDS
DEFINE ADJUSTMENT EXTRACT TAG
DEFINE KEYWORDS FOCUS
DEFINE TAG REPORT
DELETE ADJUSTMENT SET NOOVERVIEW
DELETE KEYWORDS SET OVERVIEW
DELETE TAG SHOW ADJUSTMENT
ENTER COMMENT SHOW KEYWORDS
ENTER PSEUDOCODE SHOW TAG
EXPAND UNDO ENTER COMMENT
EXTRACT ADJUSTMENT VIEW SOURCE

4.14 Commands for Tailoring the Environment

CALL DELETE PLACEHOLDER
CHECK LANGUAGE DELETE ROUTINE
DEFINE ADJUSTMENT DELETE TAG
DEFINE ALIAS DELETE TOKEN
DEFINE COMMAND DO
DEFINE KEY END DEFINE
DEFINE KEYWORDS EXTEND
DEFINE LANGUAGE EXTRACT ADJUSTMENT
DEFINE PACKAGE EXTRACT ALIAS
DEFINE PARAMETER EXTRACT KEYWORDS
DEFINE PLACEHOLDER EXTRACT LANGUAGE
DEFINE ROUTINE EXTRACT PACKAGE
DEFINE TAG EXTRACT PARAMETER
DEFINE TOKEN EXTRACT PLACEHOLDER
DELETE ADJUSTMENT EXTRACT ROUTINE
DELETE ALIAS EXTRACT TAG
DELETE COMMAND EXTRACT TOKEN
DELETE KEY MODIFY LANGUAGE
DELETE KEYWORDS SAVE ENVIRONMENT
DELETE LANGUAGE SAVE SECTION
DELETE PACKAGE SET MODE
DELETE PARAMETER SET SEARCH

4.15 Help and Status Commands

HELP SHOW MODULE
SHOW ADJUSTMENT SHOW PACKAGE
SHOW ALIAS SHOW PARAMETER
SHOW BUFFER SHOW PLACEHOLDER
SHOW CMS SHOW QUERY
SHOW COMMAND SHOW ROUTINE
SHOW DEFAULT_DIRECTORY SHOW SCREEN
SHOW DIRECTORY SHOW SEARCH
SHOW KEY SHOW SOURCE_DIRECTORY
SHOW KEYWORDS SHOW SUMMARY
SHOW LANGUAGE SHOW TAG
SHOW LIBRARY SHOW TOKEN
SHOW MARK SHOW VERSION
SHOW MAX_UNDO WHAT LINE
SHOW MODE  

4.16 CMS Commands

CMS SET CMS
REPLACE SHOW CMS
RESERVE UNRESERVE


Command Descriptions

This section describes the LSE and SCA commands in alphabetical order. To aid in differentiating these commands, the following notations appear under the command name:
Notation Explanation
No notation LSE standalone commands.
SCA Command SCA standalone commands. These commands are valid any time you are using SCA, whether or not you are using LSE.
SCA Required LSE commands that are valid only if you are using SCA with LSE.

In describing DECwindows menu equivalents for commands, the following terms are used:

Term Description of action
Button To activate, press MB1 on an item.
Pop-up menu To activate, press MB2 on the first path item; follow the path while holding down MB2.
Pull-down menu To activate, press MB1 on the first path item; follow the path while holding down MB1.

Note

LSE follows the quoting rules of the DIGITAL Command Language (DCL). All references to quoted strings mean that LSE expects double quotation marks (").

In the command descriptions that follow, the defaults for qualifiers are indicated by (D).


@ (file-specification)

Allows the execution of SCA commands contained in a specified file.

Format

@ (file-specification)


Description

The use of command files containing query definitions allows a common set of queries to be used interactively in different SCA sessions.

Related Commands

  • SAVE_QUERY

Example

The following queries could be used to describe all the names that might be associated with the Year 2000 problem:


        $ SCA

        SCA> @Y2000

        SCA> FIND/OUT=Y2000.LIS @Y2000_QUERY AND OCC=REFERENCE

      

The command file is also usable in DECwindows mode, as follows:

  1. Select Commands/Enter Commands...
  2. Enter command: SET COMMAND LANGUAGE VMS.
  3. Enter command: @y2000.
  4. Select Cross Reference Query window.
  5. Set the name field to "@y2000_query".
  6. Set usage to Reference.
  7. Issue the query.

Use the SCA/LSE interface to look at the references found.


ALIGN

Aligns comments within the current selected range without performing a fill operation.

Format

ALIGN

Qualifiers Defaults
/COMMENT_COLUMN= /COMMENT_COLUMN=
CONTEXT_DEPENDENT CONTEXT_DEPENDENT
/COMMENT_COLUMN=number /COMMENT_COLUMN=
CONTEXT_DEPENDENT

Qualifier

/COMMENT_COLUMN=CONTEXT_DEPENDENT (D)

/COMMENT_COLUMN=number

The /COMMENT_COLUMN=CONTEXT_DEPENDENT qualifier specifies that the comment column should be determined from the context. LSE finds the first trailing comment in the range, uses the starting position of that comment as the comment column, and adjusts all subsequent comments to conform with the first. This is the default.

The /COMMENT_COLUMN=number qualifier specifies the column in which to align the comments. All trailing comments in the range are aligned with the specified column number, which must be an integer in the range 1 to 131.


Description

The ALIGN command aligns all trailing comments with a particular column. The column in which you position the comments can be either explicitly specified (using the /COMMENT_COLUMN=number qualifier) or based on context.

This command operates on each line in the range, in sequence. For each line, LSE checks to see whether the line has a trailing comment. If not, it proceeds to the next line.

If there is a trailing comment, LSE either inserts or deletes spaces or tabs as necessary to get the comment to align. If there is no room for the comment on the line (that is, if the noncommented text extends beyond the comment column), the comment is aligned one space after the end of the noncommented text.

DECwindows Interface Equivalent

  • Pull-down menu: Edit -> Align

Related Commands

  • FILL

Example

The following is a sample of commented code:


      IF (col >= R_Margin) THEN    (* This is the start of a *) 

              BEGIN                (* bracketed comment sequence that *) 

              VAR x: INTEGER;      (* extends over several lines *) 

      

Entering the ALIGN command causes LSE to rearrange the text as follows:



      IF (col >= R_Margin) THEN (* This is the start of a          *) 

              BEGIN             (* bracketed comment sequence that *) 

              VAR x: INTEGER;   (* extends over several lines      *) 

      


ANALYZE

Creates an analysis data file that describes a source file.

Format

ANALYZE file-spec[,...]

Qualifiers Defaults
/[NO]DESIGN[=design-option] /NODESIGN
/LANGUAGE=language
/[NO]LOG /LOG
/OUTPUT[=file-spec] /OUTPUT=file-name.ANA

Qualifiers

/DESIGN[=design-option]

/NODESIGN (D)

Indicates that the source file should be processed as a program design language. The design options are as follows:
Option Description
COMMENTS The ANALYZE command looks inside comments for design information. Information about comments is included in the analysis data file. Any errors detected are reported.
NOCOMMENTS The ANALYZE command ignores comments.
PLACEHOLDERS The ANALYZE command treats LSE placeholders as valid syntax. Placeholders are reported in the analysis data file.
NOPLACEHOLDERS The ANALYZE command does not report placeholders in the .ANA file. It does not report errors if placeholders are encountered.

If you specify the /DESIGN qualifier, the default is /DESIGN= (COMMENTS,PLACEHOLDERS). If you do not specify this qualifier, the default is /NODESIGN.

/LANGUAGE=language

Specifies the language of the source file. By default, the language is determined by the file type of the source file.

/LOG (D)

/NOLOG

Indicates whether each analyzed file is reported.

/OUTPUT[=file-spec]

/OUTPUT=file-name.ANA (D)

Specifies the analysis data file to be created. The default is
/OUTPUT=filename.ANA, where file-name is the name of the first source file specified as the parameter to this command.

Parameter

file-spec[,...]

Specifies the files to be analyzed. You can use wildcards with the file-spec parameter. Within LSE, the current buffer is analyzed by default.

Description

The ANALYZE command creates an analysis data file to describe a source file. The analysis data files produced by this command contain a minimal description of the source file. These files describe the source file primarily as a set of references to unbound names.

With the ANALYZE command, you can use SCA with languages not directly supported by SCA. Do not use this command with those languages that do support SCA. To identify those languages that support SCA, see the DIGITAL Source Code Analyzer Command-Line Interface and Callable Routines Reference Manual or the DECset Software Product Description (SPD).

The ANALYZE command understands the language-specific rules for forming names (identifiers), comments, quoted strings, and placeholders. It assumes that tokens are reserved words, and does not include them in the analysis data file. It processes placeholders and comments depending on the setting of the /DESIGN qualifier.

You must have a language defined in an environment file to use the ANALYZE command with that language. Based on the description of the language in that file, this command analyzes the source file.

The ANALYZE command uses the LSE environment files to determine the appropriate language based on the file type, or uses the language specified with the /LANGUAGE qualifier. It uses the same logical names as LSE, (LSE$ENVIRONMENT and LSE$SYSTEM_ENVIRONMENT) to access the environment files.

For information about defining your own language, see the chapter on defining LSE templates in the Guide to DIGITAL Language-Sensitive Editor for OpenVMS Systems.

The REPORT command requires that LSE be installed even if you are using this command from the SCA command line.

Related Commands

  • DEFINE LANGUAGE
  • LOAD

Examples

#1


LSE> ANALYZE/LANGUAGE=EXAMPLE PROG1.EXAMPLE

      

Produces an analysis data file that describes an EXAMPLE language source file.

#2


LSE> ANALYZE/DESIGN=(NOPLACEHOLDERS) PROG2.SDML

      

Produces an analysis data file and indicates that the source file should be processed as a program design language. Placeholders are not reported in the .ANA file. By default, information about comments are reported. The language is SDML, as determined by the file type of the source file.


ATTACH

Allows you to switch control of your terminal to another process.

Note

This function is not available in DECwindows; any attempt to invoke it creates an error.

Format

ATTACH [subprocess-name]


Parameter

subprocess-name

Specifies the name of the process to which you want to connect. If you do not specify a process name, LSE connects you to the parent process.

Description

The ATTACH command switches control of your terminal to another process, just as the DCL command ATTACH does at the dollar sign ($) prompt. To return to LSE from another process, use the DCL command ATTACH. Use the LOGOUT command to return to LSE only from a subprocess.

Related Commands

  • SPAWN

Example



LSE> ATTACH SMITH_1

      

Switches control to the process SMITH_1.


CALL

Calls the specified DIGITAL Text Processing Utility (DECTPU) procedure.

Format

CALL DECTPU-procedure-name [additional-parameters]


Parameters

DECTPU-procedure-name

Indicates the name of the DECTPU procedure you want to call.

additional-parameters

Contains information to be passed to the procedure as a single string. The called procedure must then parse and interpret this string.

Description

The CALL command, in combination with the DEFINE COMMAND command, provides a means for defining new commands implemented in the DECTPU language. Because the additional parameters are passed to the called procedure without being parsed, these commands have a flexible syntax.

Related Commands

  • DEFINE COMMAND
  • DO/TPU


Example

The following DECTPU procedure issues a DIRECTORY command from within LSE:


     PROCEDURE dir (dir_params) 

         ! Description: 

         !   Issues a DCL DIRECTORY command in a subprocess.  The output is 

         !   written to the DIRECTORY buffer.  The DIRECTORY buffer is 

         !   mapped to the current window. 

         ! 

         ! Parameter: 

         !   dir_params - a string beginning with "$".  The text following 

         !       the "$" contains parameters and qualifiers to be passed to 

         !       the DIRECTORY command. 

         !       The "$" is used to provide a parameter for the call to 

         !       this procedure when no parameters for the DIRECTORY 

         !       command were specified. 

         ! 

         LOCAL dir_process, cmd; 

         IF GET_INFO(dir_buffer, "TYPE") <> BUFFER THEN 

             dir_buffer := CREATE_BUFFER("DIRECTORY"); 

             SET(NO_WRITE,dir_buffer); 

         ENDIF; 

         erase(dir_buffer); 

 

         ! Build the DIRECTORY command, picking up parameters that were 

         ! passed in. 

         cmd := 'DIRECTORY '+SUBSTR(dir_params,2,LENGTH(dir_params)-1); 

         ! Create a subprocess and execute the command. 

         dir_process := CREATE_PROCESS (dir_buffer, cmd); 

         lse$do_command('GOTO BUFFER DIRECTORY'); 

 

         DELETE (dir_process); 

     ENDPROCEDURE 

      

To define this procedure, put it in a buffer and compile it using the DO/TPU command. To use the procedure, define a command named DIR, as follows:



    LSE> DEFINE COMMAND DIR "CALL DIR $"

To get a directory listing, enter your newly defined DIR command, as follows:



    LSE> DIR/SIZE/DATE

Note the use of the dollar sign ($) to cause the CALL command to always invoke the procedure named DIR with a parameter, even if you specify nothing else on the command line of the command DIR. The dollar sign also prevents qualifiers on the command DIR from being interpreted as an attempt to place qualifiers on the DECTPU procedure-name parameter named DIR.


Previous Next Contents Index

 

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