PreviousAnimator Directory FacilityNext"

Chapter 5: COBOL Source Information

COBOL Source Information (CSI) provides an enhanced view of your program when you are editing or testing it. Extensive query facilities enable you to focus on particular pieces of information which can improve your program construction and speed up the debugging process.

5.1 Overview

Information about particular program features can improve your understanding and navigation of the source code while you are editing it. This type of information can also speed up the debugging process during program animation. COBOL Source Information (CSI), accessed from the Editor, Advanced Animator and Xilerator can provide information on many program features including:

UNIX:
(Xilerator is not available on UNIX.)

The information is presented both as highlighting and tagging of the source code itself and as a report window containing information about particular features of the program. The information can also be printed.

CSI uses information created when the program is syntax checked. The Compiler directive CSI directs the Compiler to produce an additional information file during the check phase. This file has an extension of .csi. The CSI directive is set in the default function key Workbench and Object COBOL menus, so that the information is always available.

CSI can provide you with additional warning messages when you check your programs, for example, if your program has overlapping PERFORM THRU ranges. These messages are issued only if you check your programs with the WARNING "2" or WARNING "3" directive.

CSI makes extensive use of toggles to determine the type of information you want to see, and the way it appears on your screen. Most toggle settings can be configured using the standard Workbench configuration file so that you can optimize the behavior of CSI for the way you work.

5.2 Operation

This section describes how to invoke CSI and how to interpret and move around the display shown. Following this section, a more detailed reference of the type of information that you can query is given and then a list of the functions that you can invoke from the menus. Finally, configuration options that you have available are described.

5.2.1 Invoking CSI

CSI can be started from the Animator, the COBOL Editor, or Xilerator. You can either directly enter CSI and start using the CSI menus, or you can enter and perform a query at the same time, by passing a name to be queried. See the section Query Information later in this chapter to see what sort of names can be passed.

5.2.1.1 Advanced Animator

The keys used to invoke CSI are located on the Control menu:

Ctrl+F3=CSI Passes or returns you to CSI, located at the current Animator line. If this is the first use of CSI on the current program, no query is active; otherwise you return with your previous settings active.
Ctrl+F5=CSI-enter Enables you to enter a name to be queried. If any information is found, you enter CSI.
Ctrl+F6=CSI-cursor Queries the name at the cursor position. If any information is found, you enter CSI.

CSI can also be accessed after performing an Animator query.

5.2.1.2 COBOL Editor

The keys used to invoke CSI are located on the F2=COBOL menu:

F4=return-CSI Returns to CSI in the same state you were in. If this is the first use of CSI, no query is active.
F5=CSI-enter Enables you to enter a name to be queried. If any information is found, you enter CSI.
F6=CSI-at-cursor Queries the name at the cursor position. If any information is found, you enter CSI.

5.2.1.3 Xilerator

DOS, Windows and OS/2:
The keys used to invoke CSI are located on the Control menu:

Ctrl+F3=CSI Passes or returns you to CSI, located at the current Animator line. If this is the first use of CSI on the current program, no query is active; otherwise you return with your previous settings active.
Ctrl+F5=CSI-enter Enables you to enter a name to be queried. If any information is found, you enter CSI.
Ctrl+F6=CSI-cursor Queries the name at the cursor position. If any information is found, you enter CSI.

5.2.2 The CSI Display

This section explains how CSI displays information.

5.2.2.1 What Information is Displayed?

The exact information returned by a query depends not only on the subject of the query, but also on the state of several toggles which enables either extra information to be included, or extraneous information removed. The settings of these toggles can be altered by using the Options function (see the section Functions, Menus, and Toggles later in this chapter).

After performing a query, you are informed of the number of source lines highlighted by the query, and how many were filtered due to the various toggle settings in force.

CSI provides information about an item which you select to query. The target of a CSI query might be a procedure-name, a called subprogram, a data item or a special reserved name. It can be selected using the cursor, or entered directly.

5.2.2.2 How is the Information Displayed?

The results of a query are displayed in two ways:

For example, if you query a paragraph-name, the report window might tell you the procedures which perform it, and the source listing would show those lines which contain the relevant PERFORM statements highlighted.

The main panel of the CSI display shows the source listing of your program. Optionally displayed on top of this is the report window, which provides textual information about the item you have queried. The divider line shows which item you are currently querying, together with the settings of some of the more commonly used toggles.

Either the report window or the source can be active. When the source is active, a cursor is displayed at the current line. When the report window is active, the current line is highlighted (no cursor is displayed). You can change focus between the two panels, by pressing W to invoke the Window function (see the section Functions, Menus, and Toggles later in this chapter).

5.2.2.3 The Report Window

The report window displays the textual information of a query. It is sized and aligned automatically. An indicator in the right border shows what proportion of the available text is displayed in the window.

5.2.2.4 The Source Listing

The main area of the screen displays the program source listing. Lines related to the query are highlighted and the type of occurrence is also marked in columns 72 to 80. The types of occurrence are as follows:

Use Use of data item
Mod Modification of data item
Defn Definition of procedure/data item
Qual Data item used as qualification
Exec Queried procedure executes a procedure from this line
Efrom Queried procedure is executed from this line
Copy Start of copyfile
Endcpy End of copyfile
Test Value of data item is tested on this line.

Sequence numbers and tag indicators can be displayed in columns 1-6, and comment lines can be displayed in a different color.

5.2.3 Cursor Control

The current line and cursor can be moved using the following keys:

Key
Function
<up-arrow> Up 1 line
<down-arrow> Down 1 line
Page Up Up 1 page
Page Down Down 1 page
Ctrl+Page Up Up 200 lines
Ctrl+Page Down Down 200 lines
Home source: Moves cursor to beginning of line on first press, and to top of page on second press
report: Moves to top of page
End source: Moves cursor to end of line on first press, and to bottom of page on second press
report: Moves to bottom of page
Ctrl+Home To top of source/text
Ctrl+End To end of source/text
Ctrl+<left-arrow> Scrolls window up one line
Ctrl+<right-arrow> Scrolls window down one line

These keys can be used only when the source window is active:

Key
Function
<left-arrow> Move cursor 1 column left
<right-arrow> Move cursor 1 column right
F9 Move cursor one word left
F10 Move cursor one word right

5.2.4 Using a Mouse

UNIX:
If you are running CSI under UNIX, you cannot use the mouse.

Windows and OS/2:
If you are running CSI under Windows or OS/2, and you have a mouse, you can use it to move around the display and to requery other items. The actions you can perform with it are listed below.

Position the Cursor

Position the mouse pointer on the required position and single-click the left button. If necessary, the window focus is changed (as if you had used the Window function, W).

Scroll the Report Window

Single-click the left button above/below the scroll bar indicator to scroll the window up/down one page.

Single-click the left button on the up/down arrow to scroll the window up/down one line.

Move the Report Window

Move the mouse pointer to the top border of the window. Press and hold the left button. Moving the mouse now moves the window around the screen. Release the button when you are at the required position.

Query Name At Cursor Position

Position the mouse pointer on the name you wish to query. Double-click the left button and the names are queried as if you had used the Csr function (see the section Functions, Menus, and Toggles later in this chapter).

5.2.5 Important Considerations

5.3 Query Information

The following basic types of query are available:

This section describes the information provided by each type of query. Many options are available to restrict or extend the query information. These can be set using toggles or directly at the query-enter prompt. The first three types of query can be selected using the cursor position; the others can be specified only at an enter prompt.

5.3.1 Procedures (Paragraphs and Sections)

The information provided for a procedure consists of:

Name Name of the procedure.
Type Paragraph or section, followed by the segment overlay number if the program is segmented and the procedure is not in the root overlay.
Executed from Lists the procedures and programs from which this procedure item is executed and the type of COBOL statement used to reference it (GO TO, PERFORM, and so on). The source lines containing the relevant statements are highlighted, and marked as "EFrom" (executed-from). The inclusion of this list is toggled on and off by the Executed-from toggle (see the description of the Exec-from function in the section Funcions, Menus, and Toggles later in this chapter).
Executes Lists the procedures and subprograms executed from the procedure-name queried, and the type of COBOL statement involved (such as CALL or PERFORM). The corresponding source lines are highlighted. The inclusion of this list is toggled on and off by the Executes toggle (see the description of the Executes function in the section Functions, Menus, and Toggles later in this chapter).
Procedure Data Lists the data items used, modified and tested by the queried procedure, and, depending on the setting of Perform-level (see the description of the Options function), those items modified many levels of PERFORM below the queried procedure. The inclusion of this list is toggled on and off by the Procedure-data toggle (see the description of the Options function later in this chapter).

The results of querying a procedure also depend upon the settings of the Paragraphs, Performs, Go-tos, and Calls toggles (see the description of the Options function later in this chapter).

5.3.2 Called Subprograms

The text information for called subprograms consists of:

Name /number Identifies the subprogram.
Type Call-by-name, call-by-number (to an RTS routine), or to a data item. The program-name corresponding to a call data-name can be determined only at run time.
Executed from Lists the procedures which CALL/CHAIN this subprogram, and the source lines containing the relevant statements are highlighted. The inclusion of this list is toggled on and off by the Exec-from toggle.

The results of querying a subprogram also depend upon the settings of the Paragraphs and Calls toggles (see the description of the Options function later in this chapter).

5.3.3 Data Item Names

The term data item, as used here, includes data-names, conditions (level-88 items), constants (level-78 items) and files. The following basic information is provided for each type:

Type The type of data item.
Number of references The number of references to this item that have been located in the source.
Usage Indication A letter follows the number of references, as follows:
d The item has no references in the Procedure Division
u The item is referenced in the ProcedureDivision, but none of these references causes modification of the item
m The item has references in the ProcedureDivision that cause modification.
Related items The items related to the target item are listed, if the Related-data toggle is on (see the description of the Options function later in this chapter).
Occurrences All source lines containing occurrences to the items listed are highlighted. The Data-selector toggle (see the description of the Options function later in this chapter) enables only certain types of occurrence to be highlighted.

The following types of data item have additional information:

Data-name
filename
Level-78 Item

5.3.3.1 More Options

From Query-enter prompts it is possible to specify more complex options. When querying a data item from a Query-enter prompt it is possible to restrict the occurrences highlighted to certain types of COBOL verb and/or to a range of lines or procedures. Figure 5-1 shows the syntax.



Figure 5-1: Restricting the Search

Examples

A AT P1 THRU P3

Occurrences of A in procedures P1 through P3.

A AT 100 THRU 2000

Occurrences of A in lines 100 to 2000.

A MOVE SET

Occurrences of A in MOVE and SET statements.

A I-O

Occurrences of A in I/O statements.

A AT #120 THRU #340

Occurrences of A in lines 120 to 340 inclusive.

See the section Finding COBOL Verbs later in this chapter for a list of verbs.

5.3.4 Special Queries

Some reserved names provide special query information. To perform a special query, prefix the data item-name with "_".

ANALYZE

If you have used your program with Analyzer, CSI provides a method of finding lines have been executed more or less than a given number of times and (optionally) restricts the results to a range of lines/procedures and/or certain types of verb. The syntax is shown in Figure 5-2.



Figure 5-2: Analyzer Syntax

Examples:

ANALYZE < 1

All statements which have not been executed.

ANALYZE > 0 I-O

All I/O statements that have been executed.

ANALYZE > 900 AT P1 THRU P3

All statements executed more than 900 times in procedures P1 THRU P3.

CALL

Provides a list of all the called subprograms. If the Exec-from toggle is on, the list also includes where they are executed from. It is possible to restrict the list to just calls of a certain type. The syntax is shown in Figure 5-3.



Figure 5-3: Restricting the List of Subprograms

Examples

CALL

All called subprograms.

CALL DATA

All CALLs to data items (note that these are less efficient than other CALLs and should be avoided if possible).

If no words follow CALL, the list includes subprograms of every type.

COPY

Displays the structure of the copyfiles forming the COBOL program. Nested copyfiles are indented. The source lines which begin and end each copyfile are highlighted.

DEADDATA

Provides a list of all potentially dead data items in the program. A data item is regarded as dead if neither it, nor any of its related data items (see below), are referenced in the Procedure Division. This generally gives a very good indication of whether an item declared in the Data Division is actually required by the program or not. Care should be taken with:

LABEL

Lists all the procedure-names in the program.

TIMES

Presents a list of program statistics. This consists of:

Lines of Source Total number of source lines
Lines of Code Lines of Procedure Division code
Comment Lines Number of comments (both * in column 7 and end of line comments "*>")
Text Comments Number of comments containing at least character A-Z, a-z, or 0-9. This generally provides a better indication of the number of meaningful comments in a program
Comment Ratio Number of text comments for every 100 source lines
Section Number of section-names
Statements Total number of COBOL statements
Paragraphs Number of paragraph-names
Files Number of files (FDs)
Data Items Number of data items
Conditions Number of conditions (level-88 items)
Screen-names Number of screen-names (Screen Section syntax)
Report Number of report-names (Report Writer syntax)
Constant Number of level-78 items
Call (by name) Number of call-by-name subprograms used
Call (by number) Number of call-by-number routines used
Call (data item) Number of data items used as called subprogram-names
Verb counts Number of verbs for each type of statement, including the number of statements for each type of group (for example, Program Exits, Arithmetic)
Maximum Nesting Maximum nesting level of in-line constructs; such as IF, EVALUATE, in-line PERFORM
Overlapping Performs Number of paragraphs/sections that lie in more than one PERFORM...THRU range
Program Volume An assessment of the number of operators and operands in the program. It is calculated as

(N1 + N2) LOG2 (n1 + n2)

where

N1 =    total number of statements
N2 =    number of references to all
   identifier-names
n1 =    number of unique verb types
n1 =    number of identifier-names

Total Data Data size of .int code
INT Code Procedure size of .int code (root segment only)
Linkage 01s Level-01 items in the Linkage Section

Note: The values of these statistics might not be strictly accurate for those programs compiled with an integrated preprocessor, and can vary slightly depending on the COBOL language dialect specified when you syntax-checked your program.


UNDECL

Provides a list of all the undeclared procedures, showing where they are referenced. This is generally empty, unless your program checks with one or more syntax error 0348 messages ("Procedure name procedure-name undeclared, first used on line line-number").

UNEXEC

Provides a list of all procedure-names which are not actually referenced explicitly by the program. These procedure-names are not necessarily redundant since they might affect the end of PERFORM ranges, but this information can help to locate dead procedures.

UNREF

Provides a list of all data items which are not actually referenced explicitly by name in the Procedure Division.

WILDCARDS

If you include the wildcards "*" and "?" in the name you query, a list of all the names that match the wildcard string is produced, and their source line definitions are highlighted. You can specify "*" both at the beginning and end of the string.

The wildcard search can also be restricted to just procedure-names by adding "PROC", or to just data-names by adding "DATA" after the wildcard string.

Examples:

FLAG-* DATA Lists data items beginning with "FLAG-".
*-EXIT PROC Lists procedure-names ending in "-EXIT".
*FILE* Lists all names containing the string "FILE".

5.3.5 Finding COBOL Verbs

At an Enter prompt, it is possible to find where you have used certain COBOL verbs in your program. The syntax is shown in Figure 5-4.



Figure 5-4: Finding COBOL verbs

A list of recognized COBOL verbs is shown below.

ACCEPT
ADD
ALTER
CALL
CANCEL
CHAIN
CLOSE
COMMIT
COMPUTE
CONTINUE
DELETE
DISABLE
DISPLAY
DIVIDE
ELSE
ENABLE
END
END-EVALUATE
END-IF
END-INVOKE
END-PERFORM
END-SET
ENTER
ENTRY
EVALUATE
EXAMINE
EXEC
EXECUTE
EXHIBIT
EXIT
GENERATE
GO
GOBACK
IF
INITIALIZE
INITIATE
INSPECT
INVOKE
MERGE
MOVE
MULTIPLY
NEXT
NOTE
ON
OPEN
OTHERWISE
PERFORM
READ
READY
RECEIVE
RECOVER
RELEASE
RESET
RETURN
REWRITE
ROLLBACK
SEARCH
SEND
SERVICE
SET
SORT
START
STOP
STRING
SUBTRACT
SUPPRESS
TERMINATE
TRANSFORM
UNLOCK
UNSTRING
WHEN
WRITE

In addition, the following words refer to COBOL verbs as follows:

DEPENDING GO TO .. DEPENDING ON ..
EXCEPTION Exception conditions such as ON SIZE ERROR and AT END
EXIT-PROGRAM EXIT PROGRAM (not EXIT)
INLINE In-line PERFORM statements
PREPROCESSED Statements that have been replaced by an integrated preprocessor, such as CICS
STOP-RUN STOP RUN (not STOP "message")
THRU PERFORM ... THRU
WHEN-OTHER WHEN OTHER (not WHEN)
EXIT-PERFORM EXIT PERFORM
EXIT-CYCLE EXIT PERFORM CYCLE
EXIT-PARA EXIT PARAGRAPH
EXIT-SECTION EXIT SECTION

The following words identify groups of verbs:

ARITH Arithmetic statements: COMPUTE, ADD, MULTIPLY, DIVIDE, and SUBTRACT.
END-SCOPE ANSI'85 END-verbs. For example, END-IF and END-READ.
I-O File operations: OPEN, CLOSE, READ, WRITE, DELETE, START, and REWRITE.
PGMEXIT Program Exits: STOP RUN, EXIT PROGRAM, and GOBACK.

Examples:

COMPUTE 
All COMPUTE statements.
I-O AT READ-FILES
I/O statements in the procedure READ-FILES.
ARITH 
All arithmetic statements.
PGMEXIT
All program exits (EXIT PROGRAM, STOP RUN, GOBACK).
ADD AT #120 THRU #340
All ADD statements in lines 120-340.

5.3.6 Qualified Names

CSI supports qualified data-names. When you query an item, you can specify A OF B as opposed to A OF C. If CSI is unable to uniquely resolve the data-name you gave it, it provides a list of synonyms of the item.

Example

If you have the following data declaration:

  01  B.
     03  A   PIC X.
  01  C.
     03  A   PIC X.

querying the name "A", CSI gives you a list showing A OF B, and A OF C.

5.4 Functions, Menus, and Toggles

Many of the CSI functions that you would commonly use are available on the main menu (see Figure 5-5). Some of these functions have subfunctions with additional menus. The functions either perform an action, change the value of a toggle, or display a menu of further functions.



Figure 5-5: Main Menu

Compress

Toggles the source listing between a compressed listing (showing only the highlighted source lines) and a normal listing (all source lines are displayed). See also the Expand function.

Csr (Cursor)

Queries the item at the cursor position. In the report window, the item queried is the one on the current line.

Display

Enables you to alter various display options.

Whenever this menu is active, the cursor keys move the report window around the screen. The Home, PgUp, End, and PgDn keys move the window automatically at the corners of the screen. In these latter positions, the window is automatically repositioned whenever a new query is performed.

This submenu provides functions for altering the screen display and clearing tags. See Figure 5-6.



Figure 5-6: Display Menu

Analyzer

Toggles the display of Analyzer totals in columns 72-80 on and off. It can be changed only when the current program has been checked with the ANALYZE directive.

Comment-color

Comment lines (those with an asterisk in column 7) can optionally be displayed in a different color, which can be configured (see the description of the Comment-color toggle in the section Configuration Options later in this chapter). This key toggles between three different states:

Current-file

Displays the name of the source file which contains the current source line. This can be useful if you have programs with many copyfiles.

Escape

Returns to the main menu.

Print-to-file

This function displays the print-to-file submenu as shown in
Figure 5-7.



Figure 5-7: Print Menu

The Print-to-file submenu enables you to append the current query report and/or highlighted lines to an ASCII line sequential file. The name of this file can be configured. The default filename is csi.dat, and the file is written to the current directory.

Source-only

Prints the highlighted lines of your source.

Report-only

Prints only the information in the current query report.

Both-source-and-report

Prints the highlighted source and report information.

Perform-thrus

When this toggle is on, definitions of procedure-names which are interior to PERFORM ... THRU ranges are marked in columns 1-6. For well behaved programs, this gives a good indication as to whether execution can fall through a paragraph-name or not.

Seq-no's

Toggles the display of sequence numbers in columns 1 to 6 on and off.

Tags

Toggles the display of tags on and off.

Escape

Exits from CSI.

Exec-from

Toggles the "executed-from" information on and off. When on, the information provided for procedures and subprograms queried include where they are executed from. Where necessary, the report and source windows are automatically updated when changing this toggle.

Executes

Toggles the "executes" information on and off. When on, the information provided for procedures queried include what other procedures and called subprograms they execute. Where necessary, the report and source windows are automatically updated when changing this toggle.

Expand

Toggles the source listing between a compressed listing (showing only the highlighted source lines) and a normal listing (all source lines are displayed). See also the function Compress.

Hide

Toggles between hiding and showing the report window. If you hide the report window when it is active, the focus automatically shifts to the source.

Locate

Takes you to the Locate submenu, enabling you to locate various lines. The locate submenu provides ways of quickly locating source lines in the program. See Figure 5-8



Figure 5-8: Locate Menu

Clear-return-stack

Each time you perform a Locate function, the position of the located item is added to a stack, so that if you perform several Locate functions without intervening Return funcitons, you can then perform several Return functions to step back through your located positions. The Clear-return-stack function clears this stack.

Cursor

The effect of this key depends on whether the source or report window is active.

When the source is active, the source line containing the definition of the item at the cursor position is located. The position you were at is stored, and you can quickly return there by pressing R (Return) from the main menu. Successive Locate functions stack the positions they were performed from, so Locate and Return functions can be used to navigate around the program.

When the report window is active, the source is positioned at the line relevant to the selected line in the report window.

Enter

This enables you to locate the definition of a name you key in. You can key in one of the following:

File-control

Positions you at the definition of the first file item (usually a SELECT statement in the File-Control of the Environment Division).

File-section

Positions you at the definition of the first File-Section item (usually the first record of an FD).

Linkage

Positions you at the definition of the first Linkage Section item.

Next-procedure

Positions you at the next paragraph or section definition in the source (only available when source is active).

Previous-procedure

Positions you at the previous paragraph or section definition in the source (only available when source is active).

If the program does not contain the relevant line, the position remains unaltered and a message is displayed.

Screen-section

Positions you at the definition of the first Screen Section name.

Start-procedure

Positions you at the start of the PROCEDURE DIVISION label.

Working-storage

Positions you at the definition of the first Working-Storage Section item.

Options

Takes you to the Options submenu, which enables you to alter those toggles which affect the information returned by a query.

The exact information returned for each query depends upon the setting of many of the toggles on this menu. None of the options you change take effect until you perform another query, either by requerying the current item or querying a new item. See Figure 5-9.



Figure 5-9: Options Menu

Calls

Toggles the inclusion of CALL statement information in "executed-from" and "executes" information on and off.

Data-selector

The state of this toggle is displayed upon the divider line and determines what type of data item occurrences are highlighted:

All All occurrences are shown
Uses Only Uses and Modifications are shown
Mod Only Modifications are shown
Defn Only Definitions are shown.

This toggle also determines which data items are included in the related data item list (see below). When set to "Mod" or "Use", only data items which are respectively modified or used by the Procedure Division are included in the list of related data items.

Escape

Returns to the main menu.

Go-tos

Toggles the inclusion of GO TO statement information in "executed-from" and "executes" information on and off.

Paragraphs

Toggles the inclusion of paragraphs in procedural queries on and off. When on, paragraphs are shown in "executes" information. When off, paragraph-names are not shown and "executed from" information shows the parent sections instead of any paragraph-names.

Perform-level

The two function keys assigned to this function, F7 and F8, respectively decrease and increase the PERFORM-level setting. See the section Procedures (Paragraphs and Sections) earlier in this chapter, for information on where this is used.

Performs

Toggles the inclusion of PERFORM statement information in "executed-from" and "executes" information on and off.

Data-in-procedure

When this toggle is highlighted, procedure-name queries include information concerning the data-name used by the procedure. See the section Procedures (Paragraphs and Sections) earlier in this chapter for information on where this is used.

Note that when the Data X Procedure (DXP) toggle is highlighted, data-name queries include the procedures in which they are found.

Related-data

The state of this toggle is shown on the status line. It has three settings:

Off
Child Data item queries include details of the child items of the target item.
Related Data item queries include details of the related data items of target item.

Data item A is regarded as a related definition of Data item B, if any of the following conditions are true:

Requery

Pressing Enter requeries the current item, with the new toggle settings, and returns to the main menu.

Sort

Set this toggle to sort items into alphabetic order rather than source code order.

When an item has an OCCURS clause, only the first occurrence is considered as being possibly dependent upon or a dependent of other data items.

SAME RECORD AREA is not supported.

Posn-exit

Returns to the COBOL Editor or Animator, positioning you at the cursor line and column. In the report window, this is the same as if you had performed a Locate-Cursor, but returned to the COBOL Editor / Animator instead of the source window. If necessary, the COBOL Editor loads the appropriate copyfile. Only the Animator display is relocated, not the execution line of the program.

CSI does not compensate for the replaced lines in COPY...REPLACING files.

Prev/Next

Positions the source to display the previous/next highlighted source line. When the report window is active, the source scrolls to display the current line, and the report window remains unaltered. These functions are not available when the source listing is compressed.

Query

Takes you to the Query submenu, enabling you to query other items. See Figure 5-10.



Figure 5-10: Query Menu

Child

Queries the first child of the current data item.

Cursor

Queries the item at the current cursor position. It is the same as using F6=csr on the main menu.

Enter

Enables you to enter a name to query. It is the same as using F5=enter on the main menu.

Parent

Queries the parent of the current item.

Previous-queries

A list of items previously queried is displayed. Select the one you wish to requery and press Enter. Press Escape to return without querying a previous item.

Same-level

Queries the next data item at the same level as the current item.

Return

Returns to a position from which a Locate function was previously performed.

Tag

Takes you to the Tag submenu, enabling you to set and clear tags.

CSI enables you to set and maintain program-wide tags.

Clear-all-tags

Clears all the tags.

Go-to-tag

Returns to a previously tagged line. Pressing "G" repeatedly cycles between all the tagged lines in the order in which they were set.

Set-tag

Sets a tag at the current source line. Up to 16 source lines can be tagged. This function is not available in the report window. Lines which have been tagged are usually indicated in columns 1-6 of the source by a "Tag" indicator. These can be optionally hidden by pressing "T" on the display menu.

Un-set-tag

Clears the tag at the current line.

Window

Switches the focus between the source and report window. If the report window has been hidden, it is automatically redisplayed.

5.5 Configuration Options

Many of the default toggle settings and colors used by CSI are configurable, and can be specified in the local configuration file under the configuration tag [MF-CSI]. See the chapter Configuring Development Tools in your Getting Started for information on using configuration files.

Each configuration option must start on a new line and occupy a single line. Case is not significant. Space and colon (:) are regarded as separators and are ignored.

For example, if you wish to set the Exec-from toggle to be initially OFF and the valule of the Data-selector option to be "Uses", enter the following three lines in the local configuration file:

Example:

[MF-CSI]
executed-from off
data-filter 1

Additional changes would be entered as single lines following the [MF-CSI] tag but preceding any other tag-names. In order to check that your configuration options are syntactically correct, run the Mfcsi utility. It parses the configuration options and marks any erroneous lines.

There are three groups of items that can be configured:

5.5.1 Toggle Settings

The initial settings of many of the toggles available on the user interface can be configured.


CALLS on/off

Default: CALLS ON

Specifies the initial setting of the calls toggle (see the Options menu).


COMMENT-COLOR integer

Default: COMMENT-COLOR 0

Determines the initial setting of the 3-way comment color toggle.

0 = All text shown normally (default)
1 = Comment lines shown in dark color
2 = Non-comment lines shown in dark color.


DATA-FILTER integer

Default: DATA-FILTER 0

Determines the initial setting of the Data-selector option:

0 = All (default)
1 = Uses
2 = Modification
3 = Definition.


EXECUTED-FROM on/off

Default: EXECUTED-FROM ON

Determines the initial setting of the Exec-from toggle.


EXECUTES on/off

Default: EXECUTES ON

Determines the initial setting of the Executes toggle.


GO-TOS on/off

Default: GO-TOS ON

Specifies the initial setting of the Go-tos toggle (see the Options menu).


PARAGRAPHS on/off

Default : PARAGRAPHS ON

Specifies the initial setting of the Paragraphs toggle (see the Options menu).


PERFORMS on/off

Default: PERFORMS ON

Specifies the initial setting of the Performs toggle (see the Options menu).


PERFORM-LEVEL integer

Default: PERFORM-LEVEL 1

Specifies the initial setting of the Perform-level option.


PROCEDURE-DATA on/off

Default: PROCEDURE-DATA OFF

Specifies the initial setting of the Data-in-procedure option.


RELATED-DEFNS on/off/child

Default: RELATED-DEFNS OFF

Determines the initial setting of the Related-definitions toggle.


SHOW-ANALYZER on/off

Default: SHOW-ANALYZER OFF

Determines the initial setting of the Analyzer Display option.


SHOW-THRU on/off

Default: SHOW-THRU OFF

Determines the initial setting of the Perform-thru option.

5.5.2 Color Configuration

CSI defaults to using the same display attributes as the rest of Workbench or Object COBOL for UNIX. However, many of the attributes can be configured independently. For example, it is possible to alter the color of the source listing which gives a visible difference between CSI and Animator.

The color configuration options are prefixed by "COLOR-" and the monochrome options are prefixed by "MONO-".

The options available are:


BORDER

Border of report window.

Defaults to system attribute : 4


DARK

Comment lines when comment-color is changed.

Defaults to system attribute : 1


SOURCE-HI

Highlighted source lines.

Defaults to system attribute : 5


SOURCE-CURSOR

Current line in source window.

Defaults to system attribute : 4


SOURCE-CURSOR-HI

Current source line, when highlighted.

Defaults to system attribute : 6


REPORT

Text in report window.

Defaults to system attribute : 7


SOURCE

Source text.

Defaults to system attribute : 7


REPORT-CURSOR

Current line in report window.

Defaults to system attribute : 2

DOS, Windows and OS/2:
For information on system attributes on DOS, Windows and OS/2 see the chapter Color in your Object COBOL Character Tools.

Color attributes are specified as foreground ON background followed optionally by "BLINK". The values for foreground and background can be any of those used in the color configuration of Workbench.

5.5.2.1 Color Configuration Examples

Example 1

To alter the source text attribute for color systems to green on black, you should include the line:

COLOR-SOURCE GREEN ON BLACK

Monochrome attributes are specified as either "REVERSE-VIDEO", "UNDERLINE" or "NORMAL", together with "HIGHLIGHT" and/or "BLINK".

Example 2

To alter the current report line attribute for monochrome displays to highlighted underline, you should include the line:

MONO-SELECT-BAR HIGHLIGHT UNDERLINE

5.5.3 Miscellaneous Configuration Options

Some other options that you can configure for CSI are listed below:


COBIDY-FIRST on/off

Default: COBIDY-FIRST OFF

When ON, and CSI is accessed from the Editor, .idy and .csi files will be located only along the path specified by the COBIDY environment variable. This option is intended for use in environments where the .idy and .csi files are in different directories from the source files, and when any .idy and .csi files in the source directories are to be ignored.


DUMP-FILE filename

Default: DUMP-FILE csi.dat.

Specifies the name of the line sequential file to which reports can be dumped.


LAST-QUERIES integer

Default: LAST-QUERIES 15

Specifies the number of last-queries which are held. integer must be between 1 and 15 inclusive.


NEW-LOCATE on/off

Default: NEW-LOCATE OFF

When ON, each new query causes CSI to automatically relocate to the most appropriate line.


REPORT-ALIGN integer

Default: REPORT-ALIGN 1

Determines the initial position of the report window.

0 = Top-left
1 = Top-right (default)
2 = Bottom-left
3 = Bottom-right


REPORT-HIDE on/off

Default: REPORT-HIDE OFF

Determines if the report window is initially hidden or not.


SEQ-NUMBERS on/off

Default: SEQ-NUMBERS ON

Determines whether sequence numbers are displayed in columns 1-6 or not.


Copyright © 1999 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.

PreviousAnimator Directory FacilityNext"