You are on page 1of 40

TMOS User Guide

Command Handling
Command File Developer (OPS)

Chapters:
1 Introduction 5

2 Overview 9

3 Using the Command File Developer 11

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.

2 (40) 3/1553-CRA 114 313 Uen Rev C2 1998-12-14


Command Handling Command File Developer (OPS)

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

3 Using the Command File Developer 11


3.1 Starting CFD 11
3.2 Run Mode 12
3.3 Edit Mode 14
3.4 The Upper Control Panel 15
3.4.1 Network Element 15
3.4.2 The Mode Selector 16
3.4.3 File Menu 16
3.4.4 View Menu 18
3.4.5 Edit Menu 19
3.4.6 Find Menu 20
3.4.7 The Documentation Menu 21
3.5 Load File Window 22
3.6 Save File Window 23
3.7 Print File Window 24
3.8 View Command File Window 25
3.9 Input Output Window 25
3.10 Status Window 25
3.11 Variable Contents Window 26
3.12 Comment Window 26
3.13 Text: Find and Replace Window 27
3.14 Text: Find Marked Text Window 28
3.15 Properties Window 28
3.16 The Lower Control Panel 30
3.16.1 Breakpoint Menu 31
3.16.2 Tag Menu 31
3.16.3 Set Position Menu 32
3.16.4 Run Menu 32
3.16.5 Step Button 33
3.16.6 Stop Button 33
3.16.7 Reset Button 33
3.17 Accelerators 34
3.18 Icons 34

3/1553-CRA 114 313 Uen Rev C2 1998-12-14 3 (40)


Command Handling Command File Developer (OPS)

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

4 (40) 3/1553-CRA 114 313 Uen Rev C2 1998-12-14


Command Handling Command File Developer (OPS)

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

1.2 Related Documents


The user documentation for the Command File Developer includes the
following documents:

Closely Related Documents

[1] Command Handling, System Administrator’s Guide


[2] Command Handling, User Guide
[3] Command Handling, Programmer’s Guide, Command File
Language
[4] Command Handling, User Guide, Activity Manager
[5] Command Handling, User Guide, Command Log Search
[6] Command Handling, User Guide, Spontaneous Reports Manager

Other Documents

[7] On-line Document Tool, User Guide


[8] Electronic Log Book, User Guide

3/1553-CRA 114 313 Uen Rev C2 1998-12-14 5 (40)


Command Handling Command File Developer (OPS)

The user documentation is organized in library modules as shown in the figure


below.

TMOS TMOS TMOS TMOS TMOS TMOS TMOS

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

Figure 1 Customer Library Modules

1.3 User Interface Conventions


The user interface described in this document conforms to the Open Look
standard.

1.4 Typographic Conventions


System element names, such as names of commands, programs, and
directories are shown in Courier according to the example below.
Example 1

Store the file in the $TMOSADMHOME/common_files/cha directory.

Text in boldface Courier indicates that the characters are to be typed


exactly as shown. The principle is shown in the example below.
Example 2

Enter the following command:


cd /usr/local/tmos/tap

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

6 (40) 3/1553-CRA 114 313 Uen Rev C2 1998-12-14


Command Handling Command File Developer (OPS)

Text in boldface, italic Courier represents variables that must be supplied by


the user. The principle is shown in the example below, where the hostname is
to be supplied by the user.
Example 4

The command rlogin has the following command line syntax:


rlogin hostname

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

HP-UX: Text specific to HP-UX systems is tagged like this paragraph.


Solaris: Text specific to Solaris systems is tagged like this paragraph.

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.”

1.5 General Information

1.5.1 Help Texts


Information about all parts of the user interface, like buttons, menu options,
and text fields, can be obtained through the on-screen help texts. To access the
help text for a certain object, place the arrow pointer on the object and press
the help key. The text is presented in a pop-up window.
HP-UX: If the application is run on an HP-UX system, the help key is
function key F8.
Solaris: If the application is run on a Solaris system, the help key is the key
labelled Help.

3/1553-CRA 114 313 Uen Rev C2 1998-12-14 7 (40)


Command Handling Command File Developer (OPS)

1.5.2 Error Messages


Error messages in the Command File Developer are displayed in the
following ways:
• In the Command File Output Area of the main window
• In pop-up notices
• In the footer of the main window

8 (40) 3/1553-CRA 114 313 Uen Rev C2 1998-12-14


Command Handling Command File Developer (OPS)

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.

3/1553-CRA 114 313 Uen Rev C2 1998-12-14 9 (40)


Command Handling Command File Developer (OPS)

2.1 The Window System


The figure below shows an overview of the Command File Developer
window system.

Figure 2 The Command File Developer Window System

10 (40) 3/1553-CRA 114 313 Uen Rev C2 1998-12-14


Command Handling Command File Developer (OPS)

3 Using the Command File Developer


The Command File Developer may either be used separately or be integrated
with the Command Handling Application (CHA).
If CHA is running, the Command File Developer can be started from this
application. The document Reference [2] - Command Handling, User Guide
and Reference [6] - Command Handling, User Guide, Spontaneous Reports
Manager, describes how the Command File Developer is activated from
CHA.
The appearance and behaviour of the Command File Developer also depends
on whether or not the following TMOS applications are installed:
Electronic Log Book If ELB is installed, the task identifiers is visible in the
header of the main window. In addition, the way to
start CFD is affected, see Section 3.1 on page 11.
On-line Document Tool
If OLDT is installed, the Documentation menu is
visible in the upper control panel.

3.1 Starting CFD


If the Command File Developer is to be started independently of CHA, the
starting procedure depends on whether or not the Electronic Log Book is
used.
If the Electronic Log Book is used, the Command File Developer is either
started from this application or from CHA. If the Command File Developer is
started from CHA, CHA has first been started from the Electronic Log Book.
See Reference [8] - Electronic Log Book, User Guide for information on how
the developer is started from the Electronic Log Book.
If the Electronic Log Book is not used, the Command File Developer is started
by the Command File Developer option in the workspace menu or by the
cha_developer_gui shell command. The cha_developer_gui
command has a number of parameters that control the way in which the
developer is started.
For example, a file to be executed may be specified. Enter the man
cha_developer_gui command to receive detailed information about the
use of the cha_developer_gui command. The parameters of the
command are also described in Reference [1] - Command Handling, System
Administrator’s Guide.
When the developer is started, the Command File Developer window appears
on the screen. This window has two modes, Run and Edit, which are further
described in this chapter.
If a command file is run in CHA, this file can be loaded into the developer,
which then automatically opens up. When the developer has been started,
command files can be loaded into it through a subwindow. Command files
that have been loaded into the developer are in this document referred to as
managed files.

3/1553-CRA 114 313 Uen Rev C2 1998-12-14 11 (40)


Command Handling Command File Developer (OPS)

3.2 Run Mode


The following figure shows an example of the appearance of the Command
File Developer window in Run mode.

Window Header

Upper Control
Panel

Line Status Area Command File Area

Lower Control
Panel

Command File
Output Area

Window Footer

Figure 3 The Command File Developer Window in Run Mode


The developer can be started from CHA by the following steps:
1 Select the Send OPS Command File option in the File menu.
Response: The CH: Send OPS Command File window opens.
2 Select a Network Element and a command file.
3 Send the command file, and wait until the command file is executed.
Response: The CH: Command File Output window opens.
4 Click on the Debug button in the Command File Output window.
Response: The CH: Command File Output window will close and the
Command File Developer window opens in Run mode.
The file that is being executed is automatically loaded into the upper text
pane, the command file area, of the Command File Developer window.

12 (40) 3/1553-CRA 114 313 Uen Rev C2 1998-12-14


Command Handling Command File Developer (OPS)

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.

3/1553-CRA 114 313 Uen Rev C2 1998-12-14 13 (40)


Command Handling Command File Developer (OPS)

3.3 Edit Mode


The following figure shows an example of the appearance of the Command
File Developer window in Edit mode.

Figure 4 The Command File Developer Window in Edit Mode


In Edit mode, the command file in the command file area can be edited. An
insertion cursor is available in this mode.
Functions for editing the file are provided in the menus on the upper control
panel. This panel is described in Section 3.4 on page 15.
In Edit mode, no line-status area is displayed to the left of the file. The lower
control panel is not available.
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.
If you click on the Run Mode Selector after editing a file, a dialog box will
request you to save or discard the edits.

14 (40) 3/1553-CRA 114 313 Uen Rev C2 1998-12-14


Command Handling Command File Developer (OPS)

3.4 The Upper Control Panel


The upper control panel is available both in Run mode and in Edit mode, and
is shown in the figure below.

Figure 5 The Upper Control Panel


This panel provides the following functions and options:
• Functions for connecting and disconnecting network elements
• Mode selector
• File handling functions
• Options for accessing subwindows
• Text edit functions
• Text search functions
• Functions for controlling properties of the application
• Options for accessing on-line documentation
This section describes all items found on the upper control panel.

3.4.1 Network Element


The Network Element button on the upper control panel opens a window that
lists all available Network Elements. Through this window a network element
name can be selected and connected.

Figure 6 The Network Element Window


To connect to a network element, select the system in the scroll list. The name
will be inserted on the line to the right of the Network Element button in the
Command File Developer window. If the name is long, one or two scrolling
arrows will appear besides the NE name.

3/1553-CRA 114 313 Uen Rev C2 1998-12-14 15 (40)


Command Handling Command File Developer (OPS)

When a connection is successfully established, the Disconnect button


becomes available and the name of the network element is displayed to the
right of the Connect icon.
To disconnect, click on the Disconnect button.
To reconnect, click on the Connect button.
If a command file that includes an @CONNECT command is executed, the
initial connection is overridden, and a connection to the network element
specified by the @CONNECT command is established. Accordingly, you do
not have to specify the network element if a file with an @CONNECT
command is to be executed.
The Network Element window can be configured to show network, network
element and protocol in a distinguished name format. See Reference [1] -
Command Handling, System Administrator’s Guide.

3.4.2 The Mode Selector


The mode selector in the upper right corner of the Command File Developer
window is used to switch between Edit mode and Run mode.

Figure 7 Mode Selector

3.4.3 File Menu


The File menu contains basic file handling functions.

Figure 8 The File Menu

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.

16 (40) 3/1553-CRA 114 313 Uen Rev C2 1998-12-14


Command Handling Command File Developer (OPS)

Create New File

This option creates a new file, which is named Untitled, followed by a serial
number.

Save Current File

This option is used to save the file displayed in the command file area.

Store as New File

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.

Save All Files

This option is used to save all files that are currently managed in the
developer.

Close Current File

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.

Close All Files

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.

Print

This option opens a window for printing a command file, or a part of it. See.
See Section 3.7 on page 24.

3/1553-CRA 114 313 Uen Rev C2 1998-12-14 17 (40)


Command Handling Command File Developer (OPS)

3.4.4 View Menu


The View menu provides access to five subwindows.

Figure 9 The View Menu

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.

18 (40) 3/1553-CRA 114 313 Uen Rev C2 1998-12-14


Command Handling Command File Developer (OPS)

3.4.5 Edit Menu


The Edit menu includes commands that are used to edit the command file in
the command file area.

Figure 10 The Edit Menu

Again

Repeats the last editing action.

Undo>Undo Last Edit

Undoes the last editing action.

Undo>Undo All Edits

Undoes all editing actions performed since the file was saved.

Copy

Copies selected text to the clipboard.

Paste

Inserts the contents of the clipboard at the insertion pointer.

Cut

Removes selected text and stores it on the clipboard.

3/1553-CRA 114 313 Uen Rev C2 1998-12-14 19 (40)


Command Handling Command File Developer (OPS)

3.4.6 Find Menu


The Find menu includes commands that are used to search for text and replace
text in the command file.

Expand
Next
Previous

Figure 11 The Find Menu


All functions in this menu are case sensitive. The menu includes the following
options:

Find and Replace

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.

Find Marked Text

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 <|.

20 (40) 3/1553-CRA 114 313 Uen Rev C2 1998-12-14


Command Handling Command File Developer (OPS)

3.4.7 The Documentation Menu


Note: This menu is only available if the On-line Document Tool application
is installed.
The Doc menu includes options for accessing on-line documentation.

Figure 12 The Documentation Menu


When an option in the Documentation menu is selected, the DynaText file
browser is brought up on the screen, if it is not already running. DynaText,
(the file browser of the On-line Document Tool) is used to view electronic
books. There is one book for each NE-AS, that is, a certain combination of
network element type and application system version. A more detailed
description of the On-line Document Tool is provided in Reference [7] -
On-line Document Tool, User Guide.
The Select Book option, which displays a list of all available books, is always
available. The other options correspond to the document categories in an
NE-AS book. These options are only available when a connection to a
network element exists. Each option starts a search for documentation of a
text item that is highlighted in the Command File Developer window. If an
option is selected without any relevant text being highlighted, an error
message is displayed and the table of contents of the book is opened.
The menu includes the following options:

Command Descriptions

If a highlighted text item in the window contains a command, this option


displays the Command Description (COD) of the command.

Printout Descriptions

If a highlighted text item in the window contains the title of a response or


spontaneous report, this option displays the Printout Description (POD) of the
response or spontaneous report.

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

This option displays a list of all available books.

3/1553-CRA 114 313 Uen Rev C2 1998-12-14 21 (40)


Command Handling Command File Developer (OPS)

3.5 Load File Window


The Load File window is used to load an existing command file into the
command file area of the Command File Developer window.

Figure 13 The Load File Window


The window is opened by the Load File option in the File menu.
The window contains a file browser, through which files in the file system can
be located.
The name of a file that is selected in the scroll list is shown in the File text
field in the upper part of the window.
The path of the directory that is displayed in the scroll list is shown in the
Directory text field.
The Go To menu includes the following options:
Central Directory Displays the directory where central command files
are stored (default)
Private Directory Displays the directory where private command files
of the current user should be stored
To load a command file into the Command File Developer window, select the
file in the file browser and click on the Load button.

22 (40) 3/1553-CRA 114 313 Uen Rev C2 1998-12-14


Command Handling Command File Developer (OPS)

3.6 Save File Window


The Save File window is used to create a copy of the file currently displayed
in the Command File Developer.

Figure 14 The Save File Window


The window is opened by the Store as New File option in the File menu.
The window contains a file browser, through which any directory in the file
system can be located.
The path of the directory that is shown in the scroll list is displayed in the
Directory text field.
The Go To menu includes the following options:
Central Directory Displays the directory in which central command files
are stored (default)
Private Directory Displays the directory in which the private command
files of the current user should be stored
Use the file browser to select the directory in which you intend to store the
file, and type the new file name in the File text field.
Click on the Save button to order storage of the new file.

3/1553-CRA 114 313 Uen Rev C2 1998-12-14 23 (40)


Command Handling Command File Developer (OPS)

3.7 Print File Window


The Print File window is used to print a command file, or a part of it.

Figure 15 The Print File Window


The window is opened by the Print option in the File menu.
The window contains a file browser. When the window is opened, the name
of the file that is currently displayed in the command file area of the
Command File Developer window is displayed in the File text field, and the
path of this file in the Directory text field. However, any command file can be
selected for printing.
Select one of the Printer Name boxes to specify on which printer the
command file is to be printed. Which printers are available depends on the
current system environment.
The Print File menu contains the two following options:
File Orders printing of the complete command file that is
specified in the File text field
Selected Text Orders printing of text that is selected in the command
file area of the Command File Developer window

24 (40) 3/1553-CRA 114 313 Uen Rev C2 1998-12-14


Command Handling Command File Developer (OPS)

3.8 View Command File Window


The View Command File window lists all files that are currently managed in
the Command File Developer. These files are files that are currently loaded
into the developer.

Figure 16 The View Command File Window


The window is opened by the File option in the View menu.
The path of the file that is selected in the scroll list is shown in the File text
field.
Select the file that you want to display in the Command File Developer
window, and click on the View button.

3.9 Input Output Window


The Input Output window is used to interact with the following command file
commands: @DRAW, @MENU, and @FORM. When one of these commands is
encountered in a command file, the Input Output window automatically opens
up.
The contents of the window when it is opened depend on the command that
has been executed. For information about the commands that make use of the
Input Output window, see Reference [3] - Command Handling,
Programmer’s Guide, Command File Language.
The Input Output window can also be manually opened by the Input Output
option in the View menu.

3.10 Status Window


The status window is opened by the Status Info option in the View menu. The
window displays the current directory.

Figure 17 The Status Window


Click on the Update button to retrieve the current run-time data values.

3/1553-CRA 114 313 Uen Rev C2 1998-12-14 25 (40)


Command Handling Command File Developer (OPS)

3.11 Variable Contents Window


The Variable Contents window is used to view the current contents of
variables in command files.

Figure 18 The Variable Contents Window


Any variable in any of the currently managed command files can be viewed.
The window contains a scroll list with the variables to the left and the contents
of the variables to the right.
If the variable is undefined, the right column will be empty. If the variable is
defined, but contains an empty string, a pair of quotes is shown.
To add a variable to the list, type the variable name in the Variable name text
field in the upper part of the window and click on the Add button. To remove
a variable from the list, select the variable in the list and click on the Remove
button.

3.12 Comment Window


The Comment window automatically opens up when a @WINDOW command
is encountered in the command file. The window can also be opened by the
Comment option in the View menu.
The window consists of a scrollable text pane, as shown in the figure below.

Figure 19 The Comment Window


When @WINDOW is in effect, output created by the @COMMENT command will
be directed to the Comment window. Otherwise, output created by the
@COMMENT command is displayed in the Command File Output Area.
The Comment window is automatically closed when an @WINDEND
command is encountered in the command file.

26 (40) 3/1553-CRA 114 313 Uen Rev C2 1998-12-14


Command Handling Command File Developer (OPS)

3.13 Text: Find and Replace Window


This window is used to find and replace text.
Note: To replace text, the Edit Mode in the CFD main window must be
selected.

Figure 20 The Text:Find and Replace Window


The window is opened by the Find and Replace option in the Find menu.
In the upper text field, type the text you want to search for. Start the search by
selecting one of the options in the Find menu, Forward or Backward. When
an occurrence of the specified text is found, this text is highlighted.
In the lower text field, type the text that you want to replace the old text with.
Click on the Replace button to replace a highlighted text item.
Click on the Find then Replace button to include the search and the
replacement into one action.
Click on the Replace then Find button to replace a highlighted text and search
for the next occurrence of the same text.
Click on the Replace All button to replace all occurrences of the specified text
in the file.
The search function is set in either of two modes in the pop-up menu:
To End Searches the file from the insertion pointer to the end
of the file
All Text Searches the whole file

3/1553-CRA 114 313 Uen Rev C2 1998-12-14 27 (40)


Command Handling Command File Developer (OPS)

3.14 Text: Find Marked Text Window


This window is used to search for text surrounded by delimiters.

Figure 21 The Text:Find Marked Text Window


In the upper part of the window, select the type of delimiter pair you want to
search for, insert, or remove.
Click on the Find Pair button to start a search for text written between the
specified delimiter pair. When an occurrence is found, the text between the
delimiters is highlighted. This search function is set to one of three modes:
Forward Searches the file from the insertion pointer and forward
Backward Searches the file from the insertion pointer and backwards
Expand Used when the insertion pointer is located between the
delimiters
Click on the Insert Pair button to insert the specified delimiter pair at the
insertion pointer.
Click on the Remove Pair button to remove a highlighted pair of delimiters.
The text between the delimiters will not be removed.

3.15 Properties Window


This window is used to control properties of the Command File Developer.

Figure 22 The Properties Window


The window is opened by the Props button, and contains four different
property settings.
If you change the settings and click on the Apply button, the selected
properties will remain in effect only during the current session.
If you click the Set Default button, the selected properties take effect in the
current session and remain in effect the next time the Command File
Developer is started.

28 (40) 3/1553-CRA 114 313 Uen Rev C2 1998-12-14


Command Handling Command File Developer (OPS)

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.

Code Window Size

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

Figure 23 Code Window Size Comparison

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.

3/1553-CRA 114 313 Uen Rev C2 1998-12-14 29 (40)


Command Handling Command File Developer (OPS)

Warnings

Always If this option is selected, all pop-up warnings will be


displayed.
Never If this option is selected, no pop-up warnings will be
displayed.

Accelerators

By activating the Accelerator check boxes, you turn on the accelerator


functions that make it possible to control break points, tags, and current
position with the mouse. These functions are further described in Section 3.17
on page 34.

3.16 The Lower Control Panel


The control panel between the two text panes in the Command File Developer
window is only available in Run mode. The Lower Control Panel is shown in
the figure below.

Figure 24 The Lower Control Panel


The functions of this panel enable the following operations:
• Controlling break points
• Controlling tags
• Controlling current position
• Start and stop the execution of a command file
• Resetting run-time information
This section describes all items found on the lower control panel.
Some of the options require that you have highlighted a command line. A line
is selected when a part of the line is highlighted. To select a line, double-click
somewhere on the line. A single click also selects the command line, but it
does not show since the command file area is not editable in the Run mode.
The fastest way of using the debugger is to use the accelerators, described in
Section 3.17 on page 34.

30 (40) 3/1553-CRA 114 313 Uen Rev C2 1998-12-14


Command Handling Command File Developer (OPS)

3.16.1 Breakpoint Menu


By using the options in the Breakpoint menu, you can add breakpoints to a file
and remove breakpoints from the file.

Figure 25 The Breakpoint Menu


The file execution will stop when a breakpoint is encountered, that is, the line
marked as a breakpoint will not be executed. A breakpoint is indicated by the
symbol to the left of the file. See Figure 29 on page 34.
The menu includes the following options:
Add Marks one or more selected command lines as breakpoints
Clear Removes the breakpoint symbols from all selected command
lines
Clear All Removes the breakpoints from all managed files
If the Breakpoint accelerator function has been activated in the Properties
window, it is also possible to add or remove a breakpoint by clicking in the
line-status area to the left of the command line. See Section 3.17 on page 34.

3.16.2 Tag Menu


By using the options in the Tag menu, you can tag command lines and remove
tags from command lines.

Figure 26 The Tag Menu


When a command line is tagged, a symbol is displayed to the left of the
command line. See Figure 29 on page 34.
All lines that are tagged are considered as a unit that can be executed
independently of the rest of the file by the Tagged lines only option in the Run
menu.
The menu includes the following options:
Add Tags one or more selected command lines
Clear Removes the tags from one or more selected command lines
Clear All Removes the tags from all managed files

3/1553-CRA 114 313 Uen Rev C2 1998-12-14 31 (40)


Command Handling Command File Developer (OPS)

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.16.3 Set Position Menu


By using the options in the Set Position menu, you can change the current
position in the file.

Figure 27 The Set Position Menu


The current position is indicated by the symbol to the left of the command
line. See Figure 29 on page 34.
The execution starts from the current position if the From Current Position
option in the Run menu is selected. If the Step button is clicked, only the
command line marked as current position is executed.
The menu includes the following options:
Set Only Marks a selected command line as current position
Set and Run Starts the execution from the selected command line
If the Set Position accelerator function has been activated in the Properties
window, it is also possible to set the current position by clicking in the
line-status area to the left of the command line. See Section 3.17 on page 34.

3.16.4 Run Menu


The Run menu includes start commands for the file execution.

Figure 28 The Run Menu


From Current Position Starts the file execution from the line that is marked
as current position (indicated by the symbol).
From Top Resets all run-time information and starts the file
execution from the beginning of the file displayed in
the command file area of the developer.
Tagged lines only Executes all tagged command lines from the current
position.

32 (40) 3/1553-CRA 114 313 Uen Rev C2 1998-12-14


Command Handling Command File Developer (OPS)

3.16.5 Step Button


Use the Step button to execute only the command line that is marked as
current position. When the command line is executed, the current position
moves.

3.16.6 Stop Button


Use the Stop button to stop the file execution. When the execution has been
stopped, the symbol (current position) is displayed to the left of the
command line after the last executed line.
If the NE supports it, this command also cancels all delayed responses that
would be the results of the stopped file execution. (AXE only)
The execution can be restarted by the From Current Position option in the Run
menu.

3.16.7 Reset Button


Use this button to reset the run-time data to default values. The following data
is reset:
Variable contents The contents of each defined variable is cleared.
Call stack The return positions, at which the execution resumes
when a subroutine (initiated by @GOSUB) has been
executed, are cleared.
File stack The return positions in the main file, at which the
execution resumes when an included file (included by
@INCLUDE or @I) has been executed, are cleared.
Function busy retry The function busy retry interval is reset to the default
value (which is configurable).
Input Output window The position in the Input Output window where the
next output will be drawn is reset to (1, 1), and the
window is closed.
Comment window The Comment window is closed.
@CHECK status The status of the @CHECK command is set to ON.
@ORDERED status The status of the @ORDERED command is set to ON.
Printer The printer log is printed. (This is equivalent to
executing the @PRINTER(“OFF”) command.)
Log file Any specified log file is closed.
Error flag The error flag, which indicates if an error has
occurred since the beginning of execution or since the
last @IFERROR command was executed, is reset.

3/1553-CRA 114 313 Uen Rev C2 1998-12-14 33 (40)


Command Handling Command File Developer (OPS)

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

Figure 29 Line-status Accelerators

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.

This icon represents a Command Developer Window with


an executing command file.

When the execution of the command file is finished, the


icon looks like this.

Figure 30 The Command File Developer Window Icons

34 (40) 3/1553-CRA 114 313 Uen Rev C2 1998-12-14


Command Handling Command File Developer (OPS)

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.

4.1 Creating a New Command File


In this example, a new command file is created and stored in the private
command file directory of the current user. The file is also tested. The
example assumes that the Command Handling Application is used and that a
network element is available.
1 Start the Command File Developer. See Reference [2] - Command Handling,
User Guide.
Response: The Command File Developer window, the base window of the
application, appears in Edit mode. See Figure 4 on page 14. A file
named Untitled is automatically created in the current working
directory.
2 Select the Store as New File option in the File menu.
Response: A file browser window appears. See Figure 14 on page 23.
3 Select the Private Directory option in the Go To menu.
Response: The file browser now displays your private command file
directory.
4 Type the name of the new command file in the File text field in the file
browser window, and click on the Save button.
Response: The path of the new file appears in the window header of the
Command File Developer window.
5 Write the following command sequence in the command file area of the
Command File Developer window:
@COMMENT("Command File clock check.")
@CONNECT("es_name")
CACLP;
@DISCONNECT
6 As soon as you want to save your work, select the Save Current File option in
the File menu.
7 Set the mode selector in the upper right corner of the Command File
Developer window in Run mode.
Response: The Command File Developer window turns into Run mode.

3/1553-CRA 114 313 Uen Rev C2 1998-12-14 35 (40)


Command Handling Command File Developer (OPS)

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.

36 (40) 3/1553-CRA 114 313 Uen Rev C2 1998-12-14


Command Handling Command File Developer (OPS)

4.2 Executing an Existing Command File


In this example, an existing command file, stored in the private command file
directory of the current user, is loaded into the Command File Developer and
executed. The example assumes that the Command Handling Application is
used.
1 Start the Command File Developer. See Reference [2] - Command Handling,
User Guide.
Response: The Command File Developer window, the base window of the
application, appears in Edit mode. See Figure 4 on page 14.
2 Select the Load File option in the File menu.
Response: A file browser window appears. See Figure 13 on page 22.
3 Select the Private Directory option in the Go To menu.
Response: The file browser now displays your private command file
directory.
4 Select the file that is to be executed, and click on the Load button.
Response: The file is displayed in the command file area of the Command
File Developer window.
5 Set the mode selector in the upper right corner of the window in Run mode.
Response: The Command File Developer window turns into Run mode.
6 Select the From Top option in the Run menu.
Response: The file is executed. If the command file generates any output, the
output is displayed in the Command File Output Area of the
window.

3/1553-CRA 114 313 Uen Rev C2 1998-12-14 37 (40)


Command Handling Command File Developer (OPS)

4.3 Debugging a Faulty Command File


In this example, execution of a faulty command file is started from the
Command Handling Application. The Command File Developer is used to
correct the file and complete the execution. The example assumes that the
Command Handling Application has been started.
1 Send the command file from the Command Handling Application. See
Reference [2] - Command Handling, User Guide.
Response: The Command File Output window appears, see Reference [2] -
Command Handling, User Guide, and the commands in the
command file are executed until the faulty command is
encountered.
2 Start the Command File Developer by clicking on the Debug button in the
Command File Output window.
Response: The Command File Output window turns into a Command File
Developer window. The Command File Developer window
appears in Run mode, displaying the command file. The
symbol that indicates current position points at the command
line that could not be executed.
3 Set the mode selector in the upper right corner of the window in Edit mode.
Response: The Command File Developer window turns into Edit mode.
4 Correct the faulty command line.
5 Select the Save Current File option in the File menu.
6 Set the mode selector in the upper right corner of the window in Run mode.
Response: The Command File Developer window turns into Run mode.
Comment: The symbol points at the corrected command line.
7 Click on the Step button to execute only the corrected command line.
Response: If the command line is now correct, it is executed and the message
“Step: Successful” is displayed in the window footer. The
symbol moves to the next command line.
8 Select the From Current Position option in the Run menu.
Response: The rest of the file is executed. When the execution is completed,
the message “Run stopped: Normal Program Termination” is
displayed in the Command File Output Area.

38 (40) 3/1553-CRA 114 313 Uen Rev C2 1998-12-14


Command Handling Command File Developer (OPS)

4.4 Running All But a Few Lines of a Command File


To tag all but a few command lines, perform the following procedure:
1 Click four times somewhere in the command file area to select the whole file.
2 Select the Add option in the Tag menu to tag all command lines.
3 Select the lines that you want to exclude.
4 Select the Clear option in the Tag menu to remove the tags from the selected
lines.
Comment: 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.
5 To run all tagged lines, select the Tagged Lines Only item in the Run menu.
Response: The tagged lines are executed. If the command lines generate
output, it is displayed in the Command File Output area of the
window.

3/1553-CRA 114 313 Uen Rev C2 1998-12-14 39 (40)


Command Handling Command File Developer (OPS)

5 Glossary

5.1 Acronyms and Abbreviations


CHA Command Handling Application
TMOS Telecommunications Management and Operations Support

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.

40 (40) 3/1553-CRA 114 313 Uen Rev C2 1998-12-14

You might also like