Professional Documents
Culture Documents
Command Handling
Command File Developer (OPS)
Chapters:
1 Introduction 5
2 Overview 9
4 Task Examples 35
5 Glossary 40
EHS/VM
3/1553-CRA 114 313 Uen Rev C2 1998-12-14 © Ericsson Hewlett-Packard Telecommunications AB 1997
All Rights Reserved
Command Handling Command File Developer (OPS)
The contents of this document are subject to revision without notice due to
continued progress in methodology, design, and manufacturing.
Ericsson shall have no liability for any errors or damages of any kind resulting
from the use of this document.
1 Introduction 5
1.1 Prerequisites 5
1.2 Related Documents 5
1.3 User Interface Conventions 6
1.4 Typographic Conventions 6
1.5 General Information 7
1.5.1 Help Texts 7
1.5.2 Error Messages 8
2 Overview 9
2.1 The Window System 10
4 Task Examples 35
4.1 Creating a New Command File 35
4.2 Executing an Existing Command File 37
4.3 Debugging a Faulty Command File 38
4.4 Running All But a Few Lines of a Command File 39
5 Glossary 40
5.1 Acronyms and Abbreviations 40
5.2 Definitions 40
1 Introduction
This document is intended for users of the Telecommunications Management
and Operations Support (TMOS) Command File Developer Application
(CFD).
The Command File Developer is an editor and debugger for command files
using the CHA command file language.
1.1 Prerequisites
The reader of this document should have the following qualifications:
• Be familiar with workstations and window-based computer interfaces
• Have knowledge of maintenance of network elements, that is, telephone
exchanges
• Have knowledge of the CHA command file language in order to handle
the command files for network element maintenance
Other Documents
A B D G H M O
Introduction System Functional Installation Function Programmer’s User Guides,
Manuals Administrator’s Specifications Manuals Verifications Guides Procedure
Guides Manuals
When a command string is so long that it is longer than one line in the opened
window, the string will continue on the following line. To tell the system that
the command string continues over more than one line, the user must add a
back-slash “\” at the end of all lines but the last. The principle is shown for a
four line command string in the example below.
Example 3
7,22,37,52 * * * * SYBASE=/usr/local/sybase; \
export SYBASE; TMOSHOME=/usr/local/tmos; export \
TMOSHOME; cd /var/tmos_cold_tnm; tnm_trandbload.sh\
> /dev/null
Note: In many TMOS documents variables are enclosed in < and >. This
document does not use the standard notation because it may be
confused with UNIX file direction symbols.
Text specific to the operations systems (HP-UX and Solaris) is separated from
the generic text with the paragraph tags described in the example below.
Example 5
The words “enter” and “type” are used in the following ways:
• “Enter” means “Type the string shown here and end your input with
Return.”
• “Type” means “Type exactly what is shown here, and nothing else.”
2 Overview
The Command File Developer is an editor and debugger for command files
using the CHA command file language, see Reference [3] - Command
Handling, Programmer’s Guide, Command File Language.
The Command File Developer may be used separately or be integrated with
the Command Handling Application (CHA).
The developer displays the contents of a command file in one text pane and
output from the command file execution in another text pane.
Existing command files can be loaded into the developer through a file
browser, and new files can be created. More than one command file can be
managed in one session, although only one can be displayed at a time. A
separate window for listing all managed command files, and switching
between them, is provided.
The main window of the developer has two modes, Run and Edit.
In Run mode, a command file can be executed from the beginning or from an
arbitrary command line. The file execution can be manually stopped at any
time. A command file can also be executed step by step.
Command lines can be marked as breakpoints, which cause the command file
execution to stop.
It is also possible to tag command lines that are to be executed as a separate
unit, independently of the rest of the file.
In Edit mode, new command files can be created and existing command files
can be edited. A set of functions for editing and searching for text in a file is
provided.
Window Header
Upper Control
Panel
Lower Control
Panel
Command File
Output Area
Window Footer
The file name of the loaded file is shown in the window header, and at the
right-hand side of the window footer. The line number of the current position
and the total number of lines in the file are also displayed. This function can
be turned off by using the Update Pos option in the Properties window. See
Section 3.15 on page 28.
In Run mode, the command file in the command file area can be executed, but
not be edited. Thus, no insertion pointer is available in this mode.
To the left of the command file, there are three columns that indicate line
status. The symbol indicates that the line has been marked as a breakpoint.
The command file execution will stop on the line at the breakpoint.
The symbols are used to tag lines. All lines that are tagged can be executed
as a separate unit, independently of the rest of the file.
The symbol, which is always present, indicates the current position in the
file. Only one line can be marked as current position at a time, and only one
of the files currently managed can contain the current position.
Note: If the Update Pos function in the Properties window is turned off, the
arrow symbol will not move during the execution of a command file
or system command file. See Section 3.15 on page 28.
Functions for controlling the line status are provided in menus on the control
panel between the upper and the lower text panes. This control panel, which
is only available in Run mode, also includes functions for executing the
command file. The functions of this panel are described in Section 3.16 on
page 30.
The upper control panel is described in Section 3.4 on page 15.
The lower text pane, the Command File Output Area, displays output from the
file execution. This is a read-only text pane.
The relative size between the upper and lower panes can be set using the Code
Window Size option in the Properties window. See Section 3.15 on page 28.
Load File
This option is used to load an existing command file into the command file
area of the developer. The option brings up a window with a file browser. See
Section 3.5 on page 22.
This option creates a new file, which is named Untitled, followed by a serial
number.
This option is used to save the file displayed in the command file area.
This option is used to save the file displayed in the command file area under
a new name. The option brings up a window with a file browser. See
Section 3.6 on page 23.
This option is used to save all files that are currently managed in the
developer.
This option is used to close the file displayed in the command file area. The
option is disabled if a file is currently being executed.
This option is used to close all files that are currently managed in the
developer. The option is disabled if a file is currently being executed.
This option opens a window for printing a command file, or a part of it. See.
See Section 3.7 on page 24.
File
This option brings up a window with a list of the files that are currently
managed in the Command File Developer. See Section 3.8 on page 25.
Through this window, you can switch between the managed files.
Input Output
This option opens the Input Output window. See Section 3.9 on page 25. The
Input Output window is used to manage those command file commands that
require user interaction.
Status Info
This option opens the Status window. See Section 3.10 on page 25. The Status
window is used to view run-time information.
Variables
This option opens the Variable Contents window. See Section 3.11 on
page 26. The Variable Contents window is used to view the contents of
command file variables.
Comment Window
This option opens the Comment window. See Section 3.12 on page 26. The
Comment window displays output generated by the @COMMENT command.
Current Position
This option updates the current position of the arrow symbol ( ) in the
Command File Area when the Run mode has been selected in the CH:
Command File Developer main window and the Stepping Only option has
been selected in the Properties window, see Section 3.15 on page 28.
Again
Undoes all editing actions performed since the file was saved.
Copy
Paste
Cut
Expand
Next
Previous
Opens a pop-up window with functions for searching and replacing text. See
Section 3.13 on page 27.
Find Selection
The Forward option finds the next occurrence of a selected text item in the
file. The Backward option finds the previous occurrence of a selected text
item in the file.
Opens a pop-up window with functions for searching for delimiters, like
parentheses and quotation marks. See Section 3.14 on page 28.
Replace |>field<|
The Expand option highlights text between the left delimiter |> and the right
delimiter <| when the insertion pointer is located between these delimiters.
The Next option finds and highlights the next occurrence of text written
between the left delimiter |> and the right delimiter <|.
The Previous option finds and highlights the previous occurrence of text
written between the left delimiter |> and the right delimiter <|.
Command Descriptions
Printout Descriptions
Application Information
If a highlighted text item in the window contains the name of a function block,
this option displays the Application Information (AI) relevant to the block.
Select Book
If you click on the Reset button, the properties that were activated the last time
(either the Apply button or the Set Default button was clicked) are retrieved.
This setting allows you to control the size of the code window, that is, the
relative size between the upper and lower panes of the Run/Edit window. For
a comparison of the different size options, see Figure 23 on page 29.
Small Choose this option to make the size of the upper pane
one third of the lower pane
Medium Choose this option to make the pane sizes equal
Large Choose this option to make the upper pane three times
bigger than the lower pane
Small Large
Update Pos
This setting allows you to change the behaviour of the automatic updating of
the current position indicator in the Run window.
Always Choose this option to turn the updating of the Run
window on. The arrow symbol ( ) will always point
at the line that is executing, and the line indicator in
the right hand side of the footer will indicate the line
number of the executing line.
Stepping Only Choose this option to turn off the updating of the Run
window. The arrow symbol ( ) will not move and
the indicator in the footer will not change during
execution. However, by using the Current Position
option from the View menu, the arrow and line
indicator will be updated anyway.
Warnings
Accelerators
If the Tag accelerator function has been activated in the Properties window, it
is also possible to add or remove a tag by clicking in the line-status area to the
left of the command line. See Section 3.17 on page 34.
3.17 Accelerators
These features require that the accelerators have been activated in the
Properties window, see Section 3.15 on page 28. You can mark a command
line as the current position, as a tag, or as a breakpoint, by clicking with the
mouse in the line-status area to the left of the command line.
To add or remove a breakpoint, click furthest to the left. To add or remove a
tag, click in the middle. To set current position, click furthest to the right. The
following figure shows the three columns.
Right column -
Current Position
Left column -
Breakpoint
Middle column -
Tag
3.18 Icons
When the developer window is iconised, that is, reduced to an icon on the
screen, it is indicating whether or not the command file is executing or not. In
this way it is possible to start an execution of a command file, iconise the
window, and work with something else until the icon changes. The two
possible icons are described below.
4 Task Examples
The aim of this chapter is to describe how the Command File Developer can
be used to perform certain tasks that occur frequently or that are complicated
to perform.
Each example suggests one advisable way to perform a certain task. Note that
alternative ways to perform the same task may exist.
8 To test the command file, select the From Top option in the Run menu.
Response: The file is executed from the beginning and output from the
execution is displayed in the Command File Output Area of the
window.
9 If the file does not work as you intended, debug the file. See Section 4.3 on
page 38.
5 Glossary
5.2 Definitions
Breakpoint When a command line is marked as a breakpoint, the file execution
will stop at this line.
Tag Tagged command lines can be executed as a separate unit
independently of the rest of the command file.
Current Position The current position is the command line in a command file that is
the next line to be executed.